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/blenkernel/intern/mball.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/blenkernel/intern/mball.c')
-rw-r--r-- | source/blender/blenkernel/intern/mball.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/blenkernel/intern/mball.c b/source/blender/blenkernel/intern/mball.c index 0883ec121d6..57fc7473860 100644 --- a/source/blender/blenkernel/intern/mball.c +++ b/source/blender/blenkernel/intern/mball.c @@ -1679,7 +1679,7 @@ float init_meta(Scene *scene, Object *ob) /* return totsize */ temp2[3][1]= ml->y; temp2[3][2]= ml->z; - mul_m4_m4m4(temp1, temp3, temp2); + mult_m4_m4m4(temp1, temp2, temp3); /* make a copy because of duplicates */ mainb[a]= new_pgn_element(sizeof(MetaElem)); @@ -1691,9 +1691,9 @@ float init_meta(Scene *scene, Object *ob) /* return totsize */ /* mat is the matrix to transform from mball into the basis-mball */ invert_m4_m4(obinv, obmat); - mul_m4_m4m4(temp2, bob->obmat, obinv); + mult_m4_m4m4(temp2, obinv, bob->obmat); /* MetaBall transformation */ - mul_m4_m4m4(mat, temp1, temp2); + mult_m4_m4m4(mat, temp2, temp1); invert_m4_m4(imat,mat); |