diff options
author | Germano Cavalcante <germano.costa@ig.com.br> | 2021-10-14 19:03:26 +0300 |
---|---|---|
committer | Germano Cavalcante <germano.costa@ig.com.br> | 2021-10-14 19:10:19 +0300 |
commit | 5e12e62a6a4e333d0d93d50b0dc943e2d19ee3e5 (patch) | |
tree | 15de33dfc882e77b36c910ac60553d8755d85f39 | |
parent | b42ce0c54cab8ff5f85ca795cc1f0dab4308449b (diff) |
Fix regression with incremental snap in Graph Editor
Regression introduced in {rBb0d9e6797fb8}.
Previously the Graphics Editor had a conflict with two different snap
types. Auto-Snap and Snap with Ctrl.
It is now clearer which snap should prevail.
-rw-r--r-- | source/blender/editors/transform/transform_snap.c | 2 | ||||
-rw-r--r-- | source/blender/editors/transform/transform_snap_animation.c | 11 |
2 files changed, 9 insertions, 4 deletions
diff --git a/source/blender/editors/transform/transform_snap.c b/source/blender/editors/transform/transform_snap.c index b8a35cb51e3..5eab059e049 100644 --- a/source/blender/editors/transform/transform_snap.c +++ b/source/blender/editors/transform/transform_snap.c @@ -615,7 +615,7 @@ static void initSnappingMode(TransInfo *t) t->tsnap.mode |= SCE_SNAP_MODE_GRID; } } - else if (ELEM(t->spacetype, SPACE_GRAPH, SPACE_ACTION, SPACE_NLA)) { + else if (ELEM(t->spacetype, SPACE_ACTION, SPACE_NLA)) { /* No incremental snapping. */ t->tsnap.mode = 0; } diff --git a/source/blender/editors/transform/transform_snap_animation.c b/source/blender/editors/transform/transform_snap_animation.c index 08335924ddf..93ae68857a4 100644 --- a/source/blender/editors/transform/transform_snap_animation.c +++ b/source/blender/editors/transform/transform_snap_animation.c @@ -56,10 +56,15 @@ short getAnimEdit_SnapMode(TransInfo *t) } } else if (t->spacetype == SPACE_GRAPH) { - SpaceGraph *sipo = (SpaceGraph *)t->area->spacedata.first; + if ((t->data_type == TFM_TRANSLATION) && activeSnap(t)) { + /* Use the translate mode snap. */ + } + else { + SpaceGraph *sipo = (SpaceGraph *)t->area->spacedata.first; - if (sipo) { - autosnap = sipo->autosnap; + if (sipo) { + autosnap = sipo->autosnap; + } } } else if (t->spacetype == SPACE_NLA) { |