diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-06-26 14:14:50 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-06-26 14:14:50 +0400 |
commit | 79ab7f95f90aba459a3b3882c52b31e01250e6b1 (patch) | |
tree | 436a5a89b1a787d7533de68a06d93c35c851cdb6 /source | |
parent | cd6ed0bee5c1bc7b73eae5f869b13b121aa00a4b (diff) |
mask and grease pencil now display in the dope sheet summery
Diffstat (limited to 'source')
7 files changed, 37 insertions, 13 deletions
diff --git a/source/blender/compositor/nodes/COM_MathNode.cpp b/source/blender/compositor/nodes/COM_MathNode.cpp index 6e9b49253e7..300c9967cc4 100644 --- a/source/blender/compositor/nodes/COM_MathNode.cpp +++ b/source/blender/compositor/nodes/COM_MathNode.cpp @@ -28,8 +28,7 @@ void MathNode::convertToOperations(ExecutionSystem *graph, CompositorContext *co { MathBaseOperation *operation = NULL; - switch (this->getbNode()->custom1) - { + switch (this->getbNode()->custom1) { case 0: /* Add */ operation = new MathAddOperation(); break; diff --git a/source/blender/compositor/operations/COM_ConvertRGBToYCCOperation.cpp b/source/blender/compositor/operations/COM_ConvertRGBToYCCOperation.cpp index e4322ae728f..7f41a79b7f4 100644 --- a/source/blender/compositor/operations/COM_ConvertRGBToYCCOperation.cpp +++ b/source/blender/compositor/operations/COM_ConvertRGBToYCCOperation.cpp @@ -36,8 +36,7 @@ void ConvertRGBToYCCOperation::initExecution() void ConvertRGBToYCCOperation::setMode(int mode) { - switch (mode) - { + switch (mode) { case 1: this->m_mode = BLI_YCC_ITU_BT709; break; diff --git a/source/blender/compositor/operations/COM_ConvertYCCToRGBOperation.cpp b/source/blender/compositor/operations/COM_ConvertYCCToRGBOperation.cpp index 11f4dd5a2d6..78b7a7af60d 100644 --- a/source/blender/compositor/operations/COM_ConvertYCCToRGBOperation.cpp +++ b/source/blender/compositor/operations/COM_ConvertYCCToRGBOperation.cpp @@ -36,8 +36,7 @@ void ConvertYCCToRGBOperation::initExecution() void ConvertYCCToRGBOperation::setMode(int mode) { - switch (mode) - { + switch (mode) { case 1: this->m_mode = BLI_YCC_ITU_BT709; break; diff --git a/source/blender/editors/animation/anim_filter.c b/source/blender/editors/animation/anim_filter.c index 46e1eb98dae..a6d1ac64bbe 100644 --- a/source/blender/editors/animation/anim_filter.c +++ b/source/blender/editors/animation/anim_filter.c @@ -2397,13 +2397,15 @@ size_t ANIM_animdata_filter(bAnimContext *ac, ListBase *anim_data, int filter_mo case ANIMCONT_GPENCIL: { - items = animdata_filter_gpencil(anim_data, data, filter_mode); + if (animdata_filter_dopesheet_summary(ac, anim_data, filter_mode, &items)) + items = animdata_filter_gpencil(anim_data, data, filter_mode); } break; case ANIMCONT_MASK: { - items = animdata_filter_mask(anim_data, data, filter_mode); + if (animdata_filter_dopesheet_summary(ac, anim_data, filter_mode, &items)) + items = animdata_filter_mask(anim_data, data, filter_mode); } break; diff --git a/source/blender/editors/animation/keyframes_draw.c b/source/blender/editors/animation/keyframes_draw.c index e6fc4d5a168..46a89963ad9 100644 --- a/source/blender/editors/animation/keyframes_draw.c +++ b/source/blender/editors/animation/keyframes_draw.c @@ -847,9 +847,17 @@ void summary_to_keylist(bAnimContext *ac, DLRBT_Tree *keys, DLRBT_Tree *blocks) ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype); /* loop through each F-Curve, grabbing the keyframes */ - for (ale = anim_data.first; ale; ale = ale->next) + for (ale = anim_data.first; ale; ale = ale->next) { fcurve_to_keylist(ale->adt, ale->data, keys, blocks); - + + if (ale->datatype == ALE_MASKLAY) { + mask_to_keylist(ac->ads, ale->data, keys); + } + else if (ale->datatype == ALE_GPFRAME) { + gpl_to_keylist(ac->ads, ale->data, keys); + } + } + BLI_freelistN(&anim_data); } } diff --git a/source/blender/editors/include/ED_anim_api.h b/source/blender/editors/include/ED_anim_api.h index 24aa88a36bd..e1401a8ff88 100644 --- a/source/blender/editors/include/ED_anim_api.h +++ b/source/blender/editors/include/ED_anim_api.h @@ -177,7 +177,7 @@ typedef enum eAnim_KeyType { ALE_NONE = 0, /* no keyframe data */ ALE_FCURVE, /* F-Curve */ ALE_GPFRAME, /* Grease Pencil Frames */ - ALE_MASKLAY, /* Mask */ + ALE_MASKLAY, /* Mask */ ALE_NLASTRIP, /* NLA Strips */ ALE_ALL, /* All channels summary */ diff --git a/source/blender/editors/space_action/action_select.c b/source/blender/editors/space_action/action_select.c index 539a32161e5..b42c6406362 100644 --- a/source/blender/editors/space_action/action_select.c +++ b/source/blender/editors/space_action/action_select.c @@ -930,8 +930,25 @@ static void actkeys_mselect_single(bAnimContext *ac, bAnimListElem *ale, short s ED_gpencil_select_frame(ale->data, selx, select_mode); else if (ale->type == ANIMTYPE_MASKLAYER) ED_mask_select_frame(ale->data, selx, select_mode); - else - ANIM_animchannel_keyframes_loop(&ked, ac->ads, ale, ok_cb, select_cb, NULL); + else { + if (ELEM(ac->datatype, ANIMCONT_GPENCIL, ANIMCONT_MASK) && + (ale->type == ANIMTYPE_SUMMARY) && (ale->datatype == ALE_ALL)) + { + ListBase anim_data = {NULL, NULL}; + int filter; + filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE /*| ANIMFILTER_CURVESONLY */ | ANIMFILTER_NODUPLIS); + ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype); + for (ale = anim_data.first; ale; ale = ale->next) { + if (ale->type == ANIMTYPE_GPLAYER) + ED_gpencil_select_frame(ale->data, selx, select_mode); + else if (ale->type == ANIMTYPE_MASKLAYER) + ED_mask_select_frame(ale->data, selx, select_mode); + } + } + else { + 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) */ |