Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoshua Leung <aligorith@gmail.com>2011-06-30 17:56:47 +0400
committerJoshua Leung <aligorith@gmail.com>2011-06-30 17:56:47 +0400
commita6270b0204b2a9424eaa51d475aa761d77f43a69 (patch)
tree92467389c658f50240228583f4d708a68467a243 /source/blender/editors/space_action
parent2a85eff40cba602cb07aeb43c1af672ce2945bbb (diff)
Animation Channels Filtering Refactor - Part 5
Channels can now be used as "animation containers" to be filtered further to obtain a set of subsidiary channels (i.e. F-Curves associated with some summary channel). The main use of this is that object and scene summary channels can now be defined without defining the filtering logic in three different places - once for channel filtering, once for drawing keyframes in action editor, and once for editing these keyframes. An indirect consequence of this, is that the "Only selected channels" option in Timeline will now result in only the keyframes for a selected bones getting shown (when enabled), instead of all keyframes for the active object. This was requested by Lee during Durian, and is something which has only become possible as a result of this commit.
Diffstat (limited to 'source/blender/editors/space_action')
-rw-r--r--source/blender/editors/space_action/action_select.c17
1 files changed, 3 insertions, 14 deletions
diff --git a/source/blender/editors/space_action/action_select.c b/source/blender/editors/space_action/action_select.c
index 0f84ae547ff..68dd0a8c256 100644
--- a/source/blender/editors/space_action/action_select.c
+++ b/source/blender/editors/space_action/action_select.c
@@ -198,7 +198,7 @@ static void borderselect_action (bAnimContext *ac, rcti rect, short mode, short
{
ListBase anim_data = {NULL, NULL};
bAnimListElem *ale;
- int filter, filterflag;
+ int filter;
KeyframeEditData ked;
KeyframeEditFunc ok_cb, select_cb;
@@ -214,14 +214,6 @@ static void borderselect_action (bAnimContext *ac, rcti rect, short mode, short
filter= (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE | ANIMFILTER_LIST_CHANNELS | ANIMFILTER_NODUPLIS);
ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype);
- /* get filtering flag for dopesheet data (if applicable) */
- if (ac->datatype == ANIMCONT_DOPESHEET) {
- bDopeSheet *ads= (bDopeSheet *)ac->data;
- filterflag= ads->filterflag;
- }
- else
- filterflag= 0;
-
/* get beztriple editing/validation funcs */
select_cb= ANIM_editkeyframes_select(selectmode);
@@ -261,7 +253,7 @@ static void borderselect_action (bAnimContext *ac, rcti rect, short mode, short
if (ale->type == ANIMTYPE_GPLAYER)
borderselect_gplayer_frames(ale->data, rectf.xmin, rectf.xmax, selectmode);
else
- ANIM_animchannel_keyframes_loop(&ked, ale, ok_cb, select_cb, NULL, filterflag);
+ ANIM_animchannel_keyframes_loop(&ked, ac->ads, ale, ok_cb, select_cb, NULL);
}
/* set minimum extent to be the maximum of the next channel */
@@ -900,9 +892,6 @@ void ACTION_OT_select_leftright (wmOperatorType *ot)
/* option 1) select keyframe directly under mouse */
static void actkeys_mselect_single (bAnimContext *ac, bAnimListElem *ale, short select_mode, float selx)
{
- bDopeSheet *ads= (ac->datatype == ANIMCONT_DOPESHEET) ? ac->data : NULL;
- int ds_filter = ((ads) ? (ads->filterflag) : (0));
-
KeyframeEditData ked= {{NULL}};
KeyframeEditFunc select_cb, ok_cb;
@@ -915,7 +904,7 @@ static void actkeys_mselect_single (bAnimContext *ac, bAnimListElem *ale, short
if (ale->type == ANIMTYPE_GPLAYER)
select_gpencil_frame(ale->data, selx, select_mode);
else
- ANIM_animchannel_keyframes_loop(&ked, ale, ok_cb, select_cb, NULL, ds_filter);
+ ANIM_animchannel_keyframes_loop(&ked, ac->ads, ale, ok_cb, select_cb, NULL);
}
/* Option 2) Selects all the keyframes on either side of the current frame (depends on which side the mouse is on) */