Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/space_action/action_edit.c
| Show First 20 Lines • Show All 958 Lines • ▼ Show 20 Lines | static bool delete_action_keys(bAnimContext *ac) | ||||
| } | } | ||||
| ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype); | ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype); | ||||
| /* loop through filtered data and delete selected keys */ | /* loop through filtered data and delete selected keys */ | ||||
| for (ale = anim_data.first; ale; ale = ale->next) { | for (ale = anim_data.first; ale; ale = ale->next) { | ||||
| bool changed = false; | bool changed = false; | ||||
| if (ale->type == ANIMTYPE_GPLAYER) { | if (ale->type == ANIMTYPE_GPLAYER) { | ||||
| changed = ED_gplayer_frames_delete((bGPDlayer *)ale->data); | bGPDlayer *gpl = (bGPDlayer *)ale->data; | ||||
| changed = ED_gplayer_frames_delete(gpl); | |||||
| if (BLI_listbase_is_empty(&gpl->frames)) { | |||||
| bGPdata *gpd = (bGPdata *)ale->id; | |||||
| /* try to delete the layer's data and the layer itself */ | |||||
| BKE_gpencil_layer_delete(gpd, gpl); | |||||
| ale->update = ANIM_UPDATE_DEPS; | |||||
| } | |||||
| } | } | ||||
| else if (ale->type == ANIMTYPE_MASKLAYER) { | else if (ale->type == ANIMTYPE_MASKLAYER) { | ||||
| changed = ED_masklayer_frames_delete((MaskLayer *)ale->data); | changed = ED_masklayer_frames_delete((MaskLayer *)ale->data); | ||||
| } | } | ||||
| else { | else { | ||||
| FCurve *fcu = (FCurve *)ale->key_data; | FCurve *fcu = (FCurve *)ale->key_data; | ||||
| AnimData *adt = ale->adt; | AnimData *adt = ale->adt; | ||||
| ▲ Show 20 Lines • Show All 940 Lines • Show Last 20 Lines | |||||