Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntonio Vazquez <blendergit@gmail.com>2020-10-14 16:21:55 +0300
committerAntonio Vazquez <blendergit@gmail.com>2020-10-14 16:24:52 +0300
commitfecb276ef7b337145190a090169fe736145799b8 (patch)
tree5b7fb7487403d23b2834cbf8fb1645dc337f3279 /source/blender/editors/animation/anim_filter.c
parent459618d8606e9187a23e804b7e4bfd802d0ac2cd (diff)
UI: New option to invert search filter in Dopesheet
A lot of animator request an option to invert the filter of the dopesheet channels. This patch adds that invert filter option. This is not for Grease Pencil only, affect to all modes. {F8983328} Note: I have seen the new button has a rounded borders on the left. It would be better get rectangle shape, but not sure how to do it. Reviewed By: campbellbarton, pepeland Maniphest Tasks: T81676 Differential Revision: https://developer.blender.org/D9182 c68a2a
Diffstat (limited to 'source/blender/editors/animation/anim_filter.c')
-rw-r--r--source/blender/editors/animation/anim_filter.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/editors/animation/anim_filter.c b/source/blender/editors/animation/anim_filter.c
index 11581adf919..7cf4cb87fc8 100644
--- a/source/blender/editors/animation/anim_filter.c
+++ b/source/blender/editors/animation/anim_filter.c
@@ -1173,10 +1173,11 @@ static bool name_matches_dopesheet_filter(bDopeSheet *ads, char *name)
}
/* if we have a match somewhere, this returns true */
- return found;
+ return ((ads->flag & ADS_FLAG_INVERT_FILTER) == 0) ? found : !found;
}
/* fallback/default - just case insensitive, but starts from start of word */
- return BLI_strcasestr(name, ads->searchstr) != NULL;
+ bool found = BLI_strcasestr(name, ads->searchstr) != NULL;
+ return ((ads->flag & ADS_FLAG_INVERT_FILTER) == 0) ? found : !found;
}
/* (Display-)Name-based F-Curve filtering