Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/animation/anim_filter.c
| Show First 20 Lines • Show All 1,801 Lines • ▼ Show 20 Lines | static size_t animdata_filter_gpencil_data(ListBase *anim_data, | ||||
| if (filter_mode & ANIMFILTER_ANIMDATA) { | if (filter_mode & ANIMFILTER_ANIMDATA) { | ||||
| /* just add GPD as a channel - this will add everything needed */ | /* just add GPD as a channel - this will add everything needed */ | ||||
| ANIMCHANNEL_NEW_CHANNEL(gpd, ANIMTYPE_GPDATABLOCK, gpd, NULL); | ANIMCHANNEL_NEW_CHANNEL(gpd, ANIMTYPE_GPDATABLOCK, gpd, NULL); | ||||
| } | } | ||||
| else { | else { | ||||
| ListBase tmp_data = {NULL, NULL}; | ListBase tmp_data = {NULL, NULL}; | ||||
| size_t tmp_items = 0; | size_t tmp_items = 0; | ||||
| if (!(filter_mode & ANIMFILTER_FCURVESONLY)) { | |||||
| /* add gpencil animation channels */ | /* add gpencil animation channels */ | ||||
| BEGIN_ANIMFILTER_SUBCHANNELS (EXPANDED_GPD(gpd)) { | BEGIN_ANIMFILTER_SUBCHANNELS (EXPANDED_GPD(gpd)) { | ||||
| tmp_items += animdata_filter_gpencil_layers_data(&tmp_data, ads, gpd, filter_mode); | tmp_items += animdata_filter_gpencil_layers_data(&tmp_data, ads, gpd, filter_mode); | ||||
| } | } | ||||
| END_ANIMFILTER_SUBCHANNELS; | END_ANIMFILTER_SUBCHANNELS; | ||||
| } | |||||
| /* did we find anything? */ | /* did we find anything? */ | ||||
| if (tmp_items) { | if (tmp_items) { | ||||
| /* include data-expand widget first */ | /* include data-expand widget first */ | ||||
| if (filter_mode & ANIMFILTER_LIST_CHANNELS) { | if (filter_mode & ANIMFILTER_LIST_CHANNELS) { | ||||
| /* add gpd as channel too (if for drawing, and it has layers) */ | /* add gpd as channel too (if for drawing, and it has layers) */ | ||||
| ANIMCHANNEL_NEW_CHANNEL(gpd, ANIMTYPE_GPDATABLOCK, NULL, NULL); | ANIMCHANNEL_NEW_CHANNEL(gpd, ANIMTYPE_GPDATABLOCK, NULL, NULL); | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 1,749 Lines • Show Last 20 Lines | |||||