diff options
author | Joshua Leung <aligorith@gmail.com> | 2015-03-28 16:20:57 +0300 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2015-03-28 16:20:57 +0300 |
commit | 0c5d0422b4fb8b058826db9a7b0f11868aedaa0d (patch) | |
tree | b3e65fa76150125785837ec43c68808045a08da6 /source/blender/editors/space_graph/graph_utils.c | |
parent | 0ffd7f721e8066545e45ea2eb2766d1186cd2abb (diff) |
NLA Strip Keyframes: Insert keyframe tools in Anim Editors work now
* Insert Keyframe tool for Dopesheet/Graph Editors needed to be modified to
not try to resolve the paths for NLA Control Curves
* For now, the poll callback to get the "Active FCurve" also works when given
a NLA control curve. They're really the same in most cases, and this should
be fine until one of the channels does something funky.
Diffstat (limited to 'source/blender/editors/space_graph/graph_utils.c')
-rw-r--r-- | source/blender/editors/space_graph/graph_utils.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/source/blender/editors/space_graph/graph_utils.c b/source/blender/editors/space_graph/graph_utils.c index eea360ced45..0e56dc817e4 100644 --- a/source/blender/editors/space_graph/graph_utils.c +++ b/source/blender/editors/space_graph/graph_utils.c @@ -210,13 +210,18 @@ int graphop_active_fcurve_poll(bContext *C) if (ale == NULL) return 0; - /* free temp data... */ - has_fcurve = ((ale->data) && (ale->type == ANIMTYPE_FCURVE)); + /* do we have a suitable F-Curves? + * - For most cases, NLA Control Curves are sufficiently similar to NLA curves to serve this role too. + * Under the hood, they are F-Curves too. The only problems which will arise here are if these need to be + * in an Action too (but drivers would then also be affected!) + */ + has_fcurve = ((ale->data) && ELEM(ale->type, ANIMTYPE_FCURVE, ANIMTYPE_NLACURVE)); if (has_fcurve) { FCurve *fcu = (FCurve *)ale->data; has_fcurve = (fcu->flag & FCURVE_VISIBLE) != 0; } + /* free temp data... */ MEM_freeN(ale); /* return success */ |