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/action_select.c')
-rw-r--r--source/blender/editors/space_action/action_select.c36
1 files changed, 30 insertions, 6 deletions
diff --git a/source/blender/editors/space_action/action_select.c b/source/blender/editors/space_action/action_select.c
index d0f76c21019..964a6a20c37 100644
--- a/source/blender/editors/space_action/action_select.c
+++ b/source/blender/editors/space_action/action_select.c
@@ -259,12 +259,35 @@ static void borderselect_action(bAnimContext *ac, rcti rect, short mode, short s
!((ymax < rectf.ymin) || (ymin > rectf.ymax)))
{
/* loop over data selecting */
- if (ale->type == ANIMTYPE_GPLAYER)
- ED_gplayer_frames_select_border(ale->data, rectf.xmin, rectf.xmax, selectmode);
- else if (ale->type == ANIMTYPE_MASKLAYER)
- ED_masklayer_frames_select_border(ale->data, rectf.xmin, rectf.xmax, selectmode);
- else
- ANIM_animchannel_keyframes_loop(&ked, ac->ads, ale, ok_cb, select_cb, NULL);
+ switch (ale->type) {
+ case ANIMTYPE_GPDATABLOCK:
+ {
+ bGPdata *gpd = ale->data;
+ bGPDlayer *gpl;
+ for (gpl = gpd->layers.first; gpl; gpl = gpl->next) {
+ ED_gplayer_frames_select_border(gpl, rectf.xmin, rectf.xmax, selectmode);
+ }
+ break;
+ }
+ case ANIMTYPE_GPLAYER:
+ ED_gplayer_frames_select_border(ale->data, rectf.xmin, rectf.xmax, selectmode);
+ break;
+ case ANIMTYPE_MASKDATABLOCK:
+ {
+ Mask *mask = ale->data;
+ MaskLayer *masklay;
+ for (masklay = mask->masklayers.first; masklay; masklay = masklay->next) {
+ ED_masklayer_frames_select_border(ale->data, rectf.xmin, rectf.xmax, selectmode);
+ }
+ break;
+ }
+ case ANIMTYPE_MASKLAYER:
+ ED_masklayer_frames_select_border(ale->data, rectf.xmin, rectf.xmax, selectmode);
+ break;
+ default:
+ ANIM_animchannel_keyframes_loop(&ked, ac->ads, ale, ok_cb, select_cb, NULL);
+ break;
+ }
}
/* set minimum extent to be the maximum of the next channel */
@@ -944,6 +967,7 @@ static void actkeys_mselect_single(bAnimContext *ac, bAnimListElem *ale, short s
else if (ale->type == ANIMTYPE_MASKLAYER)
ED_mask_select_frame(ale->data, selx, select_mode);
}
+ BLI_freelistN(&anim_data);
}
else {
ANIM_animchannel_keyframes_loop(&ked, ac->ads, ale, ok_cb, select_cb, NULL);