Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2011-12-16 23:53:12 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2011-12-16 23:53:12 +0400
commit3311164b24da61f2967f96d0ee27508a7e2e0267 (patch)
tree0824417cf3d645f59d98b210c02a4c5ef6c05a48 /source/blender/collada/AnimationImporter.cpp
parent3c8ab559a5bd31fd38e9c5cf9da8505ca28f4887 (diff)
Math lib: matrix multiplication order fix for two functions that were
inconsistent with similar functions & math notation: mul_m4_m4m4(R, B, A) => mult_m4_m4m4(R, A, B) mul_m3_m3m4(R, B, A) => mult_m3_m3m4(R, A, B) For branch maintainers, it should be relatively simple to fix things manually, it's also possible run this script after merging to do automatic replacement: http://www.pasteall.org/27459/python
Diffstat (limited to 'source/blender/collada/AnimationImporter.cpp')
-rw-r--r--source/blender/collada/AnimationImporter.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/source/blender/collada/AnimationImporter.cpp b/source/blender/collada/AnimationImporter.cpp
index 9b4e47615f7..c47e024aba4 100644
--- a/source/blender/collada/AnimationImporter.cpp
+++ b/source/blender/collada/AnimationImporter.cpp
@@ -723,7 +723,7 @@ void AnimationImporter::apply_matrix_curves( Object * ob, std::vector<FCurve*>&
// calc M
calc_joint_parent_mat_rest(par, NULL, root, node);
- mul_m4_m4m4(temp, matfra, par);
+ mult_m4_m4m4(temp, par, matfra);
// evaluate_joint_world_transform_at_frame(temp, NULL, , node, fra);
@@ -1276,7 +1276,7 @@ Object *AnimationImporter::translate_animation_OLD(COLLADAFW::Node *node,
// calc M
calc_joint_parent_mat_rest(par, NULL, root, node);
- mul_m4_m4m4(temp, matfra, par);
+ mult_m4_m4m4(temp, par, matfra);
// evaluate_joint_world_transform_at_frame(temp, NULL, , node, fra);
@@ -1434,7 +1434,7 @@ void AnimationImporter::evaluate_transform_at_frame(float mat[4][4], COLLADAFW::
float temp[4][4];
copy_m4_m4(temp, mat);
- mul_m4_m4m4(mat, m, temp);
+ mult_m4_m4m4(mat, temp, m);
}
}
@@ -1597,7 +1597,7 @@ void AnimationImporter::get_joint_rest_mat(float mat[4][4], COLLADAFW::Node *roo
calc_joint_parent_mat_rest(par, NULL, root, node);
get_node_mat(m, node, NULL, NULL);
- mul_m4_m4m4(mat, m, par);
+ mult_m4_m4m4(mat, par, m);
}
}
@@ -1616,7 +1616,7 @@ bool AnimationImporter::calc_joint_parent_mat_rest(float mat[4][4], float par[4]
if (par) {
float temp[4][4];
get_node_mat(temp, node, NULL, NULL);
- mul_m4_m4m4(m, temp, par);
+ mult_m4_m4m4(m, par, temp);
}
else {
get_node_mat(m, node, NULL, NULL);
@@ -1656,7 +1656,7 @@ Object *AnimationImporter::get_joint_object(COLLADAFW::Node *root, COLLADAFW::No
float temp[4][4], ipar[4][4];
invert_m4_m4(ipar, par_job->obmat);
copy_m4_m4(temp, mat);
- mul_m4_m4m4(mat, temp, ipar);
+ mult_m4_m4m4(mat, ipar, temp);
}
TransformBase::decompose(mat, job->loc, NULL, job->quat, job->size);
@@ -1689,7 +1689,7 @@ bool AnimationImporter::evaluate_joint_world_transform_at_frame(float mat[4][4],
if (par) {
float temp[4][4];
evaluate_transform_at_frame(temp, node, node == end ? fra : 0.0f);
- mul_m4_m4m4(m, temp, par);
+ mult_m4_m4m4(m, par, temp);
}
else {
evaluate_transform_at_frame(m, node, node == end ? fra : 0.0f);