Refactor: Anim: make some bAnimListElem fields enum-typed

Change the `bAnimListElem` fields `type`, `update`, and `datatype` from
respectively `int`, `char`, and `short` to their actual `enum` types,
respectively `eAnim_ChannelType`, `eAnim_Update_Flags`, and
`eAnim_KeyType`.

To prevent compiler warnings, all `switch` statements that try to handle
these fields have been expanded with the missing `case`s. This should
help in the future when new channel types are added, as that'll cause
more compiler warnings in those places that need updating.

One `if`/`else if`/`else` chain was converted into a `switch` for
clarity. This was actually the place where my (upcoming) code is hitting
the `BLI_assert_unreachable()`, which was the final straw for this
refactor.

No functional changes.

Pull Request: https://projects.blender.org/blender/blender/pulls/122874
This commit is contained in:
Sybren A. Stüvel
2024-06-07 12:40:29 +02:00
parent 96a024dede
commit 53c2ee7e37
10 changed files with 386 additions and 33 deletions

View File

@@ -187,6 +187,18 @@ static bool get_channel_bounds(bAnimContext *ac,
fcu, anim_data, ac->sl, ac->scene, ale->id, include_handles, range, r_bounds);
break;
}
case ALE_NONE:
case ALE_MASKLAY:
case ALE_NLASTRIP:
case ALE_ALL:
case ALE_SCE:
case ALE_OB:
case ALE_ACT:
case ALE_GROUP:
case ALE_ACTION_LAYERED:
case ALE_GREASE_PENCIL_DATA:
case ALE_GREASE_PENCIL_GROUP:
return false;
}
return found_bounds;
}
@@ -291,6 +303,25 @@ void ANIM_set_active_channel(bAnimContext *ac,
ACHANNEL_SET_FLAG(gpl, ACHANNEL_SETFLAG_CLEAR, GP_LAYER_ACTIVE);
break;
}
case ANIMTYPE_NONE:
case ANIMTYPE_ANIMDATA:
case ANIMTYPE_SPECIALDATA__UNUSED:
case ANIMTYPE_SUMMARY:
case ANIMTYPE_SCENE:
case ANIMTYPE_OBJECT:
case ANIMTYPE_NLACONTROLS:
case ANIMTYPE_FILLDRIVERS:
case ANIMTYPE_DSNTREE:
case ANIMTYPE_SHAPEKEY:
case ANIMTYPE_GPDATABLOCK:
case ANIMTYPE_GREASE_PENCIL_DATABLOCK:
case ANIMTYPE_GREASE_PENCIL_LAYER_GROUP:
case ANIMTYPE_GREASE_PENCIL_LAYER:
case ANIMTYPE_MASKDATABLOCK:
case ANIMTYPE_MASKLAYER:
case ANIMTYPE_PALETTE:
case ANIMTYPE_NUM_TYPES:
break;
}
}
@@ -411,9 +442,24 @@ bool ANIM_is_active_channel(bAnimListElem *ale)
return grease_pencil->is_layer_active(
static_cast<blender::bke::greasepencil::Layer *>(ale->data));
}
/* These channel types do not have active flags. */
case ANIMTYPE_MASKLAYER:
/* These channel types do not have active flags. */
case ANIMTYPE_NONE:
case ANIMTYPE_ANIMDATA:
case ANIMTYPE_SPECIALDATA__UNUSED:
case ANIMTYPE_SUMMARY:
case ANIMTYPE_SCENE:
case ANIMTYPE_OBJECT:
case ANIMTYPE_NLACONTROLS:
case ANIMTYPE_FILLDRIVERS:
case ANIMTYPE_SHAPEKEY:
case ANIMTYPE_GPDATABLOCK:
case ANIMTYPE_GREASE_PENCIL_DATABLOCK:
case ANIMTYPE_GREASE_PENCIL_LAYER_GROUP:
case ANIMTYPE_MASKDATABLOCK:
case ANIMTYPE_MASKLAYER:
case ANIMTYPE_NLATRACK:
case ANIMTYPE_PALETTE:
case ANIMTYPE_NUM_TYPES:
break;
}
return false;
@@ -543,6 +589,20 @@ static eAnimChannels_SetFlag anim_channels_selection_flag_for_toggle(const ListB
return ACHANNEL_SETFLAG_CLEAR;
}
break;
case ANIMTYPE_NONE:
case ANIMTYPE_ANIMDATA:
case ANIMTYPE_SPECIALDATA__UNUSED:
case ANIMTYPE_SUMMARY:
case ANIMTYPE_NLACONTROLS:
case ANIMTYPE_FILLDRIVERS:
case ANIMTYPE_GPDATABLOCK:
case ANIMTYPE_GREASE_PENCIL_DATABLOCK:
case ANIMTYPE_GREASE_PENCIL_LAYER_GROUP:
case ANIMTYPE_GREASE_PENCIL_LAYER:
case ANIMTYPE_MASKDATABLOCK:
case ANIMTYPE_PALETTE:
case ANIMTYPE_NUM_TYPES:
break;
}
}
@@ -670,6 +730,19 @@ static void anim_channels_select_set(bAnimContext *ac,
ACHANNEL_SET_FLAG(masklay, sel, MASK_LAYERFLAG_SELECT);
break;
}
case ANIMTYPE_NONE:
case ANIMTYPE_ANIMDATA:
case ANIMTYPE_SPECIALDATA__UNUSED:
case ANIMTYPE_SUMMARY:
case ANIMTYPE_NLACONTROLS:
case ANIMTYPE_FILLDRIVERS:
case ANIMTYPE_GPDATABLOCK:
case ANIMTYPE_GREASE_PENCIL_DATABLOCK:
case ANIMTYPE_GREASE_PENCIL_LAYER_GROUP:
case ANIMTYPE_MASKDATABLOCK:
case ANIMTYPE_PALETTE:
case ANIMTYPE_NUM_TYPES:
break;
}
}
}
@@ -2250,6 +2323,48 @@ static int animchannels_delete_exec(bContext *C, wmOperator * /*op*/)
BKE_mask_layer_remove(mask, masklay);
break;
}
case ANIMTYPE_NONE:
case ANIMTYPE_ANIMDATA:
case ANIMTYPE_SPECIALDATA__UNUSED:
case ANIMTYPE_SUMMARY:
case ANIMTYPE_SCENE:
case ANIMTYPE_OBJECT:
case ANIMTYPE_GROUP:
case ANIMTYPE_NLACONTROLS:
case ANIMTYPE_FILLACT_LAYERED:
case ANIMTYPE_FILLACTD:
case ANIMTYPE_FILLDRIVERS:
case ANIMTYPE_DSMAT:
case ANIMTYPE_DSLAM:
case ANIMTYPE_DSCAM:
case ANIMTYPE_DSCACHEFILE:
case ANIMTYPE_DSCUR:
case ANIMTYPE_DSSKEY:
case ANIMTYPE_DSWOR:
case ANIMTYPE_DSNTREE:
case ANIMTYPE_DSPART:
case ANIMTYPE_DSMBALL:
case ANIMTYPE_DSARM:
case ANIMTYPE_DSMESH:
case ANIMTYPE_DSTEX:
case ANIMTYPE_DSLAT:
case ANIMTYPE_DSLINESTYLE:
case ANIMTYPE_DSSPK:
case ANIMTYPE_DSGPENCIL:
case ANIMTYPE_DSMCLIP:
case ANIMTYPE_DSHAIR:
case ANIMTYPE_DSPOINTCLOUD:
case ANIMTYPE_DSVOLUME:
case ANIMTYPE_SHAPEKEY:
case ANIMTYPE_GPDATABLOCK:
case ANIMTYPE_GREASE_PENCIL_DATABLOCK:
case ANIMTYPE_GREASE_PENCIL_LAYER_GROUP:
case ANIMTYPE_MASKDATABLOCK:
case ANIMTYPE_NLATRACK:
case ANIMTYPE_NLAACTION:
case ANIMTYPE_PALETTE:
case ANIMTYPE_NUM_TYPES:
break;
}
}
@@ -3035,6 +3150,51 @@ static void box_select_anim_channels(bAnimContext *ac, rcti *rect, short selectm
ACHANNEL_SET_FLAG(nlt, selectmode, NLATRACK_SELECTED);
break;
}
case ANIMTYPE_NONE:
case ANIMTYPE_ANIMDATA:
case ANIMTYPE_SPECIALDATA__UNUSED:
case ANIMTYPE_SUMMARY:
case ANIMTYPE_SCENE:
case ANIMTYPE_OBJECT:
case ANIMTYPE_FCURVE:
case ANIMTYPE_NLACONTROLS:
case ANIMTYPE_NLACURVE:
case ANIMTYPE_FILLACT_LAYERED:
case ANIMTYPE_FILLACTD:
case ANIMTYPE_FILLDRIVERS:
case ANIMTYPE_DSMAT:
case ANIMTYPE_DSLAM:
case ANIMTYPE_DSCAM:
case ANIMTYPE_DSCACHEFILE:
case ANIMTYPE_DSCUR:
case ANIMTYPE_DSSKEY:
case ANIMTYPE_DSWOR:
case ANIMTYPE_DSNTREE:
case ANIMTYPE_DSPART:
case ANIMTYPE_DSMBALL:
case ANIMTYPE_DSARM:
case ANIMTYPE_DSMESH:
case ANIMTYPE_DSTEX:
case ANIMTYPE_DSLAT:
case ANIMTYPE_DSLINESTYLE:
case ANIMTYPE_DSSPK:
case ANIMTYPE_DSGPENCIL:
case ANIMTYPE_DSMCLIP:
case ANIMTYPE_DSHAIR:
case ANIMTYPE_DSPOINTCLOUD:
case ANIMTYPE_DSVOLUME:
case ANIMTYPE_SHAPEKEY:
case ANIMTYPE_GPDATABLOCK:
case ANIMTYPE_GPLAYER:
case ANIMTYPE_GREASE_PENCIL_DATABLOCK:
case ANIMTYPE_GREASE_PENCIL_LAYER_GROUP:
case ANIMTYPE_GREASE_PENCIL_LAYER:
case ANIMTYPE_MASKDATABLOCK:
case ANIMTYPE_MASKLAYER:
case ANIMTYPE_NLAACTION:
case ANIMTYPE_PALETTE:
case ANIMTYPE_NUM_TYPES:
break;
}
}

