forked from bartvdbraak/blender
fix [#34107] Grease pencil crash after box select
This commit is contained in:
parent
88aa33d3f4
commit
932be982d6
@ -300,7 +300,14 @@ static short summary_keyframes_loop(KeyframeEditData *ked, bAnimContext *ac, Key
|
||||
|
||||
/* loop through each F-Curve, working on the keyframes until the first curve aborts */
|
||||
for (ale = anim_data.first; ale; ale = ale->next) {
|
||||
ret_code = ANIM_fcurve_keyframes_loop(ked, ale->data, key_ok, key_cb, fcu_cb);
|
||||
switch (ale->datatype) {
|
||||
case ALE_MASKLAY:
|
||||
case ALE_GPFRAME:
|
||||
break;
|
||||
default:
|
||||
ret_code = ANIM_fcurve_keyframes_loop(ked, ale->data, key_ok, key_cb, fcu_cb);
|
||||
break;
|
||||
}
|
||||
|
||||
if (ret_code)
|
||||
break;
|
||||
|
@ -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 */
|
||||
|
Loading…
Reference in New Issue
Block a user