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:
authorCampbell Barton <ideasman42@gmail.com>2010-02-20 22:49:04 +0300
committerCampbell Barton <ideasman42@gmail.com>2010-02-20 22:49:04 +0300
commit02e7871149fb369a12725a319cb09accad7790b9 (patch)
treea089869d8044c79f3d3031923492393961eef53a /source/blender/python/generic/euler.h
parent65a4dafcff41f8575263095b62437f854bdeb2b4 (diff)
Mathutils API: Euler support for rotation order.
Examples. euler = Euler(1, 2, 3) euler.order = 'ZXY' euler = matrix.to_euler('XZY') Still missing rna support. this still wont give the right order, defaulting to XYZ. eul = object.rotation_euler
Diffstat (limited to 'source/blender/python/generic/euler.h')
-rw-r--r--source/blender/python/generic/euler.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/source/blender/python/generic/euler.h b/source/blender/python/generic/euler.h
index e9826814165..994a5f1780e 100644
--- a/source/blender/python/generic/euler.h
+++ b/source/blender/python/generic/euler.h
@@ -45,6 +45,8 @@ typedef struct {
unsigned char wrapped; /* wrapped data type? */
/* end BaseMathObject */
+ unsigned char order; /* rotation order */
+
} EulerObject;
/*struct data contains a pointer to the actual data that the
@@ -53,7 +55,10 @@ be stored in py_data) or be a wrapper for data allocated through
blender (stored in blend_data). This is an either/or struct not both*/
//prototypes
-PyObject *newEulerObject( float *eul, int type, PyTypeObject *base_type);
-PyObject *newEulerObject_cb(PyObject *cb_user, int cb_type, int cb_subtype);
+PyObject *newEulerObject( float *eul, short order, int type, PyTypeObject *base_type);
+PyObject *newEulerObject_cb(PyObject *cb_user, short order, int cb_type, int cb_subtype);
+
+short euler_order_from_string(const char *str, const char *error_prefix);
+
#endif /* EXPP_euler_h */