diff options
author | Campbell Barton <ideasman42@gmail.com> | 2006-07-27 05:18:21 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2006-07-27 05:18:21 +0400 |
commit | b227c98c443b2106df37a9ebeb04dcd50d6f2e49 (patch) | |
tree | b80eac1e6114fd95c52d7bb467da63c2481a1957 /source/blender/python/api2_2x/vector.h | |
parent | 4ee3515bf1751f7f89168f3c5c1fd907ad138ffd (diff) |
Addition to Mathutils
vec.normalized()
mat.inverted()
mat.transposed()
made vec/float possible
normalize/invert/transpose now return None because they modify the data in place.
use the ...(ed) versions to return a modified copy.
Fixed Memory leaks from not decreffing PyFloat_AS_DOUBLE from these python functions...
(found when testing above functions)
ob.rbMass
ob.rbRadius
matrix.determinant()
quat*float
vec*float
matrix.transpose()
EXPP_setModuleConstant
Checked all instances of PyFloat_AS_DOUBLE so I dont think there are any mroe leaks there.
Diffstat (limited to 'source/blender/python/api2_2x/vector.h')
-rw-r--r-- | source/blender/python/api2_2x/vector.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/source/blender/python/api2_2x/vector.h b/source/blender/python/api2_2x/vector.h index d060b78855b..631bbab215d 100644 --- a/source/blender/python/api2_2x/vector.h +++ b/source/blender/python/api2_2x/vector.h @@ -62,7 +62,9 @@ blender (stored in blend_data). This is an either/or struct not both*/ //prototypes PyObject *Vector_Zero( VectorObject * self ); PyObject *Vector_Normalize( VectorObject * self ); +PyObject *Vector_Normalized( VectorObject * self ); PyObject *Vector_Negate( VectorObject * self ); +PyObject *Vector_Negated( VectorObject * self ); PyObject *Vector_Resize2D( VectorObject * self ); PyObject *Vector_Resize3D( VectorObject * self ); PyObject *Vector_Resize4D( VectorObject * self ); |