Commit: 51e9a814c9f4d27ab4d67b3a9df9b23f44c92b3d
Author: Campbell Barton
Date: Sun Jul 5 22:33:44 2015 +1000
Branches: master
https://developer.blender.org/rB51e9a814c9f4d27ab4d67b3a9df9b23f44c92b3d
Correct vert-slide helper-line scale
Was invalid in perspective view
===================================================================
M source/blender/editors/transform/transform.c
===================================================================
diff --git a/source/blender/editors/transform/transform.c
b/source/blender/editors/transform/transform.c
index dcbc12f..16a1c9e 100644
--- a/source/blender/editors/transform/transform.c
+++ b/source/blender/editors/transform/transform.c
@@ -7273,13 +7273,17 @@ static void drawVertSlide(TransInfo *t)
if ((t->mval[0] != t->imval[0]) ||
(t->mval[1] != t->imval[1]))
{
- float zfac =
ED_view3d_calc_zfac(t->ar->regiondata, curr_sv->co_orig_3d, NULL);
+ float zfac;
float mval_ofs[2];
+ float co_orig_3d[3];
float co_dest_3d[3];
mval_ofs[0] = t->mval[0] - t->imval[0];
mval_ofs[1] = t->mval[1] - t->imval[1];
+ mul_v3_m4v3(co_orig_3d, t->obedit->obmat,
curr_sv->co_orig_3d);
+ zfac = ED_view3d_calc_zfac(t->ar->regiondata,
co_orig_3d, NULL);
+
ED_view3d_win_to_delta(t->ar, mval_ofs,
co_dest_3d, zfac);
invert_m4_m4(t->obedit->imat, t->obedit->obmat);
_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs