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/editors/mesh
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/editors/mesh')
-rw-r--r--source/blender/editors/mesh/editmesh_lib.c4
-rw-r--r--source/blender/editors/mesh/editmesh_tools.c2
-rw-r--r--source/blender/editors/mesh/meshtools.c2
3 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/editors/mesh/editmesh_lib.c b/source/blender/editors/mesh/editmesh_lib.c
index 845cc29c91b..5e8105d507a 100644
--- a/source/blender/editors/mesh/editmesh_lib.c
+++ b/source/blender/editors/mesh/editmesh_lib.c
@@ -1316,7 +1316,7 @@ static short extrudeflag_edge(Object *obedit, EditMesh *em, short UNUSED(flag),
if (mmd->mirror_ob) {
float imtx[4][4];
invert_m4_m4(imtx, mmd->mirror_ob->obmat);
- mul_m4_m4m4(mtx, obedit->obmat, imtx);
+ mult_m4_m4m4(mtx, imtx, obedit->obmat);
}
for (eed= em->edges.first; eed; eed= eed->next) {
@@ -1603,7 +1603,7 @@ short extrudeflag_vert(Object *obedit, EditMesh *em, short flag, float *nor, int
if (mmd->mirror_ob) {
float imtx[4][4];
invert_m4_m4(imtx, mmd->mirror_ob->obmat);
- mul_m4_m4m4(mtx, obedit->obmat, imtx);
+ mult_m4_m4m4(mtx, imtx, obedit->obmat);
}
for (eed= em->edges.first; eed; eed= eed->next) {
diff --git a/source/blender/editors/mesh/editmesh_tools.c b/source/blender/editors/mesh/editmesh_tools.c
index 2e5fc515330..37d3d5b587c 100644
--- a/source/blender/editors/mesh/editmesh_tools.c
+++ b/source/blender/editors/mesh/editmesh_tools.c
@@ -7246,7 +7246,7 @@ static int sort_faces_exec(bContext *C, wmOperator *op)
float cur[3];
if (event == 1)
- mul_m4_m4m4(mat, OBACT->obmat, rv3d->viewmat); /* apply the view matrix to the object matrix */
+ mult_m4_m4m4(mat, rv3d->viewmat, OBACT->obmat); /* apply the view matrix to the object matrix */
else if (event == 2) { /* sort from cursor */
if( v3d && v3d->localvd ) {
VECCOPY(cur, v3d->cursor);
diff --git a/source/blender/editors/mesh/meshtools.c b/source/blender/editors/mesh/meshtools.c
index 1022d247d68..dd82f055f14 100644
--- a/source/blender/editors/mesh/meshtools.c
+++ b/source/blender/editors/mesh/meshtools.c
@@ -327,7 +327,7 @@ int join_mesh_exec(bContext *C, wmOperator *op)
/* if this is the object we're merging into, no need to do anything */
if(base->object != ob) {
/* watch this: switch matmul order really goes wrong */
- mul_m4_m4m4(cmat, base->object->obmat, imat);
+ mult_m4_m4m4(cmat, imat, base->object->obmat);
/* transform vertex coordinates into new space */
for(a=0, mv=mvert; a < me->totvert; a++, mv++) {