diff options
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/blenkernel/intern/object.c | 2 | ||||
-rw-r--r-- | source/blender/blenlib/BLI_math_rotation.h | 6 | ||||
-rw-r--r-- | source/blender/blenlib/intern/math_rotation.c | 8 | ||||
-rw-r--r-- | source/blender/python/intern/bpy_rna.c | 4 | ||||
-rw-r--r-- | source/blender/python/mathutils/mathutils_Euler.c | 4 | ||||
-rw-r--r-- | source/blender/python/mathutils/mathutils_Euler.h | 4 | ||||
-rw-r--r-- | source/blender/python/mathutils/mathutils_Matrix.c | 2 |
7 files changed, 15 insertions, 15 deletions
diff --git a/source/blender/blenkernel/intern/object.c b/source/blender/blenkernel/intern/object.c index 914e19bd1dc..dfa3582cee8 100644 --- a/source/blender/blenkernel/intern/object.c +++ b/source/blender/blenkernel/intern/object.c @@ -1514,7 +1514,7 @@ void BKE_object_mat3_to_rot(Object *ob, float mat[][3], short use_compat) /* end drot correction */ if (use_compat) mat3_to_compatible_eulO(ob->rot, ob->rot, ob->rotmode, tmat); - else mat3_to_eulO(ob->rot, ob->rotmode, tmat); + else mat3_to_eulO(ob->rot, ob->rotmode, tmat); } } } diff --git a/source/blender/blenlib/BLI_math_rotation.h b/source/blender/blenlib/BLI_math_rotation.h index a40d4ca8463..64a6a6ec7d5 100644 --- a/source/blender/blenlib/BLI_math_rotation.h +++ b/source/blender/blenlib/BLI_math_rotation.h @@ -151,10 +151,10 @@ void mat3_to_eulO(float eul[3], const short order, float mat[3][3]); void mat4_to_eulO(float eul[3], const short order, float mat[4][4]); void axis_angle_to_eulO(float eul[3], const short order, const float axis[3], const float angle); -void mat3_to_compatible_eulO(float eul[3], float old[3], short order, float mat[3][3]); -void mat4_to_compatible_eulO(float eul[3], float old[3], short order, float mat[4][4]); +void mat3_to_compatible_eulO(float eul[3], float old[3], const short order, float mat[3][3]); +void mat4_to_compatible_eulO(float eul[3], float old[3], const short order, float mat[4][4]); -void rotate_eulO(float eul[3], short order, char axis, float angle); +void rotate_eulO(float eul[3], const short order, char axis, float angle); /******************************* Dual Quaternions ****************************/ diff --git a/source/blender/blenlib/intern/math_rotation.c b/source/blender/blenlib/intern/math_rotation.c index d44e26aad08..64fbfbf8a7d 100644 --- a/source/blender/blenlib/intern/math_rotation.c +++ b/source/blender/blenlib/intern/math_rotation.c @@ -1231,7 +1231,7 @@ void eulO_to_mat3(float M[3][3], const float e[3], const short order) } /* returns two euler calculation methods, so we can pick the best */ -static void mat3_to_eulo2(float M[3][3], float *e1, float *e2, short order) +static void mat3_to_eulo2(float M[3][3], float *e1, float *e2, const short order) { RotOrderInfo *R = GET_ROTATIONORDER_INFO(order); short i = R->axis[0], j = R->axis[1], k = R->axis[2]; @@ -1311,7 +1311,7 @@ void mat4_to_eulO(float e[3], const short order, float M[4][4]) } /* uses 2 methods to retrieve eulers, and picks the closest */ -void mat3_to_compatible_eulO(float eul[3], float oldrot[3], short order, float mat[3][3]) +void mat3_to_compatible_eulO(float eul[3], float oldrot[3], const short order, float mat[3][3]) { float eul1[3], eul2[3]; float d1, d2; @@ -1331,7 +1331,7 @@ void mat3_to_compatible_eulO(float eul[3], float oldrot[3], short order, float m copy_v3_v3(eul, eul1); } -void mat4_to_compatible_eulO(float eul[3], float oldrot[3], short order, float M[4][4]) +void mat4_to_compatible_eulO(float eul[3], float oldrot[3], const short order, float M[4][4]) { float m[3][3]; @@ -1343,7 +1343,7 @@ void mat4_to_compatible_eulO(float eul[3], float oldrot[3], short order, float M /* rotate the given euler by the given angle on the specified axis */ // NOTE: is this safe to do with different axis orders? -void rotate_eulO(float beul[3], short order, char axis, float ang) +void rotate_eulO(float beul[3], const short order, char axis, float ang) { float eul[3], mat1[3][3], mat2[3][3], totmat[3][3]; diff --git a/source/blender/python/intern/bpy_rna.c b/source/blender/python/intern/bpy_rna.c index bd660ae0001..4ae8e821298 100644 --- a/source/blender/python/intern/bpy_rna.c +++ b/source/blender/python/intern/bpy_rna.c @@ -369,7 +369,7 @@ static int deferred_register_prop(StructRNA *srna, PyObject *key, PyObject *item static PyObject *pyrna_prop_array_subscript_slice(BPy_PropertyArrayRNA *self, PointerRNA *ptr, PropertyRNA *prop, Py_ssize_t start, Py_ssize_t stop, Py_ssize_t length); -static short pyrna_rotation_euler_order_get(PointerRNA *ptr, PropertyRNA **prop_eul_order, short order_fallback); +static short pyrna_rotation_euler_order_get(PointerRNA *ptr, PropertyRNA **prop_eul_order, const short order_fallback); /* bpyrna vector/euler/quat callbacks */ static unsigned char mathutils_rna_array_cb_index = -1; /* index for our callbacks */ @@ -571,7 +571,7 @@ static Mathutils_Callback mathutils_rna_matrix_cb = { NULL }; -static short pyrna_rotation_euler_order_get(PointerRNA *ptr, PropertyRNA **prop_eul_order, short order_fallback) +static short pyrna_rotation_euler_order_get(PointerRNA *ptr, PropertyRNA **prop_eul_order, const short order_fallback) { /* attempt to get order */ if (*prop_eul_order == NULL) diff --git a/source/blender/python/mathutils/mathutils_Euler.c b/source/blender/python/mathutils/mathutils_Euler.c index 583831b1655..468ef3788c1 100644 --- a/source/blender/python/mathutils/mathutils_Euler.c +++ b/source/blender/python/mathutils/mathutils_Euler.c @@ -701,7 +701,7 @@ PyTypeObject euler_Type = { * (i.e. it was allocated elsewhere by MEM_mallocN()) * pass Py_NEW - if vector is not a WRAPPER and managed by PYTHON * (i.e. it must be created here with PyMEM_malloc())*/ -PyObject *Euler_CreatePyObject(float *eul, short order, int type, PyTypeObject *base_type) +PyObject *Euler_CreatePyObject(float *eul, const short order, int type, PyTypeObject *base_type) { EulerObject *self; @@ -738,7 +738,7 @@ PyObject *Euler_CreatePyObject(float *eul, short order, int type, PyTypeObject * return (PyObject *)self; } -PyObject *Euler_CreatePyObject_cb(PyObject *cb_user, short order, +PyObject *Euler_CreatePyObject_cb(PyObject *cb_user, const short order, unsigned char cb_type, unsigned char cb_subtype) { EulerObject *self = (EulerObject *)Euler_CreatePyObject(NULL, order, Py_NEW, NULL); diff --git a/source/blender/python/mathutils/mathutils_Euler.h b/source/blender/python/mathutils/mathutils_Euler.h index bcbc6c60ca7..e04d45e4630 100644 --- a/source/blender/python/mathutils/mathutils_Euler.h +++ b/source/blender/python/mathutils/mathutils_Euler.h @@ -48,8 +48,8 @@ typedef struct { * blender (stored in blend_data). This is an either/or struct not both */ //prototypes -PyObject *Euler_CreatePyObject(float *eul, short order, int type, PyTypeObject *base_type); -PyObject *Euler_CreatePyObject_cb(PyObject *cb_user, short order, +PyObject *Euler_CreatePyObject(float *eul, const short order, int type, PyTypeObject *base_type); +PyObject *Euler_CreatePyObject_cb(PyObject *cb_user, const short order, unsigned char cb_type, unsigned char cb_subtype); short euler_order_from_string(const char *str, const char *error_prefix); diff --git a/source/blender/python/mathutils/mathutils_Matrix.c b/source/blender/python/mathutils/mathutils_Matrix.c index d98c6e9d2fd..be519ded88e 100644 --- a/source/blender/python/mathutils/mathutils_Matrix.c +++ b/source/blender/python/mathutils/mathutils_Matrix.c @@ -995,7 +995,7 @@ static PyObject *Matrix_to_euler(MatrixObject *self, PyObject *args) if (eul_compat) { if (order == 1) mat3_to_compatible_eul(eul, eul_compatf, mat); - else mat3_to_compatible_eulO(eul, eul_compatf, order, mat); + else mat3_to_compatible_eulO(eul, eul_compatf, order, mat); } else { if (order == 1) mat3_to_eul(eul, mat); |