Author: DerekRhodes
Date: 2008-03-05 20:02:01 -0500 (Wed, 05 Mar 2008)
New Revision: 1058

Modified:
   trunk/pysoy/src/atoms/Vertex.pxi
Log:
locks changed for Children API

Modified: trunk/pysoy/src/atoms/Vertex.pxi
===================================================================
--- trunk/pysoy/src/atoms/Vertex.pxi    2008-03-05 23:05:54 UTC (rev 1057)
+++ trunk/pysoy/src/atoms/Vertex.pxi    2008-03-06 01:02:01 UTC (rev 1058)
@@ -31,19 +31,23 @@
       # For an instance of an existing vertex
       if index >= self._list._arraySize :
         raise ValueError('index out of range')
-      self._list._children.lock()
+      ##self._list._children.lock()
+      self._list._children._stepLock()
       self._list._children.append(<void *>self)
       self._index = index
-      self._list._children.unlock()
+      #self._list._children.unlock()
+      self._list._children._stepUnlock()
     else :
       # For a brand new vertex
-      self._list._children.lock()
+      ##self._list._children.lock()
+      self._list._children._stepLock()
       self._list._children.append(<void *>self)
       self._index = self._list._arraySize
       self._list._arraySize = self._list._arraySize + 1
       self._list._allocArray (self._list._arraySize)
       self._list._flagUpdated(self._index)
-      self._list._children.unlock()
+      ##self._list._children.unlock()
+      self._list._children._stepUnlock()
     if position :
       self.position = position
     if normal :
@@ -69,11 +73,13 @@
     def __get__(self) :
       cdef float x, y, z
       cdef object t
-      self._list._children.lock()
+      ##self._list._children.lock()
+      self._list._children._stepLock()
       t = (self._list._array[self._index].px, 
            self._list._array[self._index].py, 
            self._list._array[self._index].pz)
-      self._list._children.unlock()
+      ##self._list._children.unlock()
+      self._list._children._stepUnlock()
       return t
     def __set__(self, value) :
       cdef int i
@@ -96,55 +102,65 @@
     def __get__(self) :
       cdef float x, y, z
       cdef object t
-      self._list._children.lock()
+      ##self._list._children.lock()
+      self._list._children._stepLock()
       t = (self._list._array[self._index].nx, 
            self._list._array[self._index].ny, 
            self._list._array[self._index].nz)
-      self._list._children.unlock()
+      ##self._list._children.unlock()
+      self._list._children._stepUnlock()
       return t
     def __set__(self, value) :
       if type(value)!=tuple and type(value)!=list :
         raise TypeError('Must provide a tuple or list')
       if len(value)!=3 :
         raise TypeError('Must provide (x,y,z)')
-      self._list._children.lock()
+      ##self._list._children.lock()
+      self._list._children._stepLock()
       self._list._array[self._index].nx = value[0]
       self._list._array[self._index].ny = value[1]
       self._list._array[self._index].nz = value[2]
       self._list._flagUpdated(self._index)
-      self._list._children.unlock()
+      #self._list._children.unlock()
+      self._list._children._stepUnlock()
 
 
   property texcoord :
     def __get__(self) :
       cdef float x, y, z
       cdef object t
-      self._list._children.lock()
+      ##self._list._children.lock()
+      self._list._children._stepLock()
       t = (self._list._array[self._index].tx, 
            self._list._array[self._index].ty, 
            self._list._array[self._index].tz)
-      self._list._children.unlock()
+      ##self._list._children.unlock()
+      self._list._children._stepUnlock()
       return t
     def __set__(self, value) :
       if type(value)!=tuple and type(value)!=list :
         raise TypeError('Must provide a tuple or list')
       if len(value)!=3 :
         raise TypeError('Must provide (x,y,z)')
-      self._list._children.lock()
+      ##self._list._children.lock()
+      self._list._children._stepLock()
       self._list._array[self._index].tx = value[0]
       self._list._array[self._index].ty = value[1]
       self._list._array[self._index].tz = value[2]
       self._list._flagUpdated(self._index)
-      self._list._children.unlock()
+      ##self._list._children.unlock()
+      self._list._children._stepUnlock()
 
   property tangent:
       def __get__(self):
           cdef object t
-          self._list._children.lock()
+          ##self._list._children.lock()
+          self._list._children._stepLock()
           t = (self._list._array[self._index].tan_x, 
                self._list._array[self._index].tan_y, 
                self._list._array[self._index].tan_z)
-          self._list._children.unlock()
+          ##self._list._children.unlock()
+          self._list._children._stepUnlock()
           return t
       def __set__(self,value):
           if type(value)!=tuple and type(value)!=list :
@@ -152,12 +168,14 @@
           if len(value)!=3 :
             raise TypeError('Must provide (x,y,z)')
 
-          self._list._children.lock()
+          ##self._list._children.lock()
+          self._list._children._stepLock()
           self._list._array[self._index].tan_x = value[0]
           self._list._array[self._index].tan_y = value[1]
           self._list._array[self._index].tan_z = value[2]
           self._list._flagUpdated(self._index)
-          self._list._children.unlock()
+          ##self._list._children.unlock()
+          self._list._children._stepUnlock()
 
 # DIRTY! 38-46
 # DIRTY! 72-76

_______________________________________________
PySoy-SVN mailing list
PySoy-SVN@pysoy.org
http://www.pysoy.org/mailman/listinfo/pysoy-svn

Reply via email to