From 3311164b24da61f2967f96d0ee27508a7e2e0267 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Fri, 16 Dec 2011 19:53:12 +0000 Subject: 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 --- source/blender/editors/armature/editarmature.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source/blender/editors/armature') diff --git a/source/blender/editors/armature/editarmature.c b/source/blender/editors/armature/editarmature.c index 6dbb08e115f..48f3f78b849 100644 --- a/source/blender/editors/armature/editarmature.c +++ b/source/blender/editors/armature/editarmature.c @@ -936,7 +936,7 @@ int join_armature_exec(bContext *C, wmOperator *UNUSED(op)) /* Find the difference matrix */ invert_m4_m4(oimat, ob->obmat); - mul_m4_m4m4(mat, base->object->obmat, oimat); + mult_m4_m4m4(mat, oimat, base->object->obmat); /* Copy bones and posechannels from the object to the edit armature */ for (pchan=opose->chanbase.first; pchan; pchan=pchann) { @@ -972,7 +972,7 @@ int join_armature_exec(bContext *C, wmOperator *UNUSED(op)) /* Find the roll */ invert_m4_m4(imat, premat); - mul_m4_m4m4(difmat, postmat, imat); + mult_m4_m4m4(difmat, imat, postmat); curbone->roll -= (float)atan2(difmat[2][0], difmat[2][2]); } -- cgit v1.2.3