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/editors | |
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/editors')
21 files changed, 45 insertions, 45 deletions
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]); } diff --git a/source/blender/editors/curve/editcurve.c b/source/blender/editors/curve/editcurve.c index a679fa3e2bf..762564c1cc9 100644 --- a/source/blender/editors/curve/editcurve.c +++ b/source/blender/editors/curve/editcurve.c @@ -6056,7 +6056,7 @@ int join_curve_exec(bContext *C, wmOperator *UNUSED(op)) if(cu->nurb.first) { /* watch it: switch order here really goes wrong */ - mul_m4_m4m4(cmat, base->object->obmat, imat); + mult_m4_m4m4(cmat, imat, base->object->obmat); nu= cu->nurb.first; while(nu) { 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++) { diff --git a/source/blender/editors/object/object_constraint.c b/source/blender/editors/object/object_constraint.c index 2a45a7df735..796ca01a6a9 100644 --- a/source/blender/editors/object/object_constraint.c +++ b/source/blender/editors/object/object_constraint.c @@ -747,7 +747,7 @@ static int childof_set_inverse_exec (bContext *C, wmOperator *op) * the effect of the constraint */ invert_m4_m4(imat, pchan->pose_mat); - mul_m4_m4m4(tmat, imat, pmat); + mult_m4_m4m4(tmat, pmat, imat); invert_m4_m4(data->invmat, tmat); /* 5. restore constraints */ diff --git a/source/blender/editors/object/object_hook.c b/source/blender/editors/object/object_hook.c index 773974d0cc0..7bb91c1fc4b 100644 --- a/source/blender/editors/object/object_hook.c +++ b/source/blender/editors/object/object_hook.c @@ -646,7 +646,7 @@ static int object_hook_reset_exec(bContext *C, wmOperator *op) float imat[4][4], mat[4][4]; /* calculate the world-space matrix for the pose-channel target first, then carry on as usual */ - mul_m4_m4m4(mat, pchan->pose_mat, hmd->object->obmat); + mult_m4_m4m4(mat, hmd->object->obmat, pchan->pose_mat); invert_m4_m4(imat, mat); mul_serie_m4(hmd->parentinv, imat, ob->obmat, NULL, NULL, NULL, NULL, NULL, NULL); diff --git a/source/blender/editors/sculpt_paint/paint_image.c b/source/blender/editors/sculpt_paint/paint_image.c index 060cae48fa0..3aefe5f9ea3 100644 --- a/source/blender/editors/sculpt_paint/paint_image.c +++ b/source/blender/editors/sculpt_paint/paint_image.c @@ -3087,8 +3087,8 @@ static void project_paint_begin(ProjPaintState *ps) } /* same as view3d_get_object_project_mat */ - mul_m4_m4m4(vmat, ps->ob->obmat, viewmat); - mul_m4_m4m4(ps->projectMat, vmat, winmat); + mult_m4_m4m4(vmat, viewmat, ps->ob->obmat); + mult_m4_m4m4(ps->projectMat, winmat, vmat); } diff --git a/source/blender/editors/sculpt_paint/paint_vertex.c b/source/blender/editors/sculpt_paint/paint_vertex.c index 5706633d138..a5da5938f82 100644 --- a/source/blender/editors/sculpt_paint/paint_vertex.c +++ b/source/blender/editors/sculpt_paint/paint_vertex.c @@ -1930,7 +1930,7 @@ static int wpaint_stroke_test_start(bContext *C, wmOperator *op, wmEvent *UNUSED } /* imat for normals */ - mul_m4_m4m4(mat, ob->obmat, wpd->vc.rv3d->viewmat); + mult_m4_m4m4(mat, wpd->vc.rv3d->viewmat, ob->obmat); invert_m4_m4(imat, mat); copy_m3_m4(wpd->wpimat, imat); @@ -1980,7 +1980,7 @@ static void wpaint_stroke_update_step(bContext *C, struct PaintStroke *stroke, P view3d_operator_needs_opengl(C); /* load projection matrix */ - mul_m4_m4m4(mat, ob->obmat, vc->rv3d->persmat); + mult_m4_m4m4(mat, vc->rv3d->persmat, ob->obmat); pressure = RNA_float_get(itemptr, "pressure"); RNA_float_get_array(itemptr, "mouse", mval); @@ -2361,7 +2361,7 @@ static int vpaint_stroke_test_start(bContext *C, struct wmOperator *op, wmEvent copy_vpaint_prev(vp, (unsigned int *)me->mcol, me->totface); /* some old cruft to sort out later */ - mul_m4_m4m4(mat, ob->obmat, vpd->vc.rv3d->viewmat); + mult_m4_m4m4(mat, vpd->vc.rv3d->viewmat, ob->obmat); invert_m4_m4(imat, mat); copy_m3_m4(vpd->vpimat, imat); @@ -2423,7 +2423,7 @@ static void vpaint_stroke_update_step(bContext *C, struct PaintStroke *stroke, P view3d_operator_needs_opengl(C); /* load projection matrix */ - mul_m4_m4m4(mat, ob->obmat, vc->rv3d->persmat); + mult_m4_m4m4(mat, vc->rv3d->persmat, ob->obmat); mval[0]-= vc->ar->winrct.xmin; mval[1]-= vc->ar->winrct.ymin; diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c index b84fea29e62..4cd95dca9f9 100644 --- a/source/blender/editors/sculpt_paint/sculpt.c +++ b/source/blender/editors/sculpt_paint/sculpt.c @@ -2121,7 +2121,7 @@ static void do_clay_tubes_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int to copy_v3_v3(mat[3], ss->cache->location); mat[3][3] = 1; normalize_m4(mat); scale_m4_fl(scale, ss->cache->radius); - mul_m4_m4m4(tmat, scale, mat); + mult_m4_m4m4(tmat, mat, scale); invert_m4_m4(mat, tmat); #pragma omp parallel for schedule(guided) if (sd->flags & SCULPT_USE_OPENMP) diff --git a/source/blender/editors/space_clip/tracking_ops.c b/source/blender/editors/space_clip/tracking_ops.c index b0e7f1b4def..8a11c881527 100644 --- a/source/blender/editors/space_clip/tracking_ops.c +++ b/source/blender/editors/space_clip/tracking_ops.c @@ -2005,7 +2005,7 @@ static void set_axis(Scene *scene, Object *ob, MovieTrackingTrack *track, char invert_m4(mat); object_to_mat4(ob, obmat); - mul_m4_m4m4(mat, obmat, mat); + mult_m4_m4m4(mat, mat, obmat); object_apply_mat4(ob, mat, 0, 0); } @@ -2073,14 +2073,14 @@ static int set_floor_exec(bContext *C, wmOperator *op) invert_m4(mat); object_to_mat4(parent, obmat); - mul_m4_m4m4(mat, obmat, mat); - mul_m4_m4m4(newmat, mat, rot); + mult_m4_m4m4(mat, mat, obmat); + mult_m4_m4m4(newmat, rot, mat); object_apply_mat4(parent, newmat, 0, 0); /* make camera have positive z-coordinate */ if(parent->loc[2]<0) { invert_m4(rot); - mul_m4_m4m4(newmat, mat, rot); + mult_m4_m4m4(newmat, rot, mat); object_apply_mat4(parent, newmat, 0, 0); } diff --git a/source/blender/editors/space_view3d/drawobject.c b/source/blender/editors/space_view3d/drawobject.c index b3eba8652b0..273336b78f1 100644 --- a/source/blender/editors/space_view3d/drawobject.c +++ b/source/blender/editors/space_view3d/drawobject.c @@ -4020,7 +4020,7 @@ static void draw_new_particle_system(Scene *scene, View3D *v3d, RegionView3D *rv if( (base->flag & OB_FROMDUPLI) && (ob->flag & OB_FROMGROUP) ) { float mat[4][4]; - mul_m4_m4m4(mat, psys->imat, ob->obmat); + mult_m4_m4m4(mat, ob->obmat, psys->imat); glMultMatrixf(mat); } diff --git a/source/blender/editors/space_view3d/space_view3d.c b/source/blender/editors/space_view3d/space_view3d.c index c493e4af944..cac5d856652 100644 --- a/source/blender/editors/space_view3d/space_view3d.c +++ b/source/blender/editors/space_view3d/space_view3d.c @@ -204,8 +204,8 @@ ARegion *ED_view3d_context_region_unlock(bContext *C) void ED_view3d_init_mats_rv3d(struct Object *ob, struct RegionView3D *rv3d) { /* local viewmat and persmat, to calculate projections */ - mul_m4_m4m4(rv3d->viewmatob, ob->obmat, rv3d->viewmat); - mul_m4_m4m4(rv3d->persmatob, ob->obmat, rv3d->persmat); + mult_m4_m4m4(rv3d->viewmatob, rv3d->viewmat, ob->obmat); + mult_m4_m4m4(rv3d->persmatob, rv3d->persmat, ob->obmat); /* initializes object space clipping, speeds up clip tests */ ED_view3d_local_clipping(rv3d, ob->obmat); diff --git a/source/blender/editors/space_view3d/view3d_draw.c b/source/blender/editors/space_view3d/view3d_draw.c index 3f979787a1f..80b7522d1a3 100644 --- a/source/blender/editors/space_view3d/view3d_draw.c +++ b/source/blender/editors/space_view3d/view3d_draw.c @@ -1993,7 +1993,7 @@ void draw_depth_gpencil(Scene *scene, ARegion *ar, View3D *v3d) setwinmatrixview3d(ar, v3d, NULL); /* 0= no pick rect */ setviewmatrixview3d(scene, v3d, rv3d); /* note: calls where_is_object for camera... */ - mul_m4_m4m4(rv3d->persmat, rv3d->viewmat, rv3d->winmat); + mult_m4_m4m4(rv3d->persmat, rv3d->winmat, rv3d->viewmat); invert_m4_m4(rv3d->persinv, rv3d->persmat); invert_m4_m4(rv3d->viewinv, rv3d->viewmat); @@ -2028,7 +2028,7 @@ void draw_depth(Scene *scene, ARegion *ar, View3D *v3d, int (* func)(void *)) setwinmatrixview3d(ar, v3d, NULL); /* 0= no pick rect */ setviewmatrixview3d(scene, v3d, rv3d); /* note: calls where_is_object for camera... */ - mul_m4_m4m4(rv3d->persmat, rv3d->viewmat, rv3d->winmat); + mult_m4_m4m4(rv3d->persmat, rv3d->winmat, rv3d->viewmat); invert_m4_m4(rv3d->persinv, rv3d->persmat); invert_m4_m4(rv3d->viewinv, rv3d->viewmat); @@ -2219,7 +2219,7 @@ static void gpu_update_lamps_shadows(Scene *scene, View3D *v3d) copy_m4_m4(rv3d.winmat, winmat); copy_m4_m4(rv3d.viewmat, viewmat); invert_m4_m4(rv3d.viewinv, rv3d.viewmat); - mul_m4_m4m4(rv3d.persmat, rv3d.viewmat, rv3d.winmat); + mult_m4_m4m4(rv3d.persmat, rv3d.winmat, rv3d.viewmat); invert_m4_m4(rv3d.persinv, rv3d.viewinv); ED_view3d_draw_offscreen(scene, v3d, &ar, winsize, winsize, viewmat, winmat); @@ -2301,7 +2301,7 @@ static void view3d_main_area_setup_view(Scene *scene, View3D *v3d, ARegion *ar, setviewmatrixview3d(scene, v3d, rv3d); /* note: calls where_is_object for camera... */ /* update utilitity matrices */ - mul_m4_m4m4(rv3d->persmat, rv3d->viewmat, rv3d->winmat); + mult_m4_m4m4(rv3d->persmat, rv3d->winmat, rv3d->viewmat); invert_m4_m4(rv3d->persinv, rv3d->persmat); invert_m4_m4(rv3d->viewinv, rv3d->viewmat); @@ -2555,7 +2555,7 @@ ImBuf *ED_view3d_draw_offscreen_imbuf_simple(Scene *scene, Object *camera, int w v3d.lens= params.lens; } - mul_m4_m4m4(rv3d.persmat, rv3d.viewmat, rv3d.winmat); + mult_m4_m4m4(rv3d.persmat, rv3d.winmat, rv3d.viewmat); invert_m4_m4(rv3d.persinv, rv3d.viewinv); return ED_view3d_draw_offscreen_imbuf(scene, &v3d, &ar, width, height, flag, err_out); diff --git a/source/blender/editors/space_view3d/view3d_edit.c b/source/blender/editors/space_view3d/view3d_edit.c index 6d2a745fd67..fa970f7f9d8 100644 --- a/source/blender/editors/space_view3d/view3d_edit.c +++ b/source/blender/editors/space_view3d/view3d_edit.c @@ -116,9 +116,9 @@ int ED_view3d_camera_lock_sync(View3D *v3d, RegionView3D *rv3d) ED_view3d_to_m4(view_mat, rv3d->ofs, rv3d->viewquat, rv3d->dist); invert_m4_m4(v3d->camera->imat, v3d->camera->obmat); - mul_m4_m4m4(diff_mat, v3d->camera->imat, view_mat); + mult_m4_m4m4(diff_mat, view_mat, v3d->camera->imat); - mul_m4_m4m4(parent_mat, root_parent->obmat, diff_mat); + mult_m4_m4m4(parent_mat, diff_mat, root_parent->obmat); object_tfm_protected_backup(root_parent, &obtfm); object_apply_mat4(root_parent, parent_mat, TRUE, FALSE); diff --git a/source/blender/editors/space_view3d/view3d_fly.c b/source/blender/editors/space_view3d/view3d_fly.c index 0cdb7a19995..981d46774dc 100644 --- a/source/blender/editors/space_view3d/view3d_fly.c +++ b/source/blender/editors/space_view3d/view3d_fly.c @@ -663,8 +663,8 @@ static void move_camera(bContext* C, RegionView3D* rv3d, FlyInfo* fly, int orien ED_view3d_to_m4(prev_view_mat, fly->rv3d->ofs, fly->rv3d->viewquat, fly->rv3d->dist); invert_m4_m4(prev_view_imat, prev_view_mat); ED_view3d_to_m4(view_mat, rv3d->ofs, rv3d->viewquat, rv3d->dist); - mul_m4_m4m4(diff_mat, prev_view_imat, view_mat); - mul_m4_m4m4(parent_mat, fly->root_parent->obmat, diff_mat); + mult_m4_m4m4(diff_mat, view_mat, prev_view_imat); + mult_m4_m4m4(parent_mat, diff_mat, fly->root_parent->obmat); object_apply_mat4(fly->root_parent, parent_mat, TRUE, FALSE); // where_is_object(scene, fly->root_parent); diff --git a/source/blender/editors/space_view3d/view3d_select.c b/source/blender/editors/space_view3d/view3d_select.c index 33f7acf2a37..1be19f14618 100644 --- a/source/blender/editors/space_view3d/view3d_select.c +++ b/source/blender/editors/space_view3d/view3d_select.c @@ -141,7 +141,7 @@ void view3d_get_transformation(ARegion *ar, RegionView3D *rv3d, Object *ob, bglM int i, j; if (ob) { - mul_m4_m4m4(cpy, ob->obmat, rv3d->viewmat); + mult_m4_m4m4(cpy, rv3d->viewmat, ob->obmat); } else { copy_m4_m4(cpy, rv3d->viewmat); } diff --git a/source/blender/editors/space_view3d/view3d_view.c b/source/blender/editors/space_view3d/view3d_view.c index 89f859d0976..4d98afc4c10 100644 --- a/source/blender/editors/space_view3d/view3d_view.c +++ b/source/blender/editors/space_view3d/view3d_view.c @@ -740,8 +740,8 @@ void ED_view3d_ob_project_mat_get(RegionView3D *rv3d, Object *ob, float pmat[4][ { float vmat[4][4]; - mul_m4_m4m4(vmat, ob->obmat, rv3d->viewmat); - mul_m4_m4m4(pmat, vmat, rv3d->winmat); + mult_m4_m4m4(vmat, rv3d->viewmat, ob->obmat); + mult_m4_m4m4(pmat, rv3d->winmat, vmat); } #if 0 @@ -809,7 +809,7 @@ int ED_view3d_boundbox_clip(RegionView3D *rv3d, float obmat[][4], BoundBox *bb) if(bb==NULL) return 1; if(bb->flag & OB_BB_DISABLED) return 1; - mul_m4_m4m4(mat, obmat, rv3d->persmat); + mult_m4_m4m4(mat, rv3d->persmat, obmat); for(a=0; a<8; a++) { copy_v3_v3(vec, bb->vec[a]); @@ -1196,7 +1196,7 @@ short view3d_opengl_select(ViewContext *vc, unsigned int *buffer, unsigned int b } setwinmatrixview3d(ar, v3d, &rect); - mul_m4_m4m4(vc->rv3d->persmat, vc->rv3d->viewmat, vc->rv3d->winmat); + mult_m4_m4m4(vc->rv3d->persmat, vc->rv3d->winmat, vc->rv3d->viewmat); if(v3d->drawtype > OB_WIRE) { v3d->zbuf= TRUE; @@ -1274,7 +1274,7 @@ short view3d_opengl_select(ViewContext *vc, unsigned int *buffer, unsigned int b G.f &= ~G_PICKSEL; setwinmatrixview3d(ar, v3d, NULL); - mul_m4_m4m4(vc->rv3d->persmat, vc->rv3d->viewmat, vc->rv3d->winmat); + mult_m4_m4m4(vc->rv3d->persmat, vc->rv3d->winmat, vc->rv3d->viewmat); if(v3d->drawtype > OB_WIRE) { v3d->zbuf= 0; diff --git a/source/blender/editors/transform/transform_conversions.c b/source/blender/editors/transform/transform_conversions.c index 802e6cd7374..fd74458b953 100644 --- a/source/blender/editors/transform/transform_conversions.c +++ b/source/blender/editors/transform/transform_conversions.c @@ -441,14 +441,14 @@ static short apply_targetless_ik(Object *ob) offs_bone[3][0]= offs_bone[3][1]= offs_bone[3][2]= 0.0f; mul_m4_v3(parchan->parent->pose_mat, rmat[3]); - mul_m4_m4m4(tmat, offs_bone, rmat); + mult_m4_m4m4(tmat, rmat, offs_bone); } else if(parchan->bone->flag & BONE_NO_SCALE) { - mul_m4_m4m4(tmat, offs_bone, parchan->parent->pose_mat); + mult_m4_m4m4(tmat, parchan->parent->pose_mat, offs_bone); normalize_m4(tmat); } else - mul_m4_m4m4(tmat, offs_bone, parchan->parent->pose_mat); + mult_m4_m4m4(tmat, parchan->parent->pose_mat, offs_bone); invert_m4_m4(imat, tmat); } @@ -459,7 +459,7 @@ static short apply_targetless_ik(Object *ob) invert_m4_m4(imat, tmat); } /* result matrix */ - mul_m4_m4m4(rmat, parchan->pose_mat, imat); + mult_m4_m4m4(rmat, imat, parchan->pose_mat); /* apply and decompose, doesn't work for constraints or non-uniform scale well */ { diff --git a/source/blender/editors/transform/transform_generics.c b/source/blender/editors/transform/transform_generics.c index d0857958a4b..e7e1ee43c5d 100644 --- a/source/blender/editors/transform/transform_generics.c +++ b/source/blender/editors/transform/transform_generics.c @@ -171,7 +171,7 @@ static void clipMirrorModifier(TransInfo *t, Object *ob) float obinv[4][4]; invert_m4_m4(obinv, mmd->mirror_ob->obmat); - mul_m4_m4m4(mtx, ob->obmat, obinv); + mult_m4_m4m4(mtx, obinv, ob->obmat); invert_m4_m4(imtx, mtx); } diff --git a/source/blender/editors/transform/transform_manipulator.c b/source/blender/editors/transform/transform_manipulator.c index 63495d54cf1..5578ea754df 100644 --- a/source/blender/editors/transform/transform_manipulator.c +++ b/source/blender/editors/transform/transform_manipulator.c @@ -1564,7 +1564,7 @@ static int manipulator_selectbuf(ScrArea *sa, ARegion *ar, const int mval[2], fl rect.ymax= mval[1]+hotspot; setwinmatrixview3d(ar, v3d, &rect); - mul_m4_m4m4(rv3d->persmat, rv3d->viewmat, rv3d->winmat); + mult_m4_m4m4(rv3d->persmat, rv3d->winmat, rv3d->viewmat); glSelectBuffer( 64, buffer); glRenderMode(GL_SELECT); @@ -1586,7 +1586,7 @@ static int manipulator_selectbuf(ScrArea *sa, ARegion *ar, const int mval[2], fl G.f &= ~G_PICKSEL; setwinmatrixview3d(ar, v3d, NULL); - mul_m4_m4m4(rv3d->persmat, rv3d->viewmat, rv3d->winmat); + mult_m4_m4m4(rv3d->persmat, rv3d->winmat, rv3d->viewmat); if(hits==1) return buffer[3]; else if(hits>1) { |