View File

@@ -281,12 +281,57 @@ void ANIM_sync_animchannels_to_data(const bContext *C)
case ANIMTYPE_GPLAYER:
animchan_sync_gplayer(ale);
break;
case ANIMTYPE_GREASE_PENCIL_LAYER:
case ANIMTYPE_GREASE_PENCIL_LAYER: {
using namespace blender::bke::greasepencil;
GreasePencil *grease_pencil = reinterpret_cast<GreasePencil *>(ale->id);
Layer *layer = static_cast<Layer *>(ale->data);
layer->set_selected(grease_pencil->is_layer_active(layer));
break;
}
case ANIMTYPE_NONE:
case ANIMTYPE_ANIMDATA:
case ANIMTYPE_SPECIALDATA__UNUSED:
case ANIMTYPE_SUMMARY:
case ANIMTYPE_SCENE:
case ANIMTYPE_OBJECT:
case ANIMTYPE_NLACONTROLS:
case ANIMTYPE_NLACURVE:
case ANIMTYPE_FILLACT_LAYERED:
case ANIMTYPE_FILLACTD:
case ANIMTYPE_FILLDRIVERS:
case ANIMTYPE_DSMAT:
case ANIMTYPE_DSLAM:
case ANIMTYPE_DSCAM:
case ANIMTYPE_DSCACHEFILE:
case ANIMTYPE_DSCUR:
case ANIMTYPE_DSSKEY:
case ANIMTYPE_DSWOR:
case ANIMTYPE_DSNTREE:
case ANIMTYPE_DSPART:
case ANIMTYPE_DSMBALL:
case ANIMTYPE_DSARM:
case ANIMTYPE_DSMESH:
case ANIMTYPE_DSTEX:
case ANIMTYPE_DSLAT:
case ANIMTYPE_DSLINESTYLE:
case ANIMTYPE_DSSPK:
case ANIMTYPE_DSGPENCIL:
case ANIMTYPE_DSMCLIP:
case ANIMTYPE_DSHAIR:
case ANIMTYPE_DSPOINTCLOUD:
case ANIMTYPE_DSVOLUME:
case ANIMTYPE_SHAPEKEY:
case ANIMTYPE_GPDATABLOCK:
case ANIMTYPE_GREASE_PENCIL_DATABLOCK:
case ANIMTYPE_GREASE_PENCIL_LAYER_GROUP:
case ANIMTYPE_MASKDATABLOCK:
case ANIMTYPE_MASKLAYER:
case ANIMTYPE_NLATRACK:
case ANIMTYPE_NLAACTION:
case ANIMTYPE_PALETTE:
case ANIMTYPE_NUM_TYPES:
break;
}
}
@@ -393,7 +438,7 @@ void ANIM_animdata_update(bAnimContext *ac, ListBase *anim_data)
}
#endif
/* Prevent crashes in cases where it can't be handled */
ale->update = 0;
ale->update = eAnim_Update_Flags(0);
}
BLI_assert(ale->update == 0);

