Fix UV vertex snap while transforming snapping to itself

When the mouse cursor was close to the selection being transformed,
the UV's could snap to themselves.
This commit is contained in:
Campbell Barton 2023-05-20 20:28:11 +10:00
parent 575772d70d
commit 1d6eb9bc93
1 changed files with 4 additions and 0 deletions

View File

@ -715,6 +715,10 @@ static eSnapTargetOP snap_target_select_from_spacetype(TransInfo *t)
/* Exclude editmesh when using proportional edit */
ret |= SCE_SNAP_TARGET_NOT_EDITED;
}
/* UV editing must never snap to the selection as this is what is transformed. */
if (t->spacetype == SPACE_IMAGE) {
ret |= SCE_SNAP_TARGET_NOT_SELECTED;
}
}
else if (ELEM(obedit_type, OB_ARMATURE, OB_CURVES_LEGACY, OB_SURF, OB_LATTICE, OB_MBALL)) {
/* Temporary limited to edit mode armature, curves, surfaces, lattices, and metaballs. */