diff options
author | Joshua Leung <aligorith@gmail.com> | 2016-03-23 16:44:39 +0300 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2016-03-23 16:45:14 +0300 |
commit | 6a4967ca6e6c6fd2a82c8af2549337e49d32756d (patch) | |
tree | 3f5841a69e24ca691f961aefca8d8bd1d474b548 /release/scripts/startup/bl_ui/space_dopesheet.py | |
parent | 21f31e60546f1f882494bacb84adee92a53d734c (diff) |
AnimEditors: Fuzzy/Multi-Word Name Filtering
Thanks to D1080 by @rockets, I've now been able to easily implement the
ability to type multiple word snippets/partial words into the text filter
field (in the Animation Editors), and have it filter the channels which
contain just some of those parts (instead of having to match everything).
For example, the following search strings will now work:
* "loc rot" or "lo ro" will now filter all location and rotation FCurves
* "col loc" will filter all location and color FCurves
* "scale" will also work as before to filter all scale FCurves
But, the following will not work:
* "lc rt" will NOT filter all location and rotation, as the fuzzy search only
breaks down the search string based on whitespace placement
By default, this is not enabled when using name filtering (i.e. magnifying glass is checked,
and some filtering text is specified). Instead, you need to enable the "AZ" toggle beside
the name field. This fuzzy matching is not enabled by default as it could end up being
quite a bit slower on really heavy scenes. (There are probably some optimisation
opportunities, but that's only a future option if someone really needs it)
Diffstat (limited to 'release/scripts/startup/bl_ui/space_dopesheet.py')
-rw-r--r-- | release/scripts/startup/bl_ui/space_dopesheet.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/release/scripts/startup/bl_ui/space_dopesheet.py b/release/scripts/startup/bl_ui/space_dopesheet.py index 47775251955..af40f1f070c 100644 --- a/release/scripts/startup/bl_ui/space_dopesheet.py +++ b/release/scripts/startup/bl_ui/space_dopesheet.py @@ -51,11 +51,13 @@ def dopesheet_filter(layout, context, genericFiltersOnly=False): row.prop(dopesheet, "show_only_matching_fcurves", text="") if dopesheet.show_only_matching_fcurves: row.prop(dopesheet, "filter_fcurve_name", text="") + row.prop(dopesheet, "use_multi_word_filter", text="") else: row = layout.row(align=True) row.prop(dopesheet, "use_filter_text", text="") if dopesheet.use_filter_text: row.prop(dopesheet, "filter_text", text="") + row.prop(dopesheet, "use_multi_word_filter", text="") if not genericFiltersOnly: row = layout.row(align=True) @@ -151,6 +153,7 @@ class DOPESHEET_HT_header(Header): row.prop(st.dopesheet, "use_filter_text", text="") if st.dopesheet.use_filter_text: row.prop(st.dopesheet, "filter_text", text="") + row.prop(st.dopesheet, "use_multi_word_filter", text="") row = layout.row(align=True) row.prop(toolsettings, "use_proportional_action", |