View File

@@ -613,7 +613,7 @@ static void key_data_from_adt(bAnimListElem &ale, AnimData *adt)
* provided animation channel-data.
*/
static bAnimListElem *make_new_animlistelem(void *data,
short datatype,
const eAnim_ChannelType datatype,
ID *owner_id,
ID *fcurve_owner_id)
{
@@ -927,6 +927,16 @@ static bAnimListElem *make_new_animlistelem(void *data,
ale->datatype = ALE_NONE;
break;
}
case ANIMTYPE_NONE:
case ANIMTYPE_ANIMDATA:
case ANIMTYPE_SPECIALDATA__UNUSED:
case ANIMTYPE_DSMBALL:
case ANIMTYPE_GPDATABLOCK:
case ANIMTYPE_MASKDATABLOCK:
case ANIMTYPE_PALETTE:
case ANIMTYPE_NUM_TYPES:
break;
}
}
@@ -2726,7 +2736,8 @@ static size_t animdata_filter_ds_obdata(
size_t items = 0;
IdAdtTemplate *iat = static_cast<IdAdtTemplate *>(ob->data);
short type = 0, expanded = 0;
eAnim_ChannelType type = ANIMTYPE_NONE;
short expanded = 0;
/* get settings based on data type */
switch (ob->type) {
@@ -2948,7 +2959,8 @@ static size_t animdata_filter_ds_obanim(
size_t items = 0;
AnimData *adt = ob->adt;
short type = 0, expanded = 1;
eAnim_ChannelType type = ANIMTYPE_NONE;
short expanded = 1;
void *cdata = nullptr;
/* determine the type of expander channels to use */
@@ -3139,7 +3151,8 @@ static size_t animdata_filter_ds_scene(
size_t items = 0;
AnimData *adt = sce->adt;
short type = 0, expanded = 1;
eAnim_ChannelType type = ANIMTYPE_NONE;
short expanded = 1;
void *cdata = nullptr;
/* determine the type of expander channels to use */

View File

@@ -436,6 +436,15 @@ short ANIM_animchannel_keyframes_loop(KeyframeEditData *ked,
return scene_keyframes_loop(ked, ads, (Scene *)ale->data, key_ok, key_cb, fcu_cb);
case ALE_ALL: /* 'all' (DopeSheet summary) */
return summary_keyframes_loop(ked, (bAnimContext *)ale->data, key_ok, key_cb, fcu_cb);
case ALE_NONE:
case ALE_GPFRAME:
case ALE_MASKLAY:
case ALE_NLASTRIP:
case ALE_GREASE_PENCIL_CEL:
case ALE_GREASE_PENCIL_DATA:
case ALE_GREASE_PENCIL_GROUP:
break;
}
return 0;

View File

@@ -231,6 +231,7 @@ enum eAnim_Update_Flags {
/** Recalculate handles. */
ANIM_UPDATE_HANDLES = (1 << 2),
};
ENUM_OPERATORS(eAnim_Update_Flags, ANIM_UPDATE_HANDLES);
/* used for most tools which change keyframes (flushed by ANIM_animdata_update) */
#define ANIM_UPDATE_DEFAULT (ANIM_UPDATE_DEPS | ANIM_UPDATE_ORDER | ANIM_UPDATE_HANDLES)
@@ -245,20 +246,20 @@ struct bAnimListElem {
/** source data this elem represents */
void *data;
/** (eAnim_ChannelType) one of the ANIMTYPE_* values */
int type;
/** One of the ANIMTYPE_* values. */
eAnim_ChannelType type;
/** copy of elem's flags for quick access */
int flag;
/** for un-named data, the index of the data in its collection */
int index;
/** (eAnim_Update_Flags) tag the element for updating */
char update;
/** Tag the element for updating. */
eAnim_Update_Flags update;
/** tag the included data. Temporary always */
char tag;
/** (eAnim_KeyType) type of motion data to expect */
short datatype;
/** Type of motion data to expect. */
eAnim_KeyType datatype;
/** motion data - mostly F-Curves, but can be other types too */
void *key_data;

View File

@@ -441,6 +441,9 @@ static void draw_keyframes(bAnimContext *ac,
scale_factor,
action_flag);
break;
case ALE_NONE:
case ALE_NLASTRIP:
break;
}
}

View File

@@ -127,6 +127,16 @@ static void actkeys_list_element_to_keylist(bAnimContext *ac,
fcurve_to_keylist(adt, fcu, keylist, 0, range);
break;
}
case ALE_NONE:
case ALE_GPFRAME:
case ALE_MASKLAY:
case ALE_NLASTRIP:
case ALE_ALL:
case ALE_GROUP:
case ALE_GREASE_PENCIL_CEL:
case ALE_GREASE_PENCIL_DATA:
case ALE_GREASE_PENCIL_GROUP:
break;
}
}
else if (ale->type == ANIMTYPE_SUMMARY) {

View File

@@ -160,6 +160,29 @@ bool nla_panel_context(const bContext *C,
*/
case ANIMTYPE_NLAACTION:
break;
case ANIMTYPE_NONE:
case ANIMTYPE_ANIMDATA:
case ANIMTYPE_SPECIALDATA__UNUSED:
case ANIMTYPE_SUMMARY:
case ANIMTYPE_GROUP:
case ANIMTYPE_FCURVE:
case ANIMTYPE_NLACONTROLS:
case ANIMTYPE_NLACURVE:
case ANIMTYPE_FILLACT_LAYERED:
case ANIMTYPE_FILLACTD:
case ANIMTYPE_FILLDRIVERS:
case ANIMTYPE_DSMCLIP:
case ANIMTYPE_SHAPEKEY:
case ANIMTYPE_GPDATABLOCK:
case ANIMTYPE_GPLAYER:
case ANIMTYPE_GREASE_PENCIL_DATABLOCK:
case ANIMTYPE_GREASE_PENCIL_LAYER_GROUP:
case ANIMTYPE_GREASE_PENCIL_LAYER:
case ANIMTYPE_MASKDATABLOCK:
case ANIMTYPE_MASKLAYER:
case ANIMTYPE_NUM_TYPES:
break;
}
if (found > 0) {

View File

@@ -904,6 +904,51 @@ void draw_nla_main_data(bAnimContext *ac, SpaceNla *snla, ARegion *region)
GPU_blend(GPU_BLEND_NONE);
break;
}
case ANIMTYPE_NONE:
case ANIMTYPE_ANIMDATA:
case ANIMTYPE_SPECIALDATA__UNUSED:
case ANIMTYPE_SUMMARY:
case ANIMTYPE_SCENE:
case ANIMTYPE_OBJECT:
case ANIMTYPE_GROUP:
case ANIMTYPE_FCURVE:
case ANIMTYPE_NLACONTROLS:
case ANIMTYPE_NLACURVE:
case ANIMTYPE_FILLACT_LAYERED:
case ANIMTYPE_FILLACTD:
case ANIMTYPE_FILLDRIVERS:
case ANIMTYPE_DSMAT:
case ANIMTYPE_DSLAM:
case ANIMTYPE_DSCAM:
case ANIMTYPE_DSCACHEFILE:
case ANIMTYPE_DSCUR:
case ANIMTYPE_DSSKEY:
case ANIMTYPE_DSWOR:
case ANIMTYPE_DSNTREE:
case ANIMTYPE_DSPART:
case ANIMTYPE_DSMBALL:
case ANIMTYPE_DSARM:
case ANIMTYPE_DSMESH:
case ANIMTYPE_DSTEX:
case ANIMTYPE_DSLAT:
case ANIMTYPE_DSLINESTYLE:
case ANIMTYPE_DSSPK:
case ANIMTYPE_DSGPENCIL:
case ANIMTYPE_DSMCLIP:
case ANIMTYPE_DSHAIR:
case ANIMTYPE_DSPOINTCLOUD:
case ANIMTYPE_DSVOLUME:
case ANIMTYPE_SHAPEKEY:
case ANIMTYPE_GPDATABLOCK:
case ANIMTYPE_GPLAYER:
case ANIMTYPE_GREASE_PENCIL_DATABLOCK:
case ANIMTYPE_GREASE_PENCIL_LAYER_GROUP:
case ANIMTYPE_GREASE_PENCIL_LAYER:
case ANIMTYPE_MASKDATABLOCK:
case ANIMTYPE_MASKLAYER:
case ANIMTYPE_PALETTE:
case ANIMTYPE_NUM_TYPES:
break;
}
}
}

