diff options
author | Germano Cavalcante <germano.costa@ig.com.br> | 2022-03-28 17:26:48 +0300 |
---|---|---|
committer | Germano Cavalcante <germano.costa@ig.com.br> | 2022-03-28 17:26:48 +0300 |
commit | 2e99295d5e17b798e0890853b26086e0f33cc407 (patch) | |
tree | 9867e14bd35655b1dbcae0e0b80cc7b84c2ff0d0 /source/blender/editors/transform | |
parent | e6dfe570cc00fbacf41d66e55fcf2e1b195eb780 (diff) |
Fix T96812: Regression: Snapping is broken with proportional editing
This was a mistake in the conditional structure introduced in 4b35d6950d4f
This commit also adds a new type of snap exclusion: `SNAP_NOT_EDITED`.
Thanks to @Ethan1080 for pointing out the error.
Diffstat (limited to 'source/blender/editors/transform')
-rw-r--r-- | source/blender/editors/transform/transform_snap.c | 2 | ||||
-rw-r--r-- | source/blender/editors/transform/transform_snap_object.c | 6 |
2 files changed, 6 insertions, 2 deletions
diff --git a/source/blender/editors/transform/transform_snap.c b/source/blender/editors/transform/transform_snap.c index bf898b9053f..5e66b8010e4 100644 --- a/source/blender/editors/transform/transform_snap.c +++ b/source/blender/editors/transform/transform_snap.c @@ -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; diff --git a/source/blender/editors/transform/transform_snap_object.c b/source/blender/editors/transform/transform_snap_object.c index 87053fe03d1..cb06361a62d 100644 --- a/source/blender/editors/transform/transform_snap_object.c +++ b/source/blender/editors/transform/transform_snap_object.c @@ -459,7 +459,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) { |