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:
Diffstat (limited to 'source/blender/editors/space_action')
-rw-r--r--source/blender/editors/space_action/action_draw.c10
-rw-r--r--source/blender/editors/space_action/action_header.c5
-rw-r--r--source/blender/editors/space_action/action_select.c36
3 files changed, 36 insertions, 15 deletions
diff --git a/source/blender/editors/space_action/action_draw.c b/source/blender/editors/space_action/action_draw.c
index 4288cc10a26..7181a6b5aa1 100644
--- a/source/blender/editors/space_action/action_draw.c
+++ b/source/blender/editors/space_action/action_draw.c
@@ -260,6 +260,13 @@ void draw_channel_strips(bAnimContext *ac, SpaceAction *saction, ARegion *ar)
if (ELEM(ac->datatype, ANIMCONT_ACTION, ANIMCONT_DOPESHEET)) {
switch (ale->type) {
+ case ANIMTYPE_SUMMARY:
+ {
+ // FIXME: hardcoded colours - reddish color from NLA
+ glColor4f(0.8f, 0.2f, 0.0f, 0.4f);
+ }
+ break;
+
case ANIMTYPE_SCENE:
case ANIMTYPE_OBJECT:
{
@@ -351,6 +358,9 @@ void draw_channel_strips(bAnimContext *ac, SpaceAction *saction, ARegion *ar)
/* draw 'keyframes' for each specific datatype */
switch (ale->datatype) {
+ case ALE_ALL:
+ draw_summary_channel(v2d, ale->data, y);
+ break;
case ALE_SCE:
draw_scene_channel(v2d, ads, ale->key_data, y);
break;
diff --git a/source/blender/editors/space_action/action_header.c b/source/blender/editors/space_action/action_header.c
index e0d952c29c1..2468bdf311c 100644
--- a/source/blender/editors/space_action/action_header.c
+++ b/source/blender/editors/space_action/action_header.c
@@ -331,8 +331,11 @@ void action_header_buttons(const bContext *C, ARegion *ar)
/* MODE-DEPENDENT DRAWING */
if (saction->mode == SACTCONT_DOPESHEET) {
/* FILTERING OPTIONS */
- xco -= 10;
+ /* DopeSheet summary... */
+ uiDefIconTextButBitI(block, TOG, ADS_FILTER_SUMMARY, B_REDR, ICON_BORDERMOVE, "Summary", xco,yco,XIC*4,YIC, &(saction->ads.filterflag), 0, 0, 0, 0, "Include DopeSheet summary row"); // TODO: needs a better icon
+ xco += (XIC*3.5);
+ /* Standard filtering... */
xco= ANIM_headerUI_standard_buttons(C, &saction->ads, block, xco, yco);
}
else if (saction->mode == SACTCONT_ACTION) {
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);