diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2012-12-18 01:40:28 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2012-12-18 01:40:28 +0400 |
commit | 779375251c51fa843337d6340e7d14959e620abe (patch) | |
tree | 9d4830e900395d6db53b2c401dc6f906fff82e20 /source/blender/blenkernel/intern/object.c | |
parent | 593ae2c8f4abce2aab3a7a7b54322b9ab69710ff (diff) |
Fix #33487: game engine did not convert objects with rotation modes other than
Euler XYZ correctly, was never implemented;
Diffstat (limited to 'source/blender/blenkernel/intern/object.c')
-rw-r--r-- | source/blender/blenkernel/intern/object.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/source/blender/blenkernel/intern/object.c b/source/blender/blenkernel/intern/object.c index 20a718e83cd..56af4267ec7 100644 --- a/source/blender/blenkernel/intern/object.c +++ b/source/blender/blenkernel/intern/object.c @@ -1539,7 +1539,7 @@ void BKE_object_scale_to_mat3(Object *ob, float mat[3][3]) size_to_mat3(mat, vec); } -void BKE_object_rot_to_mat3(Object *ob, float mat[3][3]) +void BKE_object_rot_to_mat3(Object *ob, float mat[3][3], short use_drot) { float rmat[3][3], dmat[3][3]; @@ -1570,7 +1570,10 @@ void BKE_object_rot_to_mat3(Object *ob, float mat[3][3]) } /* combine these rotations */ - mul_m3_m3m3(mat, dmat, rmat); + if(use_drot) + mul_m3_m3m3(mat, dmat, rmat); + else + copy_m3_m3(mat, rmat); } void BKE_object_mat3_to_rot(Object *ob, float mat[3][3], short use_compat) @@ -1715,7 +1718,7 @@ void BKE_object_to_mat3(Object *ob, float mat[3][3]) /* no parent */ BKE_object_scale_to_mat3(ob, smat); /* rot */ - BKE_object_rot_to_mat3(ob, rmat); + BKE_object_rot_to_mat3(ob, rmat, TRUE); mul_m3_m3m3(mat, rmat, smat); } |