Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/animation/anim_filter.c
| Show First 20 Lines • Show All 1,709 Lines • ▼ Show 20 Lines | static size_t animdata_filter_shapekey(bAnimContext *ac, | ||||
| Key *key, | Key *key, | ||||
| int filter_mode) | int filter_mode) | ||||
| { | { | ||||
| size_t items = 0; | size_t items = 0; | ||||
| /* check if channels or only F-Curves */ | /* check if channels or only F-Curves */ | ||||
| if (filter_mode & ANIMFILTER_LIST_CHANNELS) { | if (filter_mode & ANIMFILTER_LIST_CHANNELS) { | ||||
| KeyBlock *kb; | KeyBlock *kb; | ||||
| bDopeSheet *ads = ac->ads; | |||||
| /* loop through the channels adding ShapeKeys as appropriate */ | /* loop through the channels adding ShapeKeys as appropriate */ | ||||
| for (kb = key->block.first; kb; kb = kb->next) { | for (kb = key->block.first; kb; kb = kb->next) { | ||||
| /* skip the first one, since that's the non-animatable basis */ | /* skip the first one, since that's the non-animatable basis */ | ||||
| if (kb == key->block.first) { | if (kb == key->block.first) { | ||||
| continue; | continue; | ||||
| } | } | ||||
| /* skip shapekey if the name doesn't match the filter string */ | |||||
sybren: Comments should be sentences. | |||||
lichtwerkAuthorUnsubmitted Done Inline Actionscopy-paste is not always your friend :) lichtwerk: copy-paste is not always your friend :) | |||||
| if (ads != NULL && ads->searchstr[0] != '\0' && | |||||
| name_matches_dopesheet_filter(ads, kb->name) == false) { | |||||
| continue; | |||||
| } | |||||
| /* only work with this channel and its subchannels if it is editable */ | /* only work with this channel and its subchannels if it is editable */ | ||||
| if (!(filter_mode & ANIMFILTER_FOREDIT) || EDITABLE_SHAPEKEY(kb)) { | if (!(filter_mode & ANIMFILTER_FOREDIT) || EDITABLE_SHAPEKEY(kb)) { | ||||
| /* Only include this track if selected in a way consistent | /* Only include this track if selected in a way consistent | ||||
| * with the filtering requirements. */ | * with the filtering requirements. */ | ||||
| if (ANIMCHANNEL_SELOK(SEL_SHAPEKEY(kb))) { | if (ANIMCHANNEL_SELOK(SEL_SHAPEKEY(kb))) { | ||||
| // TODO: consider 'active' too? | // TODO: consider 'active' too? | ||||
| /* owner-id here must be key so that the F-Curve can be resolved... */ | /* owner-id here must be key so that the F-Curve can be resolved... */ | ||||
| ▲ Show 20 Lines • Show All 1,825 Lines • Show Last 20 Lines | |||||
Comments should be sentences.