diff options
author | Campbell Barton <ideasman42@gmail.com> | 2015-07-05 15:33:44 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2015-07-05 15:35:04 +0300 |
commit | 51e9a814c9f4d27ab4d67b3a9df9b23f44c92b3d (patch) | |
tree | 9291c7c49c0a303096d7b58c3acef0f5fedc0bee /source/blender | |
parent | 6022bfbc05ba4ae3c4a709b872c00f35f5ebe6be (diff) |
Correct vert-slide helper-line scale
Was invalid in perspective view
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/editors/transform/transform.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/source/blender/editors/transform/transform.c b/source/blender/editors/transform/transform.c index dcbc12f58d2..16a1c9ec40c 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); |