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>2009-10-13 15:21:02 +0400
committerJoshua Leung <aligorith@gmail.com>2009-10-13 15:21:02 +0400
commitde818dace53343a1fcbb03d8e535a77617c037fa (patch)
treeea7fb3911d8d3409488577fe0c89e3d89b527471 /source/blender/editors/space_action/action_select.c
parentf4d29269866a3bc4f9346bf24753d72da2456fc9 (diff)
DopeSheet: DopeSheet Summary Channel
Added a summary channel that appears as the first channel in the DopeSheet. For now, this is disabled by default, but can be enabled using the 'Summary' toggle in the header between the mode selector and the standard filtering options. This has been done, since there is a possibility that it will make the DopeSheet run a bit slower. In this channel you can do everything that you can normally do with DopeSheet channels (i.e. select, transform, edit, etc). It might be worth noting though that care probably needs to be taken when trying to use Copy/Paste, since that is still a bit fidgety... In the process, I've fixed a few bugs, mostly with selection: - Selecting keyframes in scene summaries wouldn't work - Border select only worked in F-Curve and Group channels
Diffstat (limited to 'source/blender/editors/space_action/action_select.c')
-rw-r--r--source/blender/editors/space_action/action_select.c36
1 files changed, 22 insertions, 14 deletions
diff --git a/source/blender/editors/space_action/action_select.c b/source/blender/editors/space_action/action_select.c
index e358f559b14..c945f41bc55 100644
--- a/source/blender/editors/space_action/action_select.c
+++ b/source/blender/editors/space_action/action_select.c
@@ -219,7 +219,7 @@ static void borderselect_action (bAnimContext *ac, rcti rect, short mode, short
{
ListBase anim_data = {NULL, NULL};
bAnimListElem *ale;
- int filter;
+ int filter, filterflag;
BeztEditData bed;
BeztEditFunc ok_cb, select_cb;
@@ -235,6 +235,14 @@ static void borderselect_action (bAnimContext *ac, rcti rect, short mode, short
filter= (ANIMFILTER_VISIBLE | ANIMFILTER_CHANNELS);
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);
@@ -271,20 +279,10 @@ static void borderselect_action (bAnimContext *ac, rcti rect, short mode, short
!((ymax < rectf.ymin) || (ymin > rectf.ymax)) )
{
/* loop over data selecting */
- if (ale->key_data) {
- if (ale->datatype == ALE_FCURVE)
- ANIM_fcurve_keys_bezier_loop(&bed, ale->key_data, ok_cb, select_cb, NULL);
- }
- else if (ale->type == ANIMTYPE_GROUP) {
- bActionGroup *agrp= ale->data;
- FCurve *fcu;
-
- for (fcu= agrp->channels.first; fcu && fcu->grp==agrp; fcu= fcu->next)
- ANIM_fcurve_keys_bezier_loop(&bed, fcu, ok_cb, select_cb, NULL);
- }
- //else if (ale->type == ANIMTYPE_GPLAYER) {
+ //if (ale->type == ANIMTYPE_GPLAYER)
// borderselect_gplayer_frames(ale->data, rectf.xmin, rectf.xmax, selectmode);
- //}
+ //else
+ ANIM_animchannel_keys_bezier_loop(&bed, ale, ok_cb, select_cb, NULL, filterflag);
}
/* set minimum extent to be the maximum of the next channel */
@@ -792,6 +790,12 @@ static void mouse_action_keys (bAnimContext *ac, int mval[2], short select_mode,
if (ale->key_data) {
switch (ale->datatype) {
+ case ALE_SCE:
+ {
+ Scene *scene= (Scene *)ale->key_data;
+ scene_to_keylist(ads, scene, &anim_keys, NULL);
+ }
+ break;
case ALE_OB:
{
Object *ob= (Object *)ale->key_data;
@@ -812,6 +816,10 @@ static void mouse_action_keys (bAnimContext *ac, int mval[2], short select_mode,
break;
}
}
+ else if (ale->type == ANIMTYPE_SUMMARY) {
+ /* dopesheet summary covers everything */
+ summary_to_keylist(ac, &anim_keys, NULL);
+ }
else if (ale->type == ANIMTYPE_GROUP) {
bActionGroup *agrp= (bActionGroup *)ale->data;
agroup_to_keylist(adt, agrp, &anim_keys, NULL);