/* set all/none/invert select */ void ED_masklayer_frame_select_set(MaskLayer *masklay, short mode) { /* error checking */ if (masklay == NULL) return; /* now call the standard function */ ED_mask_select_frames(masklay, mode); }
/* option 4) select all keyframes in same channel */ static void actkeys_mselect_channel_only(bAnimContext *ac, bAnimListElem *ale, short select_mode) { KeyframeEditFunc select_cb; /* get functions for selecting keyframes */ select_cb = ANIM_editkeyframes_select(select_mode); /* select all keyframes in this channel */ if (ale->type == ANIMTYPE_GPLAYER) { ED_gpencil_select_frames(ale->data, select_mode); } else if (ale->type == ANIMTYPE_MASKLAYER) { ED_mask_select_frames(ale->data, select_mode); } 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_frames(ale->data, select_mode); } else if (ale->type == ANIMTYPE_MASKLAYER) { ED_mask_select_frames(ale->data, select_mode); } } ANIM_animdata_freelist(&anim_data); } else { ANIM_animchannel_keyframes_loop(NULL, ac->ads, ale, NULL, select_cb, NULL); } } }