forked from bartvdbraak/blender
Fix vertex slide regression w/ rotated objects
This could only be done with certain rotations.
This commit is contained in:
parent
2b5e150db0
commit
c702dabc3d
@ -6918,13 +6918,13 @@ static void calcVertSlideMouseActiveEdges(struct TransInfo *t, const int mval[2]
|
||||
TransDataVertSlideVert *sv;
|
||||
int i;
|
||||
|
||||
/* note: we could save a matrix-multiply for each vertex
|
||||
* 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 */
|
||||
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++) {
|
||||
@ -6938,6 +6938,7 @@ static void calcVertSlideMouseActiveEdges(struct TransInfo *t, const int mval[2]
|
||||
float dir_dot;
|
||||
|
||||
sub_v3_v3v3(tdir, sv->co_orig_3d, sv->co_link_orig_3d[j]);
|
||||
mul_mat3_m4_v3(t->obedit->obmat, tdir);
|
||||
project_plane_v3_v3v3(tdir, tdir, t->viewinv[2]);
|
||||
|
||||
normalize_v3(tdir);
|
||||
|
Loading…
Reference in New Issue
Block a user