Fix transform snap mixed with incremental

The incremental was taking priority but the other elements are mandatory.
This commit is contained in:
Germano Cavalcante 2020-11-27 10:51:33 -03:00
parent f9e994d0f4
commit e4e7dfc1d8
Notes: blender-bot 2023-02-14 02:13:08 +01:00
Referenced by issue #83216, Potential candidates for corrective releases
2 changed files with 4 additions and 2 deletions

View File

@ -214,8 +214,10 @@ static void applyRotation(TransInfo *t, const int UNUSED(mval[2]))
final = large_rotation_limit(final);
}
else {
transform_snap_increment(t, &final);
applySnapping(t, &final);
if (!(activeSnap(t) && validSnap(t))) {
transform_snap_increment(t, &final);
}
}
t->values_final[0] = final;

View File

@ -389,7 +389,7 @@ static void applyTranslation(TransInfo *t, const int UNUSED(mval[2]))
float incr_dir[3];
mul_v3_m3v3(incr_dir, t->spacemtx_inv, global_dir);
if (transform_snap_increment(t, incr_dir)) {
if (!(activeSnap(t) && validSnap(t)) && transform_snap_increment(t, incr_dir)) {
mul_v3_m3v3(incr_dir, t->spacemtx, incr_dir);
/* Test for mixed snap with grid. */