Fix T96812: Regression: Snapping is broken with proportional editing
This was a mistake in the conditional structure introduced in 4b35d6950d
This commit also adds a new type of snap exclusion: `SNAP_NOT_EDITED`.
Thanks to @Ethan1080 for pointing out the error.
This commit is contained in:
parent
bac78e9bbe
commit
c33870ab14
Notes:
blender-bot
2023-02-14 06:49:57 +01:00
Referenced by issue #96812, Regression: Snapping is broken with proportional editing Referenced by issue #96241, 3.1: Potential candidates for corrective releases
|
@ -43,8 +43,9 @@ typedef enum {
|
|||
SNAP_ALL = 0,
|
||||
SNAP_NOT_SELECTED = 1,
|
||||
SNAP_NOT_ACTIVE = 2,
|
||||
SNAP_ONLY_ACTIVE = 3,
|
||||
SNAP_SELECTABLE = 4,
|
||||
SNAP_NOT_EDITED = 3,
|
||||
SNAP_ONLY_ACTIVE = 4,
|
||||
SNAP_SELECTABLE = 5,
|
||||
} eSnapSelect;
|
||||
|
||||
typedef enum {
|
||||
|
|
|
@ -639,7 +639,7 @@ static short snap_select_type_get(TransInfo *t)
|
|||
|
||||
if ((obedit_type == OB_MESH) && (t->flag & T_PROP_EDIT)) {
|
||||
/* Exclude editmesh if using proportional edit */
|
||||
r_snap_select = SNAP_NOT_ACTIVE;
|
||||
r_snap_select = SNAP_NOT_EDITED;
|
||||
}
|
||||
else if (!t->tsnap.snap_self) {
|
||||
r_snap_select = SNAP_NOT_ACTIVE;
|
||||
|
|
|
@ -473,7 +473,11 @@ static bool snap_object_is_snappable(const SnapObjectContext *sctx,
|
|||
}
|
||||
|
||||
if (snap_select == SNAP_NOT_ACTIVE) {
|
||||
return base_act == base;
|
||||
return base_act != base;
|
||||
}
|
||||
|
||||
if (snap_select == SNAP_NOT_EDITED) {
|
||||
return base->object->mode != OB_MODE_EDIT;
|
||||
}
|
||||
|
||||
if (snap_select == SNAP_NOT_SELECTED) {
|
||||
|
|
Loading…
Reference in New Issue