Cleanup: use quat to eul w/ mathutils API
This commit is contained in:
@@ -108,15 +108,11 @@ static PyObject *Quaternion_to_euler(QuaternionObject *self, PyObject *args)
|
|||||||
normalize_qt_qt(tquat, self->quat);
|
normalize_qt_qt(tquat, self->quat);
|
||||||
|
|
||||||
if (eul_compat) {
|
if (eul_compat) {
|
||||||
float mat[3][3];
|
|
||||||
|
|
||||||
if (BaseMath_ReadCallback(eul_compat) == -1)
|
if (BaseMath_ReadCallback(eul_compat) == -1)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
quat_to_mat3(mat, tquat);
|
if (order == EULER_ORDER_XYZ) quat_to_compatible_eul(eul, eul_compat->eul, tquat);
|
||||||
|
else quat_to_compatible_eulO(eul, eul_compat->eul, order, tquat);
|
||||||
if (order == EULER_ORDER_XYZ) mat3_normalized_to_compatible_eul(eul, eul_compat->eul, mat);
|
|
||||||
else mat3_normalized_to_compatible_eulO(eul, eul_compat->eul, order, mat);
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (order == EULER_ORDER_XYZ) quat_to_eul(eul, tquat);
|
if (order == EULER_ORDER_XYZ) quat_to_eul(eul, tquat);
|
||||||
|
|||||||
Reference in New Issue
Block a user