From 67f983ac53e97f154b6710fea8f400a608e27550 Mon Sep 17 00:00:00 2001 From: Joshua Leung Date: Sun, 22 Mar 2015 21:41:45 +1300 Subject: Nla Strip Controls: Added special FCurve type (in the animfiltering code) Using the standard "FCurve" animchannel type didn't work that well for the control FCurves on NLA Strips, as the paths would not resolve correctly, and the indentation was wrong. Also, there would likely be issues down the track with applying NLA mapping. Hence, it's easier to just create a separate type for this case, and adapt the rest of the code to also consider these (todo). --- source/blender/editors/space_action/action_edit.c | 2 +- source/blender/editors/space_action/action_select.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'source/blender/editors/space_action') diff --git a/source/blender/editors/space_action/action_edit.c b/source/blender/editors/space_action/action_edit.c index 95066b91725..0c2575e19f0 100644 --- a/source/blender/editors/space_action/action_edit.c +++ b/source/blender/editors/space_action/action_edit.c @@ -1156,7 +1156,7 @@ static void duplicate_action_keys(bAnimContext *ac) /* loop through filtered data and delete selected keys */ for (ale = anim_data.first; ale; ale = ale->next) { - if (ale->type == ANIMTYPE_FCURVE) + if (ELEM(ale->type, ANIMTYPE_FCURVE, ANIMTYPE_NLACURVE)) duplicate_fcurve_keys((FCurve *)ale->key_data); else if (ale->type == ANIMTYPE_GPLAYER) ED_gplayer_frames_duplicate((bGPDlayer *)ale->data); diff --git a/source/blender/editors/space_action/action_select.c b/source/blender/editors/space_action/action_select.c index ddfca98a119..0f94baff082 100644 --- a/source/blender/editors/space_action/action_select.c +++ b/source/blender/editors/space_action/action_select.c @@ -1221,11 +1221,11 @@ static void mouse_action_keys(bAnimContext *ac, const int mval[2], short select_ agrp->flag |= AGRP_SELECTED; ANIM_set_active_channel(ac, ac->data, ac->datatype, filter, agrp, ANIMTYPE_GROUP); } - else if (ale->type == ANIMTYPE_FCURVE) { + else if (ELEM(ale->type, ANIMTYPE_FCURVE, ANIMTYPE_NLACURVE)) { FCurve *fcu = ale->data; fcu->flag |= FCURVE_SELECTED; - ANIM_set_active_channel(ac, ac->data, ac->datatype, filter, fcu, ANIMTYPE_FCURVE); + ANIM_set_active_channel(ac, ac->data, ac->datatype, filter, fcu, ale->type); } } } -- cgit v1.2.3