[Bf-blender-cvs] CVS commit: blender/source/blender/python/api2_2x vector.c vector.h matrix.c NMesh.c NMesh.h
Stephen Swaney
sswaney at swbell.net
Thu Oct 14 19:35:16 CEST 2004
stiv (Stephen Swaney) 2004/10/14 19:35:16 CEST
Modified files:
blender/source/blender/python/api2_2x vector.c vector.h
matrix.c NMesh.c NMesh.h
Log:
followup to vector memory leak fixes:
fix for problems with NMesh vertices.
plug some more leaks in matrix module.
new vector method newVectorProxy().
In BPy-Land, we have overloaded the meaning of our Vector
type. One use is for vectors in the traditional mathmatical
sense. The other legacy use is as a proxy for Blender data.
The recent memory leak fixed have lead to the Vector type
behaving as mathematical vectors.
However, the NMesh module is still using Vector types as a
proxy to manipulate NMVert data. To support this usage, in
the vector module there is a new factory method
newVectorProxy(). This creates a Vector that references
memory outside the Vector. Vectors created by
newVectorProxy() do NOT free their referenced memory. The
newVectorProxy() is used only in bpy code and is not exposed
thru the scripting interface.
Anyone using newVectorProxy() must be aware of object
lifetime and scoping issues because the returned Vector
holds a pointer to memory it does not own. This works in
the NMVert case since we are referencing memory belonging to
the NMVert object via an NMVert method.
Revision Changes Path
1.16 +32 -3 blender/source/blender/python/api2_2x/vector.c
<http://projects.blender.org/viewcvs/viewcvs.cgi/blender/source/blender/python/api2_2x/vector.c.diff?r1=1.15&r2=1.16&cvsroot=bf-blender>
1.8 +2 -1 blender/source/blender/python/api2_2x/vector.h
<http://projects.blender.org/viewcvs/viewcvs.cgi/blender/source/blender/python/api2_2x/vector.h.diff?r1=1.7&r2=1.8&cvsroot=bf-blender>
1.10 +11 -5 blender/source/blender/python/api2_2x/matrix.c
<http://projects.blender.org/viewcvs/viewcvs.cgi/blender/source/blender/python/api2_2x/matrix.c.diff?r1=1.9&r2=1.10&cvsroot=bf-blender>
1.46 +4 -4 blender/source/blender/python/api2_2x/NMesh.c
<http://projects.blender.org/viewcvs/viewcvs.cgi/blender/source/blender/python/api2_2x/NMesh.c.diff?r1=1.45&r2=1.46&cvsroot=bf-blender>
1.28 +9 -5 blender/source/blender/python/api2_2x/NMesh.h
<http://projects.blender.org/viewcvs/viewcvs.cgi/blender/source/blender/python/api2_2x/NMesh.h.diff?r1=1.27&r2=1.28&cvsroot=bf-blender>
More information about the Bf-blender-cvs
mailing list