From 02e7871149fb369a12725a319cb09accad7790b9 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sat, 20 Feb 2010 19:49:04 +0000 Subject: 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 --- source/blender/python/generic/euler.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'source/blender/python/generic/euler.h') 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 */ -- cgit v1.2.3