Fix T61945: Scaling with invalid snap distances

ApplySnapResize did not take into account invalid distances. Added check for this.

Reviewed By: Campbell Barton

Differential Revision: https://developer.blender.org/D4417
This commit is contained in:
Sebastian Parborg 2019-02-27 09:28:15 +01:00
parent 4732f90a4f
commit dd228aa1f6
Notes: blender-bot 2023-02-14 03:35:21 +01:00
Referenced by issue #61945, Scaling UV-sphere while using snap to vertex scales to incredible size.
1 changed files with 3 additions and 1 deletions

View File

@ -870,7 +870,9 @@ static void ApplySnapResize(TransInfo *t, float vec[3])
getSnapPoint(t, point);
float dist = ResizeBetween(t, t->tsnap.snapTarget, point);
copy_v3_fl(vec, dist);
if (dist != TRANSFORM_DIST_INVALID) {
copy_v3_fl(vec, dist);
}
}
/********************** DISTANCE **************************/