diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2011-12-16 23:53:12 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2011-12-16 23:53:12 +0400 |
commit | 3311164b24da61f2967f96d0ee27508a7e2e0267 (patch) | |
tree | 0824417cf3d645f59d98b210c02a4c5ef6c05a48 /source/blender/makesrna/intern/rna_object.c | |
parent | 3c8ab559a5bd31fd38e9c5cf9da8505ca28f4887 (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/makesrna/intern/rna_object.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_object.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/makesrna/intern/rna_object.c b/source/blender/makesrna/intern/rna_object.c index f920cfb5aec..9109c8fc023 100644 --- a/source/blender/makesrna/intern/rna_object.c +++ b/source/blender/makesrna/intern/rna_object.c @@ -174,7 +174,7 @@ static void rna_Object_matrix_local_get(PointerRNA *ptr, float values[16]) if(ob->parent) { float invmat[4][4]; /* for inverse of parent's matrix */ invert_m4_m4(invmat, ob->parent->obmat); - mul_m4_m4m4((float(*)[4])values, ob->obmat, invmat); + mult_m4_m4m4((float(*)[4])values, invmat, ob->obmat); } else { copy_m4_m4((float(*)[4])values, ob->obmat); @@ -191,7 +191,7 @@ static void rna_Object_matrix_local_set(PointerRNA *ptr, const float values[16]) if(ob->parent) { float invmat[4][4]; invert_m4_m4(invmat, ob->parentinv); - mul_m4_m4m4(ob->obmat, (float(*)[4])values, invmat); + mult_m4_m4m4(ob->obmat, invmat, (float(*)[4])values); } else { copy_m4_m4(ob->obmat, (float(*)[4])values); |