Author: DerekRhodes Date: 2008-03-05 16:31:00 -0500 (Wed, 05 Mar 2008) New Revision: 1053
Modified: trunk/pysoy/src/_datatypes/MaterialList.pxi Log: updated for children API change, pending Arc's eyeball Modified: trunk/pysoy/src/_datatypes/MaterialList.pxi =================================================================== --- trunk/pysoy/src/_datatypes/MaterialList.pxi 2008-03-05 21:13:27 UTC (rev 1052) +++ trunk/pysoy/src/_datatypes/MaterialList.pxi 2008-03-05 21:31:00 UTC (rev 1053) @@ -37,10 +37,12 @@ def __dealloc__(self) : cdef int i - self._children.lock() + #self._children.lock() + self._children.stepLock() for i from 0 <= i < self._children.current : py.Py_DECREF(<object> self._children.list[i]) - self._children.unlock() + #self._children.unlock() + self._children.stepUnlock() def __len__(self) : @@ -52,10 +54,10 @@ cdef object l cdef soy.meshes.Mesh _mesh l = [] - self._children.lock() + self._children.stepLock() for i from 0 <= i < self._children.current : l.append(<soy.materials.Material> self._children.list[i]) - self._children.unlock() + self._children.stepUnlock() return str(l) @@ -65,14 +67,16 @@ def __getitem__(self, _index) : cdef soy.materials.Material _mat - self._children.lock() + #self._children.lock() + self._children._stepLock() if _index < 0 : _index = self._children.current + _index if _index < 0 or _index >= self._children.current : self._children.unlock() raise IndexError('material index out of range') _mat = <soy.materials.Material> self._children.list[_index] - self._children.unlock() + #self._children.unlock() + self._children._stepUnlock() return _mat @@ -85,20 +89,24 @@ _mesh._verts._calculateTSLV(body) _mesh._verts._coreRenderArrayBumpPass() - self._children.lock() + #self._children.lock() + self._children._stepLock() for i from 0 <= i < self._children.current : (<soy.materials.Material> self._children.list[i])._coreBind() _mesh._faces._coreRenderArray(self._ranges[i].offset, self._ranges[i].length) (<soy.materials.Material> self._children.list[i])._coreUnBind() - self._children.unlock() + #self._children.unlock() + self._children._stepUnlock() _mesh._verts._coreRenderArray() - self._children.lock() + #self._children.lock() + self._children._stepLock() for i from 0 <= i < self._children.current : (<soy.materials.Material> self._children.list[i])._coreBind() _mesh._faces._coreRenderArray(self._ranges[i].offset, self._ranges[i].length) (<soy.materials.Material> self._children.list[i])._coreUnBind() - self._children.unlock() + #self._children.unlock() + self._children._stepUnlock() cdef void _coreRenderBuffer(self, void* body) : @@ -118,25 +126,28 @@ _mesh._verts._coreRenderBufferBumpPass() - self._children.lock() + #self._children.lock() + self._children.stepLock() for i from 0 <= i < self._children.current : if (<soy.materials.Material> self._children.list[i])._has_bumpmap(): (<soy.materials.Material> self._children.list[i])._coreBindBumpPass() _mesh._faces._coreRenderBuffer(self._ranges[i].offset, self._ranges[i].length) (<soy.materials.Material> self._children.list[i])._coreUnBindBumpPass() - self._children.unlock() + #self._children.unlock() + self._children.stepUnlock() _mesh._verts._coreRenderBuffer() + #self._children.lock() self._children.lock() for i from 0 <= i < self._children.current : (<soy.materials.Material> self._children.list[i])._coreBind() _mesh._faces._coreRenderBuffer(self._ranges[i].offset, self._ranges[i].length) (<soy.materials.Material> self._children.list[i])._coreUnBind() - self._children.unlock() + #self._children.unlock() + self._children.stepUnlock() cdef void _allocRanges(self, int num) : self._ranges = <Range *> self._alloc(num, &self._rangesAlloc, self._ranges, sizeof(Range)) -# !DIRTY: 55-58 \ No newline at end of file _______________________________________________ PySoy-SVN mailing list PySoy-SVN@pysoy.org http://www.pysoy.org/mailman/listinfo/pysoy-svn