diff options
Diffstat (limited to 'source/blender/editors/transform/transform_mode_vert_slide.c')
-rw-r--r-- | source/blender/editors/transform/transform_mode_vert_slide.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/source/blender/editors/transform/transform_mode_vert_slide.c b/source/blender/editors/transform/transform_mode_vert_slide.c index 0afc527d4a8..77c5707d814 100644 --- a/source/blender/editors/transform/transform_mode_vert_slide.c +++ b/source/blender/editors/transform/transform_mode_vert_slide.c @@ -146,9 +146,9 @@ static void calcVertSlideMouseActiveEdges(struct TransInfo *t, const int mval[2] * by finding the closest edge in local-space. * However this skews the outcome with non-uniform-scale. */ - /* first get the direction of the original mouse position */ + /* First get the direction of the original mouse position. */ sub_v2_v2v2(dir, imval_fl, mval_fl); - ED_view3d_win_to_delta(t->region, dir, dir, t->zfac); + ED_view3d_win_to_delta(t->region, dir, t->zfac, dir); normalize_v3(dir); for (i = 0, sv = sld->sv; i < sld->totsv; i++, sv++) { @@ -425,18 +425,18 @@ void drawVertSlide(TransInfo *t) /* direction from active vertex! */ if ((t->mval[0] != t->mouse.imval[0]) || (t->mval[1] != t->mouse.imval[1])) { float zfac; - float mval_ofs[2]; + float xy_delta[2]; float co_orig_3d[3]; float co_dest_3d[3]; - mval_ofs[0] = t->mval[0] - t->mouse.imval[0]; - mval_ofs[1] = t->mval[1] - t->mouse.imval[1]; + xy_delta[0] = t->mval[0] - t->mouse.imval[0]; + xy_delta[1] = t->mval[1] - t->mouse.imval[1]; mul_v3_m4v3( co_orig_3d, TRANS_DATA_CONTAINER_FIRST_OK(t)->obedit->obmat, curr_sv->co_orig_3d); - zfac = ED_view3d_calc_zfac(t->region->regiondata, co_orig_3d, NULL); + zfac = ED_view3d_calc_zfac(t->region->regiondata, co_orig_3d); - ED_view3d_win_to_delta(t->region, mval_ofs, co_dest_3d, zfac); + ED_view3d_win_to_delta(t->region, xy_delta, zfac, co_dest_3d); invert_m4_m4(TRANS_DATA_CONTAINER_FIRST_OK(t)->obedit->imat, TRANS_DATA_CONTAINER_FIRST_OK(t)->obedit->obmat); |