diff options
author | Demeter Dzadik <Mets> | 2022-04-29 15:53:14 +0300 |
---|---|---|
committer | Sybren A. Stüvel <sybren@blender.org> | 2022-04-29 16:17:27 +0300 |
commit | 7fd11d9c7f5b14106e1252289ccbcd8dd55ac087 (patch) | |
tree | a28a8256c9056452de51c1b5c8a75edcf97b8309 /source/blender/editors/space_graph | |
parent | 3d877c8a0d06ee539db541c6d410852f94fc618d (diff) |
T95386: Add Discontinuity (Euler) filter to Dope Sheet.
Add the Discontinuity (Euler) Filter operator to the Dope Sheet->Key
menu, so it's not only available from the Graph Editor->Key menu. On
request of @pablico, see T95386.
This required changing a poll function which is used by a bunch of other
operators, which seemed scary at first, but my thinking is that if an
operator can execute in the Graph Editor, then it should also be able to
execute in the Dope Sheet. I think the only reason this wouldn't be true
is if we were storing animation data in the UI itself, which of course
we don't. So I hope this is okay.
Reviewed By: sybren
Differential Revision: https://developer.blender.org/D14015
Diffstat (limited to 'source/blender/editors/space_graph')
-rw-r--r-- | source/blender/editors/space_graph/graph_utils.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/editors/space_graph/graph_utils.c b/source/blender/editors/space_graph/graph_utils.c index 6470fa65c39..d8baa4c643d 100644 --- a/source/blender/editors/space_graph/graph_utils.c +++ b/source/blender/editors/space_graph/graph_utils.c @@ -169,9 +169,9 @@ bool graphop_editable_keyframes_poll(bContext *C) int filter; bool found = false; - /* firstly, check if in Graph Editor */ + /* firstly, check if in Graph Editor or Dopesheet */ /* TODO: also check for region? */ - if ((area == NULL) || (area->spacetype != SPACE_GRAPH)) { + if (area == NULL || !ELEM(area->spacetype, SPACE_GRAPH, SPACE_ACTION)) { return found; } |