View File

@@ -651,25 +651,69 @@ static void createTransActionData(bContext *C, TransInfo *t)
cfra = float(scene->r.cfra);
}
if (ELEM(ale->type, ANIMTYPE_FCURVE, ANIMTYPE_NLACURVE)) {
adt_count = count_fcurve_keys(
static_cast<FCurve *>(ale->key_data), t->frame_side, cfra, is_prop_edit);
}
else if (ale->type == ANIMTYPE_GPLAYER) {
adt_count = count_gplayer_frames(
static_cast<bGPDlayer *>(ale->data), t->frame_side, cfra, is_prop_edit);
}
else if (ale->type == ANIMTYPE_GREASE_PENCIL_LAYER) {
using namespace blender::bke::greasepencil;
adt_count = count_grease_pencil_frames(
static_cast<Layer *>(ale->data), t->frame_side, cfra, is_prop_edit, use_duplicated);
}
else if (ale->type == ANIMTYPE_MASKLAYER) {
adt_count = count_masklayer_frames(
static_cast<MaskLayer *>(ale->data), t->frame_side, cfra, is_prop_edit);
}
else {
BLI_assert(0);
switch (ale->type) {
case ANIMTYPE_FCURVE:
case ANIMTYPE_NLACURVE:
adt_count = count_fcurve_keys(
static_cast<FCurve *>(ale->key_data), t->frame_side, cfra, is_prop_edit);
break;
case ANIMTYPE_GPLAYER:
adt_count = count_gplayer_frames(
static_cast<bGPDlayer *>(ale->data), t->frame_side, cfra, is_prop_edit);
break;
case ANIMTYPE_GREASE_PENCIL_LAYER: {
using namespace blender::bke::greasepencil;
adt_count = count_grease_pencil_frames(
static_cast<Layer *>(ale->data), t->frame_side, cfra, is_prop_edit, use_duplicated);
break;
}
case ANIMTYPE_MASKLAYER:
adt_count = count_masklayer_frames(
static_cast<MaskLayer *>(ale->data), t->frame_side, cfra, is_prop_edit);
break;
case ANIMTYPE_NONE:
case ANIMTYPE_ANIMDATA:
case ANIMTYPE_SPECIALDATA__UNUSED:
case ANIMTYPE_SUMMARY:
case ANIMTYPE_SCENE:
case ANIMTYPE_OBJECT:
case ANIMTYPE_GROUP:
case ANIMTYPE_NLACONTROLS:
case ANIMTYPE_FILLACT_LAYERED:
case ANIMTYPE_FILLACTD:
case ANIMTYPE_FILLDRIVERS:
case ANIMTYPE_DSMAT:
case ANIMTYPE_DSLAM:
case ANIMTYPE_DSCAM:
case ANIMTYPE_DSCACHEFILE:
case ANIMTYPE_DSCUR:
case ANIMTYPE_DSSKEY:
case ANIMTYPE_DSWOR:
case ANIMTYPE_DSNTREE:
case ANIMTYPE_DSPART:
case ANIMTYPE_DSMBALL:
case ANIMTYPE_DSARM:
case ANIMTYPE_DSMESH:
case ANIMTYPE_DSTEX:
case ANIMTYPE_DSLAT:
case ANIMTYPE_DSLINESTYLE:
case ANIMTYPE_DSSPK:
case ANIMTYPE_DSGPENCIL:
case ANIMTYPE_DSMCLIP:
case ANIMTYPE_DSHAIR:
case ANIMTYPE_DSPOINTCLOUD:
case ANIMTYPE_DSVOLUME:
case ANIMTYPE_SHAPEKEY:
case ANIMTYPE_GPDATABLOCK:
case ANIMTYPE_GREASE_PENCIL_DATABLOCK:
case ANIMTYPE_GREASE_PENCIL_LAYER_GROUP:
case ANIMTYPE_MASKDATABLOCK:
case ANIMTYPE_NLATRACK:
case ANIMTYPE_NLAACTION:
case ANIMTYPE_PALETTE:
case ANIMTYPE_NUM_TYPES:
BLI_assert_unreachable();
break;
}
if (adt_count > 0) {