From a2921067994bdec012a5b9edc7168d10b1b0627c Mon Sep 17 00:00:00 2001 From: Philipp Oeser Date: Mon, 7 Sep 2020 11:45:10 +0200 Subject: Fix T80531: Dope Sheet Shape Key Editor search/filter not working Looks like this has just not been implemented before. Use the name matching method used in other Dope Sheet UI modes. Maniphest Tasks: T80531 Differential Revision: https://developer.blender.org/D8824 --- source/blender/editors/animation/anim_filter.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'source/blender/editors/animation') diff --git a/source/blender/editors/animation/anim_filter.c b/source/blender/editors/animation/anim_filter.c index b75437fff45..3416d72c021 100644 --- a/source/blender/editors/animation/anim_filter.c +++ b/source/blender/editors/animation/anim_filter.c @@ -1715,6 +1715,7 @@ static size_t animdata_filter_shapekey(bAnimContext *ac, /* check if channels or only F-Curves */ if (filter_mode & ANIMFILTER_LIST_CHANNELS) { KeyBlock *kb; + bDopeSheet *ads = ac->ads; /* loop through the channels adding ShapeKeys as appropriate */ for (kb = key->block.first; kb; kb = kb->next) { @@ -1723,6 +1724,12 @@ static size_t animdata_filter_shapekey(bAnimContext *ac, continue; } + /* Skip shapekey if the name doesn't match the filter string. */ + 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 */ if (!(filter_mode & ANIMFILTER_FOREDIT) || EDITABLE_SHAPEKEY(kb)) { /* Only include this track if selected in a way consistent -- cgit v1.2.3