diff options
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/blenlib/BLI_arithb.h | 6 | ||||
-rw-r--r-- | source/blender/blenlib/intern/arithb.c | 9 |
2 files changed, 15 insertions, 0 deletions
diff --git a/source/blender/blenlib/BLI_arithb.h b/source/blender/blenlib/BLI_arithb.h index 1fab2c68458..bb2c7f0ec83 100644 --- a/source/blender/blenlib/BLI_arithb.h +++ b/source/blender/blenlib/BLI_arithb.h @@ -155,6 +155,12 @@ Mat3ToEul( float *eul ); + void +Mat4ToEul( + float tmat[][4], + float *eul +); + void compatible_eul(float *eul, float *oldrot); void Mat3ToCompatibleEul(float mat[][3], float *eul, float *oldrot); diff --git a/source/blender/blenlib/intern/arithb.c b/source/blender/blenlib/intern/arithb.c index 3f687a9f780..40cf72f4242 100644 --- a/source/blender/blenlib/intern/arithb.c +++ b/source/blender/blenlib/intern/arithb.c @@ -2215,6 +2215,15 @@ void Mat3ToEul(float tmat[][3], float *eul) } } +void Mat4ToEul(float tmat[][4], float *eul) +{ + float tempMat[3][3]; + + Mat3CpyMat4 (tempMat, tmat); + Mat3Ortho(tempMat); + Mat3ToEul(tempMat, eul); +} + void QuatToEul( float *quat, float *eul) { float mat[3][3]; |