[Bf-blender-cvs] [8fb2e46193e] master: Edit Mesh: click extrude, ensure inverse matrix

Campbell Barton noreply at git.blender.org
Sat Oct 14 10:04:09 CEST 2017


Commit: 8fb2e46193ecac0c29f99475cecc2fb328629e8c
Author: Campbell Barton
Date:   Sat Oct 14 18:43:02 2017 +1100
Branches: master
https://developer.blender.org/rB8fb2e46193ecac0c29f99475cecc2fb328629e8c

Edit Mesh: click extrude, ensure inverse matrix

Relied on this being set elsewhere which isn't assured.

===================================================================

M	source/blender/editors/mesh/editmesh_extrude.c

===================================================================

diff --git a/source/blender/editors/mesh/editmesh_extrude.c b/source/blender/editors/mesh/editmesh_extrude.c
index 0f1badd93cd..99e8e0809b1 100644
--- a/source/blender/editors/mesh/editmesh_extrude.c
+++ b/source/blender/editors/mesh/editmesh_extrude.c
@@ -512,6 +512,8 @@ static int edbm_dupli_extrude_cursor_invoke(bContext *C, wmOperator *op, const w
 
 	em_setup_viewcontext(C, &vc);
 
+	invert_m4_m4(vc.obedit->imat, vc.obedit->obmat);
+
 	ED_view3d_init_mats_rv3d(vc.obedit, vc.rv3d);
 
 	use_proj = ((vc.scene->toolsettings->snap_flag & SCE_SNAP) &&
@@ -635,7 +637,6 @@ static int edbm_dupli_extrude_cursor_invoke(bContext *C, wmOperator *op, const w
 		copy_v3_v3(min, curs);
 		ED_view3d_win_to_3d_int(vc.v3d, vc.ar, min, event->mval, min);
 
-		invert_m4_m4(vc.obedit->imat, vc.obedit->obmat);
 		mul_m4_v3(vc.obedit->imat, min); // back in object space
 		
 		EDBM_op_init(vc.em, &bmop, op, "create_vert co=%v", min);



More information about the Bf-blender-cvs mailing list