[Bf-blender-cvs] [5bc2c17161c] master: fix:T50079 collada matrix and blender matrix are transposed. This was not regarded by the animation importer, so it was creating very odd results

Gaia Clary noreply at git.blender.org
Fri Feb 16 16:58:48 CET 2018


Commit: 5bc2c17161cfc23ca2d8c58e7e24458c277100ae
Author: Gaia Clary
Date:   Fri Feb 16 16:58:20 2018 +0100
Branches: master
https://developer.blender.org/rB5bc2c17161cfc23ca2d8c58e7e24458c277100ae

fix:T50079 collada matrix and blender matrix are transposed. This was not regarded by the animation importer, so it was creating very odd results

===================================================================

M	source/blender/collada/AnimationImporter.cpp
M	source/blender/collada/collada_utils.cpp

===================================================================

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)



More information about the Bf-blender-cvs mailing list