diff options
author | Gaia Clary <gaia.clary@machinimatrix.org> | 2018-02-16 18:58:20 +0300 |
---|---|---|
committer | Gaia Clary <gaia.clary@machinimatrix.org> | 2018-02-16 18:58:20 +0300 |
commit | 5bc2c17161cfc23ca2d8c58e7e24458c277100ae (patch) | |
tree | e08810f81e5b0fb30ebee622eb0522e40a11e94f /source/blender/collada | |
parent | e1a686e44448e8345d45041631fda84d4ee0d2fa (diff) |
fix:T50079 collada matrix and blender matrix are transposed. This was not regarded by the animation importer, so it was creating very odd results
Diffstat (limited to 'source/blender/collada')
-rw-r--r-- | source/blender/collada/AnimationImporter.cpp | 1 | ||||
-rw-r--r-- | source/blender/collada/collada_utils.cpp | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/collada/AnimationImporter.cpp b/source/blender/collada/AnimationImporter.cpp index bc91b94afd9..95543b2dc18 100644 --- a/source/blender/collada/AnimationImporter.cpp +++ b/source/blender/collada/AnimationImporter.cpp @@ -817,6 +817,7 @@ void AnimationImporter::apply_matrix_curves(Object *ob, std::vector<FCurve *>& a } float rot[4], loc[3], scale[3]; + transpose_m4(mat); bc_rotate_from_reference_quat(rot, qref, mat); copy_qt_qt(qref, rot); diff --git a/source/blender/collada/collada_utils.cpp b/source/blender/collada/collada_utils.cpp index 35bc643d3c7..415daccfa3d 100644 --- a/source/blender/collada/collada_utils.cpp +++ b/source/blender/collada/collada_utils.cpp @@ -403,7 +403,7 @@ void bc_rotate_from_reference_quat(float quat_to[4], float quat_from[4], float m mat4_to_quat(qd, matd); - mul_qt_qtqt(quat_to, quat_from, qd); // rot is the final rotation corresponding to mat_to + mul_qt_qtqt(quat_to, qd, quat_from); // rot is the final rotation corresponding to mat_to } void bc_triangulate_mesh(Mesh *me) |