[Bf-blender-cvs] [4b46952] master: Fix vertex slide regression /w rotated objects

Campbell Barton noreply at git.blender.org
Mon Jun 1 03:27:49 CEST 2015


Commit: 4b4695223a7250be808135a527b6016cb0b90782
Author: Campbell Barton
Date:   Mon Jun 1 11:25:55 2015 +1000
Branches: master
https://developer.blender.org/rB4b4695223a7250be808135a527b6016cb0b90782

Fix vertex slide regression /w rotated objects

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

M	source/blender/editors/transform/transform.c

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

diff --git a/source/blender/editors/transform/transform.c b/source/blender/editors/transform/transform.c
index 43cee8b..28b0d97 100644
--- a/source/blender/editors/transform/transform.c
+++ b/source/blender/editors/transform/transform.c
@@ -6624,6 +6624,10 @@ static void calcVertSlideMouseActiveEdges(struct TransInfo *t, const int mval[2]
 	/* first get the direction of the original mouse position */
 	sub_v2_v2v2(dir, imval_fl, mval_fl);
 	ED_view3d_win_to_delta(t->ar, dir, dir, t->zfac);
+
+	invert_m4_m4(t->obedit->imat, t->obedit->obmat);
+	mul_mat3_m4_v3(t->obedit->imat, dir);
+
 	normalize_v3(dir);
 
 	for (i = 0, sv = sld->sv; i < sld->totsv; i++, sv++) {
@@ -6979,6 +6983,10 @@ static void drawVertSlide(TransInfo *t)
 				mval_ofs[1] = t->mval[1] - t->imval[1];
 
 				ED_view3d_win_to_delta(t->ar, mval_ofs, co_dest_3d, zfac);
+
+				invert_m4_m4(t->obedit->imat, t->obedit->obmat);
+				mul_mat3_m4_v3(t->obedit->imat, co_dest_3d);
+
 				add_v3_v3(co_dest_3d, curr_sv->co_orig_3d);
 
 				glLineWidth(1);




More information about the Bf-blender-cvs mailing list