141 ob =
OBACT(view_layer);
168 switch (saction->
mode) {
194 if (key && key->
adt) {
309 switch (sipo->
mode) {
397 return (ok && ac->
data);
464 #define BEGIN_ANIMFILTER_SUBCHANNELS(expanded_check) \
466 int _filter = filter_mode; \
467 short _doSubChannels = 0; \
468 if (!(filter_mode & ANIMFILTER_LIST_VISIBLE) || (expanded_check)) { \
469 _doSubChannels = 1; \
471 else if (!(filter_mode & ANIMFILTER_LIST_CHANNELS)) { \
472 _doSubChannels = 2; \
475 filter_mode |= ANIMFILTER_TMP_PEEK; \
479 (void)_doSubChannels; \
482 #define END_ANIMFILTER_SUBCHANNELS \
483 filter_mode = _filter; \
490 #define ANIMDATA_HAS_KEYS(id) ((id)->adt && (id)->adt->action)
493 #define ANIMDATA_HAS_DRIVERS(id) ((id)->adt && (id)->adt->drivers.first)
496 #define ANIMDATA_HAS_NLA(id) ((id)->adt && (id)->adt->nla_tracks.first)
533 #define ANIMDATA_FILTER_CASES(id, adtOk, nlaOk, driversOk, nlaKeysOk, keysOk) \
536 if (!(filter_mode & ANIMFILTER_CURVE_VISIBLE) || \
537 !((id)->adt->flag & ADT_CURVES_NOT_VISIBLE)) { \
538 if (filter_mode & ANIMFILTER_ANIMDATA) { \
541 else if (ads->filterflag & ADS_FILTER_ONLYNLA) { \
542 if (ANIMDATA_HAS_NLA(id)) { \
545 else if (!(ads->filterflag & ADS_FILTER_NLA_NOACT) || ANIMDATA_HAS_KEYS(id)) { \
549 else if (ads->filterflag & ADS_FILTER_ONLYDRIVERS) { \
550 if (ANIMDATA_HAS_DRIVERS(id)) { \
555 if (ANIMDATA_HAS_NLA(id)) { \
558 if (ANIMDATA_HAS_KEYS(id)) { \
577 #define ANIMCHANNEL_NEW_CHANNEL_FULL( \
578 channel_data, channel_type, owner_id, fcurve_owner_id, ale_statement) \
579 if (filter_mode & ANIMFILTER_TMP_PEEK) { \
583 bAnimListElem *ale = make_new_animlistelem( \
584 channel_data, channel_type, (ID *)owner_id, fcurve_owner_id); \
586 BLI_addtail(anim_data, ale); \
593 #define ANIMCHANNEL_NEW_CHANNEL(channel_data, channel_type, owner_id, fcurve_owner_id) \
594 ANIMCHANNEL_NEW_CHANNEL_FULL(channel_data, channel_type, owner_id, fcurve_owner_id, {})
599 #define ANIMCHANNEL_ACTIVEOK(ale) \
600 (!(filter_mode & ANIMFILTER_ACTIVE) || !(ale->adt) || (ale->adt->flag & ADT_UI_ACTIVE))
604 #define ANIMCHANNEL_SELOK(test_func) \
605 (!(filter_mode & (ANIMFILTER_SEL | ANIMFILTER_UNSEL)) || \
606 ((filter_mode & ANIMFILTER_SEL) && test_func) || \
607 ((filter_mode & ANIMFILTER_UNSEL) && test_func == 0))
617 #define ANIMCHANNEL_SELEDITOK(test_func) \
618 (!(filter_mode & ANIMFILTER_SELEDIT) || !(filter_mode & ANIMFILTER_FOREDIT) || (test_func))
638 ale->
type = datatype;
1077 if ((pchan) && (pchan->
bone)) {
1158 const size_t str_len = strlen(ads->
searchstr);
1163 ads->
searchstr, str_len,
' ', words, words_max);
1167 for (
int index = 0; index < words_len; index++) {
1192 ale_dummy.
type = channel_type;
1193 ale_dummy.
owner = owner;
1194 ale_dummy.
id = owner_id;
1195 ale_dummy.
data = fcu;
1199 if (acf && acf->
name) {
1203 acf->
name(&ale_dummy, name);
1272 for (fcu = first; ((fcu) && (fcu->
grp == grp)); fcu = fcu->
next) {
1282 if (ads && owner_id) {
1303 if (((ads) && (ads->
searchstr[0] !=
'\0')) && (owner_id)) {
1336 ID *fcurve_owner_id)
1383 size_t tmp_items = 0;
1433 &tmp_data, ads, first_fcu,
ANIMTYPE_FCURVE, filter_mode, agrp, owner_id, &act->
id);
1539 ale->data = adt->action ? adt->action : NULL;
1554 for (nlt = first; nlt; nlt =
next) {
1570 if (((ads) && (ads->
searchstr[0] !=
'\0')) && (owner_id)) {
1571 bool track_ok =
false, strip_ok =
false;
1576 if (track_ok ==
false) {
1587 if (!track_ok && !strip_ok) {
1610 size_t tmp_items = 0;
1821 size_t tmp_items = 0;
1875 if (base->object && (base->object->type ==
OB_GPENCIL)) {
1876 Object *ob = base->object;
1932 size_t tmp_items = 0;
1973 size_t tmp_items = 0;
2012 for (masklay =
mask->masklayers.first; masklay; masklay = masklay->
next) {
2042 size_t tmp_items = 0;
2084 size_t tmp_items = 0;
2171 size_t tmp_items = 0;
2215 size_t tmp_items = 0;
2268 if (owner_id ==
NULL) {
2272 switch (
GS(owner_id->
name)) {
2281 printf(
"ERROR: Unsupported owner_id (i.e. texture stack) for filter textures - %s\n",
2310 size_t tmp_items = 0;
2321 ac, &tmp_data, ads, (
ID *)ma, ma->nodetree, filter_mode);
2386 ID *owner_id = &ob->
id;
2468 size_t tmp_items = 0;
2484 ac, &tmp_data, ads, (
ID *)psys->
part, filter_mode);
2514 size_t tmp_items = 0;
2518 short type = 0, expanded = 0;
2669 ac, &tmp_data, ads, &la->
id,
ntree, filter_mode);
2702 size_t tmp_items = 0;
2736 size_t tmp_items = 0;
2740 short type = 0, expanded = 1;
2794 size_t tmp_items = 0;
2809 ac, &tmp_data, ads, ob->
pd->
tex, &ob->
id, filter_mode);
2873 size_t tmp_items = 0;
2884 ac, &tmp_data, ads, (
ID *)wo, wo->nodetree, filter_mode);
2913 size_t tmp_items = 0;
2917 short type = 0, expanded = 1;
2969 size_t tmp_items = 0;
3033 size_t tmp_items = 0;
3158 const Base *b1 = *((
const Base **)base1_ptr);
3159 const Base *b2 = *((
const Base **)base2_ptr);
3168 size_t *r_usable_bases)
3172 size_t num_bases = 0;
3174 Base **sorted_bases =
MEM_mallocN(
sizeof(
Base *) * tot_bases,
"Dopesheet Usable Sorted Bases");
3177 sorted_bases[num_bases++] = base;
3185 *r_usable_bases = num_bases;
3186 return sorted_bases;
3203 printf(
"Dope Sheet Error: No scene!\n");
3205 printf(
"\tPointer = %p, Name = '%s'\n",
3223 for (; cache_file; cache_file = cache_file->
id.
next) {
3246 (view_layer->object_bases.first != view_layer->object_bases.last)) {
3249 Base **sorted_bases;
3255 for (
size_t i = 0; i < num_bases; i++) {
3298 ads = &saction->
ads;
3341 switch (channel->
type) {
3363 printf(
"ERROR: Unsupported channel type (%d) in animdata_filter_animchan()\n",
3380 for (ale = anim_data->
first; ale; ale =
next) {
3407 for (ale = anim_data->
first; ale; ale =
next) {
3451 if (
data && anim_data) {
3555 printf(
"ANIM_animdata_filter() - Invalid datatype argument %u\n", datatype);
Blender kernel action and pose functionality.
struct bPoseChannel * BKE_pose_channel_find_name(const struct bPose *pose, const char *name)
struct AnimData * BKE_animdata_from_id(struct ID *id)
bool BKE_collection_has_object_recursive(struct Collection *collection, struct Object *ob)
struct ScrArea * CTX_wm_area(const bContext *C)
struct Scene * CTX_data_scene(const bContext *C)
struct ViewLayer * CTX_data_view_layer(const bContext *C)
struct SpaceLink * CTX_wm_space_data(const bContext *C)
struct ARegion * CTX_wm_region(const bContext *C)
struct Depsgraph * CTX_data_depsgraph_pointer(const bContext *C)
struct Main * CTX_data_main(const bContext *C)
struct FCurve * BKE_fcurve_find(ListBase *list, const char rna_path[], const int array_index)
#define DRIVER_TARGETS_USED_LOOPER_BEGIN(dvar)
#define DRIVER_TARGETS_LOOPER_END
struct Key * BKE_key_from_object(const struct Object *ob)
char * BKE_keyblock_curval_rnapath_get(struct Key *key, struct KeyBlock *kb)
struct MaskLayer * BKE_mask_layer_active(struct Mask *mask)
General operations, lookup, etc. for materials.
struct Material * BKE_object_material_get(struct Object *ob, short act)
void BKE_modifiers_foreach_ID_link(struct Object *ob, IDWalkFunc walk, void *userData)
struct bNode * nodeFindNodebyName(struct bNodeTree *ntree, const char *name)
#define BLI_array_alloca(arr, realsize)
GSet * BLI_gset_ptr_new(const char *info)
void BLI_gset_free(GSet *gs, GSetKeyFreeFP keyfreefp)
bool BLI_gset_add(GSet *gs, void *key)
BLI_INLINE bool BLI_listbase_is_empty(const struct ListBase *lb)
#define LISTBASE_FOREACH(type, var, list)
void BLI_freelinkN(struct ListBase *listbase, void *vlink) ATTR_NONNULL(1)
void void void BLI_movelisttolist(struct ListBase *dst, struct ListBase *src) ATTR_NONNULL(1
void BLI_addtail(struct ListBase *listbase, void *vlink) ATTR_NONNULL(1)
int BLI_findindex(const struct ListBase *listbase, const void *vlink) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
int BLI_listbase_count(const struct ListBase *listbase) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
char * BLI_strncasestr(const char *s, const char *find, size_t len) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
char * BLI_strcasestr(const char *s, const char *find) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
size_t int BLI_string_max_possible_word_count(const int str_len)
int BLI_string_find_split_words(const char *str, const size_t len, const char delim, int r_words[][2], int words_max) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
char * BLI_str_quoted_substrN(const char *__restrict str, const char *__restrict prefix) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL() ATTR_MALLOC
#define ID_IS_LINKED(_id)
#define ID_REAL_USERS(id)
@ ADS_FILTER_NOMOVIECLIPS
@ ADS_FILTER_NOCACHEFILES
@ ADS_FILTER_NOPOINTCLOUD
@ ADS_FLAG_SUMMARY_COLLAPSED
@ ADT_CURVES_ALWAYS_VISIBLE
@ ADT_NLA_SKEYS_COLLAPSED
Object is a sort of wrapper for general info.
#define SCE_KEYS_NO_SELONLY
#define OBACT(_view_layer)
#define FILTER_SPK_OBJD(spk)
#define FILTER_CACHEFILE_OBJD(cf)
#define EXPANDED_MCLIP(clip)
#define FILTER_NTREE_DATA(ntree)
#define FILTER_SKE_OBJD(key)
#define FILTER_MESH_OBJD(me)
#define EDITABLE_GPL(gpl)
#define EXPANDED_SCEC(sce)
#define SEL_MASKLAY(masklay)
#define FILTER_ARM_OBJD(arm)
#define EDITABLE_AGRP(agrp)
#define EXPANDED_AGRP(ac, agrp)
#define FILTER_CAM_OBJD(ca)
#define FILTER_LATTICE_OBJD(lt)
#define EXPANDED_ACTC(actc)
#define FILTER_LAM_OBJD(la)
#define EXPANDED_OBJC(ob)
#define EDITABLE_SHAPEKEY(kb)
#define EDITABLE_FCU(fcu)
#define EDITABLE_MASK(masklay)
#define FILTER_CUR_OBJD(cu)
#define FILTER_MAT_OBJD(ma)
#define EDITABLE_NLT(nlt)
#define FILTER_WOR_SCED(wo)
#define FILTER_MBALL_OBJD(mb)
#define FILTER_HAIR_OBJD(ha)
#define FILTER_LS_SCED(linestyle)
#define EXPANDED_DRVD(adt)
#define EXPANDED_MASK(mask)
#define SEL_ANIMDATA(adt)
#define FILTER_SIMULATION_OBJD(sim)
#define FILTER_POINTS_OBJD(pt)
#define EXPANDED_GPD(gpd)
#define FILTER_TEX_DATA(tex)
#define FILTER_VOLUME_OBJD(vo)
@ ANIMFILTER_DATA_VISIBLE
@ ANIMFILTER_CURVE_VISIBLE
@ ANIMFILTER_LIST_VISIBLE
@ ANIMFILTER_LIST_CHANNELS
@ ANIMFILTER_TMP_IGNORE_ONLYSEL
#define FILTER_PART_OBJD(part)
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum type
Read Guarded memory(de)allocation.
struct bTheme * UI_GetTheme(void)
const bAnimChannelType * ANIM_channel_get_typeinfo(bAnimListElem *ale)
static size_t animdata_filter_ds_cachefile(bAnimContext *ac, ListBase *anim_data, bDopeSheet *ads, CacheFile *cache_file, int filter_mode)
static bool nlaedit_get_context(bAnimContext *ac, SpaceNla *snla)
static size_t animdata_filter_mask(Main *bmain, ListBase *anim_data, void *UNUSED(data), int filter_mode)
static size_t animdata_filter_ds_nodetree_group(bAnimContext *ac, ListBase *anim_data, bDopeSheet *ads, ID *owner_id, bNodeTree *ntree, int filter_mode)
static size_t animfilter_act_group(bAnimContext *ac, ListBase *anim_data, bDopeSheet *ads, bAction *act, bActionGroup *agrp, int filter_mode, ID *owner_id)
#define ANIMCHANNEL_SELOK(test_func)
static void animedit_get_yscale_factor(bAnimContext *ac)
static size_t animdata_filter_ds_scene(bAnimContext *ac, ListBase *anim_data, bDopeSheet *ads, Scene *sce, int filter_mode)
static bool fcurve_has_errors(FCurve *fcu)
static size_t animfilter_nla(bAnimContext *UNUSED(ac), ListBase *anim_data, bDopeSheet *ads, AnimData *adt, int filter_mode, ID *owner_id)
static Key * actedit_get_shapekeys(bAnimContext *ac)
static bool skip_fcurve_selected_data(bDopeSheet *ads, FCurve *fcu, ID *owner_id, int filter_mode)
static size_t animfilter_fcurves(ListBase *anim_data, bDopeSheet *ads, FCurve *first, eAnim_ChannelType fcurve_type, int filter_mode, void *owner, ID *owner_id, ID *fcurve_owner_id)
static size_t animdata_filter_dopesheet_ob(bAnimContext *ac, ListBase *anim_data, bDopeSheet *ads, Base *base, int filter_mode)
#define ANIMDATA_FILTER_CASES(id, adtOk, nlaOk, driversOk, nlaKeysOk, keysOk)
static size_t animdata_filter_ds_gpencil(bAnimContext *ac, ListBase *anim_data, bDopeSheet *ads, bGPdata *gpd, int filter_mode)
static size_t animdata_filter_ds_linestyle(bAnimContext *ac, ListBase *anim_data, bDopeSheet *ads, Scene *sce, int filter_mode)
static size_t animdata_filter_gpencil(bAnimContext *ac, ListBase *anim_data, void *UNUSED(data), int filter_mode)
static size_t animdata_filter_ds_movieclip(bAnimContext *ac, ListBase *anim_data, bDopeSheet *ads, MovieClip *clip, int filter_mode)
static size_t animdata_filter_dopesheet(bAnimContext *ac, ListBase *anim_data, bDopeSheet *ads, int filter_mode)
bool ANIM_animdata_get_context(const bContext *C, bAnimContext *ac)
static Base ** animdata_filter_ds_sorted_bases(bDopeSheet *ads, ViewLayer *view_layer, int filter_mode, size_t *r_usable_bases)
#define ANIMCHANNEL_ACTIVEOK(ale)
static size_t animdata_filter_ds_material(bAnimContext *ac, ListBase *anim_data, bDopeSheet *ads, Material *ma, int filter_mode)
static size_t animdata_filter_remove_invalid(ListBase *anim_data)
static size_t animdata_filter_gpencil_layers_data(ListBase *anim_data, bDopeSheet *ads, bGPdata *gpd, int filter_mode)
static size_t animdata_filter_ds_obdata(bAnimContext *ac, ListBase *anim_data, bDopeSheet *ads, Object *ob, int filter_mode)
static bool name_matches_dopesheet_filter(bDopeSheet *ads, char *name)
static bool skip_fcurve_with_name(bDopeSheet *ads, FCurve *fcu, eAnim_ChannelType channel_type, void *owner, ID *owner_id)
bool ANIM_animdata_context_getdata(bAnimContext *ac)
static void animfilter_modifier_idpoin_cb(void *afm_ptr, Object *ob, ID **idpoin, int UNUSED(cb_flag))
#define ANIMCHANNEL_NEW_CHANNEL_FULL(channel_data, channel_type, owner_id, fcurve_owner_id, ale_statement)
static FCurve * animfilter_fcurve_next(bDopeSheet *ads, FCurve *first, eAnim_ChannelType channel_type, int filter_mode, void *owner, ID *owner_id)
static size_t animdata_filter_animchan(bAnimContext *ac, ListBase *anim_data, bDopeSheet *ads, bAnimListElem *channel, int filter_mode)
static size_t animfilter_block_data(bAnimContext *ac, ListBase *anim_data, bDopeSheet *ads, ID *id, int filter_mode)
#define ANIMCHANNEL_NEW_CHANNEL(channel_data, channel_type, owner_id, fcurve_owner_id)
static size_t animdata_filter_ds_keyanim(bAnimContext *ac, ListBase *anim_data, bDopeSheet *ads, Object *ob, Key *key, int filter_mode)
static short animdata_filter_dopesheet_summary(bAnimContext *ac, ListBase *anim_data, int filter_mode, size_t *items)
static size_t animdata_filter_dopesheet_movieclips(bAnimContext *ac, ListBase *anim_data, bDopeSheet *ads, int filter_mode)
static size_t animdata_filter_gpencil_data(ListBase *anim_data, bDopeSheet *ads, bGPdata *gpd, int filter_mode)
static int ds_base_sorting_cmp(const void *base1_ptr, const void *base2_ptr)
static size_t animdata_filter_ds_modifiers(bAnimContext *ac, ListBase *anim_data, bDopeSheet *ads, Object *ob, int filter_mode)
static size_t animdata_filter_ds_particles(bAnimContext *ac, ListBase *anim_data, bDopeSheet *ads, Object *ob, int filter_mode)
static size_t animdata_filter_ds_obanim(bAnimContext *ac, ListBase *anim_data, bDopeSheet *ads, Object *ob, int filter_mode)
size_t ANIM_animdata_filter(bAnimContext *ac, ListBase *anim_data, eAnimFilter_Flags filter_mode, void *data, eAnimCont_Types datatype)
static size_t animdata_filter_mask_data(ListBase *anim_data, Mask *mask, const int filter_mode)
#define END_ANIMFILTER_SUBCHANNELS
static size_t animdata_filter_ds_world(bAnimContext *ac, ListBase *anim_data, bDopeSheet *ads, Scene *sce, World *wo, int filter_mode)
static size_t animdata_filter_dopesheet_scene(bAnimContext *ac, ListBase *anim_data, bDopeSheet *ads, Scene *sce, int filter_mode)
static size_t animdata_filter_ds_texture(bAnimContext *ac, ListBase *anim_data, bDopeSheet *ads, Tex *tex, ID *owner_id, int filter_mode)
static size_t animdata_filter_ds_textures(bAnimContext *ac, ListBase *anim_data, bDopeSheet *ads, ID *owner_id, int filter_mode)
static size_t animdata_filter_remove_duplis(ListBase *anim_data)
static size_t animdata_filter_ds_nodetree(bAnimContext *ac, ListBase *anim_data, bDopeSheet *ads, ID *owner_id, bNodeTree *ntree, int filter_mode)
static size_t animdata_filter_ds_materials(bAnimContext *ac, ListBase *anim_data, bDopeSheet *ads, Object *ob, int filter_mode)
#define BEGIN_ANIMFILTER_SUBCHANNELS(expanded_check)
static bool graphedit_get_context(bAnimContext *ac, SpaceGraph *sipo)
static bool animdata_filter_base_is_ok(bDopeSheet *ads, Base *base, int filter_mode)
static bool actedit_get_context(bAnimContext *ac, SpaceAction *saction)
static bAnimListElem * make_new_animlistelem(void *data, short datatype, ID *owner_id, ID *fcurve_owner_id)
static size_t animfilter_nla_controls(ListBase *anim_data, bDopeSheet *ads, AnimData *adt, int filter_mode, ID *owner_id)
static size_t animdata_filter_shapekey(bAnimContext *ac, ListBase *anim_data, Key *key, int filter_mode)
static size_t animfilter_action(bAnimContext *ac, ListBase *anim_data, bDopeSheet *ads, bAction *act, int filter_mode, ID *owner_id)
#define ANIMCHANNEL_SELEDITOK(test_func)
struct tAnimFilterModifiersContext tAnimFilterModifiersContext
ListBase * ED_context_get_markers(const bContext *C)
FreestyleLineStyle linestyle
void(* MEM_freeN)(void *vmemh)
void *(* MEM_callocN)(size_t len, const char *str)
void *(* MEM_mallocN)(size_t len, const char *str)
static void area(int d1, int d2, int e1, int e2, float weights[2])
Editing * SEQ_editing_get(Scene *scene, bool alloc)
Sequence * SEQ_select_active_get(Scene *scene)
struct FreestyleLineStyle * linestyle
struct FreestyleLineSet * next
struct bNodeTree * nodetree
struct ParticleSystem * next
struct bNodeTree * nodetree
struct bNodeTree * nodetree
struct FreestyleConfig freestyle_config
struct bActionGroup * next
void(* name)(bAnimListElem *ale, char *name)
struct ViewLayer * view_layer
struct Depsgraph * depsgraph
struct ID * fcurve_owner_id
struct bAnimListElem * next
struct Collection * filter_grp
ccl_device_inline float4 mask(const int4 &mask, const float4 &a)
Sequence * SEQ_get_sequence_by_name(ListBase *seqbase, const char *name, bool recursive)