Blender Git Loki

Git Commits -> Revision eb22a7b

Revision eb22a7b by Campbell Barton (master)
June 23, 2009, 13:34 (GMT)
PyRNA API support for matrix types as Mathutils matrix (with callbacks) rather then a generic rna sequence of floats.

Any 3x3 or 4x4 rna matrix will automatically be returned as a Mathutils matrix.
This makes useful stuff like multiplying a vector location by an object matrix possible.
ob = bpy.data.scenes[0].objects[0]
print (ob.data.verts[0].co * ob.matrix)

Also added mathutils matrix types to the BGE GameObject.localOrientation, worldOrientation

* MT_Matrix3x3 added getValue3x3 and setValue3x3, assumed a 4x3 float array.
* KX_GameObject.cpp convenience functions NodeSetGlobalOrientation, NodeGetLocalOrientation, NodeGetLocalScaling, NodeGetLocalPosition.
* 2.5 python api now initializes modules BGL, Mathutils and Geometry
* modules py3 PyModuleDef's use PyModuleDef_HEAD_INIT, rather then {}, was making msvc fail to build.
* added macros for Vector_ReadCallback, Vector_WriteCallback etc. to check if the callback pointer is set before calling the function.

Commit Details:

Full Hash: eb22a7b2102cceb432e3545cd342956e92873a49
SVN Revision: 21107
Parent Commit: bf74f10
Lines Changed: +534, -172

14 Modified Paths:

/intern/moto/include/MT_Matrix3x3.h (+24, -0) (Diff)
/source/blender/python/generic/bgl.c (+1, -1) (Diff)
/source/blender/python/generic/geometry.c (+1, -1) (Diff)
/source/blender/python/generic/mathutils.c (+65, -49) (Diff)
/source/blender/python/generic/mathutils.h (+21, -8) (Diff)
/source/blender/python/generic/matrix.c (+199, -25) (Diff)
/source/blender/python/generic/matrix.h (+12, -9) (Diff)
/source/blender/python/generic/quat.c (+1, -2) (Diff)
/source/blender/python/generic/vector.c (+25, -18) (Diff)
/source/blender/python/generic/vector.h (+3, -3) (Diff)
/source/blender/python/intern/bpy_interface.c (+12, -1) (Diff)
/source/blender/python/intern/bpy_rna.c (+54, -10) (Diff)
/source/gameengine/Ketsji/KX_GameObject.cpp (+109, -31) (Diff)
/source/gameengine/Ketsji/KX_GameObject.h (+7, -14) (Diff)
Tehnyt: Miika HämäläinenViimeksi päivitetty: 07.11.2014 14:18MiikaH:n Sivut a.k.a. MiikaHweb | 2003-2021