125 ob =
OBACT(view_layer);
152 switch (saction->
mode) {
178 if (key && key->
adt) {
293 switch (sipo->
mode) {
376 return (ok && ac->
data);
443 #define BEGIN_ANIMFILTER_SUBCHANNELS(expanded_check) \
445 int _filter = filter_mode; \
446 short _doSubChannels = 0; \
447 if (!(filter_mode & ANIMFILTER_LIST_VISIBLE) || (expanded_check)) { \
448 _doSubChannels = 1; \
450 else if (!(filter_mode & ANIMFILTER_LIST_CHANNELS)) { \
451 _doSubChannels = 2; \
454 filter_mode |= ANIMFILTER_TMP_PEEK; \
458 (void)_doSubChannels; \
461 #define END_ANIMFILTER_SUBCHANNELS \
462 filter_mode = _filter; \
469 #define ANIMDATA_HAS_KEYS(id) ((id)->adt && (id)->adt->action)
472 #define ANIMDATA_HAS_DRIVERS(id) ((id)->adt && (id)->adt->drivers.first)
475 #define ANIMDATA_HAS_NLA(id) ((id)->adt && (id)->adt->nla_tracks.first)
512 #define ANIMDATA_FILTER_CASES(id, adtOk, nlaOk, driversOk, nlaKeysOk, keysOk) \
515 if (!(filter_mode & ANIMFILTER_CURVE_VISIBLE) || \
516 !((id)->adt->flag & ADT_CURVES_NOT_VISIBLE)) { \
517 if (filter_mode & ANIMFILTER_ANIMDATA) { \
520 else if (ads->filterflag & ADS_FILTER_ONLYNLA) { \
521 if (ANIMDATA_HAS_NLA(id)) { \
524 else if (!(ads->filterflag & ADS_FILTER_NLA_NOACT) || ANIMDATA_HAS_KEYS(id)) { \
528 else if (ads->filterflag & ADS_FILTER_ONLYDRIVERS) { \
529 if (ANIMDATA_HAS_DRIVERS(id)) { \
534 if (ANIMDATA_HAS_NLA(id)) { \
537 if (ANIMDATA_HAS_KEYS(id)) { \
556 #define ANIMCHANNEL_NEW_CHANNEL_FULL( \
557 channel_data, channel_type, owner_id, fcurve_owner_id, ale_statement) \
558 if (filter_mode & ANIMFILTER_TMP_PEEK) { \
562 bAnimListElem *ale = make_new_animlistelem( \
563 channel_data, channel_type, (ID *)owner_id, fcurve_owner_id); \
565 BLI_addtail(anim_data, ale); \
572 #define ANIMCHANNEL_NEW_CHANNEL(channel_data, channel_type, owner_id, fcurve_owner_id) \
573 ANIMCHANNEL_NEW_CHANNEL_FULL(channel_data, channel_type, owner_id, fcurve_owner_id, {})
578 #define ANIMCHANNEL_ACTIVEOK(ale) \
579 (!(filter_mode & ANIMFILTER_ACTIVE) || !(ale->adt) || (ale->adt->flag & ADT_UI_ACTIVE))
583 #define ANIMCHANNEL_SELOK(test_func) \
584 (!(filter_mode & (ANIMFILTER_SEL | ANIMFILTER_UNSEL)) || \
585 ((filter_mode & ANIMFILTER_SEL) && test_func) || \
586 ((filter_mode & ANIMFILTER_UNSEL) && test_func == 0))
596 #define ANIMCHANNEL_SELEDITOK(test_func) \
597 (!(filter_mode & ANIMFILTER_SELEDIT) || !(filter_mode & ANIMFILTER_FOREDIT) || (test_func))
617 ale->
type = datatype;
1044 char bone_name[
sizeof(pchan->
name)];
1053 if (pchan && pchan->
bone) {
1081 char seq_name[
sizeof(seq->
name)];
1123 char node_name[
sizeof(
node->name)];
1150 const size_t str_len = strlen(ads->
searchstr);
1155 ads->
searchstr, str_len,
' ', words, words_max);
1159 for (
int index = 0; index < words_len; index++) {
1184 ale_dummy.
type = channel_type;
1185 ale_dummy.
owner = owner;
1186 ale_dummy.
id = owner_id;
1187 ale_dummy.
data = fcu;
1191 if (acf && acf->
name) {
1195 acf->
name(&ale_dummy, name);
1264 for (fcu = first; ((fcu) && (fcu->
grp == grp)); fcu = fcu->
next) {
1274 if (ads && owner_id) {
1295 if (((ads) && (ads->
searchstr[0] !=
'\0')) && (owner_id)) {
1328 ID *fcurve_owner_id)
1375 size_t tmp_items = 0;
1425 &tmp_data, ads, first_fcu,
ANIMTYPE_FCURVE, filter_mode, agrp, owner_id, &act->
id);
1531 ale->data = adt->action ? adt->action : NULL;
1546 for (nlt = first; nlt; nlt =
next) {
1562 if (((ads) && (ads->
searchstr[0] !=
'\0')) && (owner_id)) {
1563 bool track_ok =
false, strip_ok =
false;
1568 if (track_ok ==
false) {
1579 if (!track_ok && !strip_ok) {
1602 size_t tmp_items = 0;
1813 size_t tmp_items = 0;
1869 if (base->object && (base->object->type ==
OB_GPENCIL)) {
1870 Object *ob = base->object;
1926 size_t tmp_items = 0;
1970 size_t tmp_items = 0;
2009 for (masklay =
mask->masklayers.first; masklay; masklay = masklay->
next) {
2039 size_t tmp_items = 0;
2081 size_t tmp_items = 0;
2168 size_t tmp_items = 0;
2212 size_t tmp_items = 0;
2265 if (owner_id ==
NULL) {
2269 switch (
GS(owner_id->
name)) {
2278 printf(
"ERROR: Unsupported owner_id (i.e. texture stack) for filter textures - %s\n",
2307 size_t tmp_items = 0;
2318 ac, &tmp_data, ads, (
ID *)ma, ma->nodetree, filter_mode);
2383 ID *owner_id = &ob->
id;
2465 size_t tmp_items = 0;
2481 ac, &tmp_data, ads, (
ID *)psys->
part, filter_mode);
2511 size_t tmp_items = 0;
2515 short type = 0, expanded = 0;
2666 ac, &tmp_data, ads, &la->
id,
ntree, filter_mode);
2699 size_t tmp_items = 0;
2733 size_t tmp_items = 0;
2737 short type = 0, expanded = 1;
2791 size_t tmp_items = 0;
2806 ac, &tmp_data, ads, ob->
pd->
tex, &ob->
id, filter_mode);
2870 size_t tmp_items = 0;
2881 ac, &tmp_data, ads, (
ID *)wo, wo->nodetree, filter_mode);
2910 size_t tmp_items = 0;
2914 short type = 0, expanded = 1;
2966 size_t tmp_items = 0;
3030 size_t tmp_items = 0;
3169 const Base *b1 = *((
const Base **)base1_ptr);
3170 const Base *b2 = *((
const Base **)base2_ptr);
3179 size_t *r_usable_bases)
3183 size_t num_bases = 0;
3185 Base **sorted_bases =
MEM_mallocN(
sizeof(
Base *) * tot_bases,
"Dopesheet Usable Sorted Bases");
3188 sorted_bases[num_bases++] = base;
3196 *r_usable_bases = num_bases;
3197 return sorted_bases;
3214 printf(
"Dope Sheet Error: No scene!\n");
3216 printf(
"\tPointer = %p, Name = '%s'\n",
3234 for (; cache_file; cache_file = cache_file->
id.
next) {
3257 (view_layer->object_bases.first != view_layer->object_bases.last)) {
3260 Base **sorted_bases;
3266 for (
size_t i = 0; i < num_bases; i++) {
3311 ads = &saction->
ads;
3354 switch (channel->
type) {
3376 printf(
"ERROR: Unsupported channel type (%d) in animdata_filter_animchan()\n",
3393 for (ale = anim_data->
first; ale; ale =
next) {
3420 for (ale = anim_data->
first; ale; ale =
next) {
3456 if (
data && anim_data) {
3560 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(const 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[], int array_index)
#define DRIVER_TARGETS_USED_LOOPER_BEGIN(dvar)
#define DRIVER_TARGETS_LOOPER_END
char * BKE_keyblock_curval_rnapath_get(const struct Key *key, const struct KeyBlock *kb)
struct Key * BKE_key_from_object(struct Object *ob)
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)
size_t int BLI_string_max_possible_word_count(int str_len)
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()
int BLI_string_find_split_words(const char *str, size_t len, char delim, int r_words[][2], int words_max) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
bool bool BLI_str_quoted_substr(const char *__restrict str, const char *__restrict prefix, char *result, size_t result_maxlen)
#define ID_IS_LINKED(_id)
#define ID_REAL_USERS(id)
#define ID_IS_OVERRIDE_LIBRARY(_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 FILTER_CURVES_OBJD(ha)
#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_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.
Group Output data from inside of a node group A color picker Mix two input colors RGB to Convert a color s luminance to a grayscale value Generate a normal vector and a dot product Bright Control the brightness and contrast of the input color Vector Map an input vectors to curves
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)
bool ANIM_animdata_can_have_greasepencil(const eAnimCont_Types type)
static bool nlaedit_get_context(bAnimContext *ac, SpaceNla *snla)
static bool fcurve_has_errors(const FCurve *fcu)
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 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)
static bool animdata_filter_base_is_ok(bDopeSheet *ads, Base *base, const eObjectMode object_mode, 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 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)
ccl_device_inline float4 mask(const int4 &mask, const float4 &a)
static void area(int d1, int d2, int e1, int e2, float weights[2])
Editing * SEQ_editing_get(const Scene *scene)
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
Sequence * SEQ_get_sequence_by_name(ListBase *seqbase, const char *name, bool recursive)