Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoseph Gilbert <ascotan@gmail.com>2004-05-11 12:26:44 +0400
committerJoseph Gilbert <ascotan@gmail.com>2004-05-11 12:26:44 +0400
commitf141aed9dc578aa12a04413b2def2cc1ab95ccb8 (patch)
tree9bd399b1e7fc4c2fe2fba86cd5a3fa6e14ca3881 /source/blender/python/api2_2x/Bone.h
parent404d9ab0a2d8cb4322602d7ce482e4a78aabe8b9 (diff)
- bugfix #1197 (New Bone.parent/child Access Destructive)
- a major redo of the Bone module - BPy_Bone structs are separated into Bone data and python vars. This is necessary for the correct memory allocation of bone data between python and the global armature list.
Diffstat (limited to 'source/blender/python/api2_2x/Bone.h')
-rw-r--r--source/blender/python/api2_2x/Bone.h39
1 files changed, 32 insertions, 7 deletions
diff --git a/source/blender/python/api2_2x/Bone.h b/source/blender/python/api2_2x/Bone.h
index 57ebb398104..06c1df3529e 100644
--- a/source/blender/python/api2_2x/Bone.h
+++ b/source/blender/python/api2_2x/Bone.h
@@ -24,7 +24,7 @@
*
* This is a new part of Blender.
*
- * Contributor(s): Jordi Rovira i Bonet
+ * Contributor(s): Jordi Rovira i Bonet, Joseph Gilbert
*
* ***** END GPL/BL DUAL LICENSE BLOCK *****
*/
@@ -34,18 +34,43 @@
#include <Python.h>
#include <DNA_armature_types.h>
+#include "vector.h"
+#include "quat.h"
+#include "matrix.h"
-/** Bone module initialization function. */
-PyObject *Bone_Init (void);
-
-/** Python BPy_Bone structure definition. */
+//--------------------------Python BPy_Bone structure definition.---------------------
typedef struct{
- PyObject_HEAD
- Bone *bone;
+ PyObject_HEAD
+ //reference to data if bone is linked to an armature
+ Bone *bone;
+ //list of vars that define the boneclass
+ char *name;
+ char *parent;
+ float roll;
+ int flag;
+ int boneclass;
+ float dist;
+ float weight;
+ VectorObject *head;
+ VectorObject *tail;
+ VectorObject *loc;
+ VectorObject *dloc;
+ VectorObject *size;
+ VectorObject *dsize;
+ QuaternionObject *quat;
+ QuaternionObject *dquat;
+ MatrixObject *obmat;
+ MatrixObject *parmat;
+ MatrixObject *defmat;
+ MatrixObject *irestmat;
+ MatrixObject *posemat;
}BPy_Bone;
+//------------------------------visible prototypes----------------------------------------------
PyObject *Bone_CreatePyObject (struct Bone *obj);
int Bone_CheckPyObject (PyObject * py_obj);
Bone *Bone_FromPyObject (PyObject * py_obj);
+PyObject *Bone_Init (void);
+int updateBoneData(BPy_Bone *self, Bone *parent);
#endif