diff options
author | Hans Goudey <h.goudey@me.com> | 2020-10-13 21:10:41 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2020-10-13 21:10:41 +0300 |
commit | 7c633686e99512d33391f30e4602213ed3890802 (patch) | |
tree | 5c0b651851d9de7896ea9687d83ed62059f84492 /source/blender/editors/include/ED_screen.h | |
parent | 96dd299055a1ce35819480f3c4b938f8e6f91537 (diff) |
Property Search: Find results in all tabs
This patch enables property search for all tabs in the property editor.
To make interaction faster, if the editor's current tab doesn't have a
result, the current tab changes to the next tab that has a match.
This patch implements basic code that only searches panels.
While we could run the existing "single tab" property search for every
tab, that would also do everything else related to the layout pass,
which would be less efficient, and maybe more complicated to maintain.
The search match status for every current tab of the property editor is
stored in a runtime bitfield and them displayed later by dimming icons
in the tab selector panel to the left. Using `BLI_bitmap` properly in
the runtime struct required moving it to `buttons_intern.h` and
adding a small API to access the search filter instead.
To make sure the editor isn't influenced by anything that happens while
building the layout for other tabs, most of the context is duplicated
and the new search is run in the duplicated editor.
Note that the tool settings tab works slightly different than the other
tabs, so I've disabled searching it for this commit. That would be a
relatively simple improvement, but would just require a bit of
refactoring of existing code.
Differential Revision: https://developer.blender.org/D8859
Diffstat (limited to 'source/blender/editors/include/ED_screen.h')
-rw-r--r-- | source/blender/editors/include/ED_screen.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/editors/include/ED_screen.h b/source/blender/editors/include/ED_screen.h index 53554e3f34c..b8500ba0c37 100644 --- a/source/blender/editors/include/ED_screen.h +++ b/source/blender/editors/include/ED_screen.h @@ -92,6 +92,11 @@ void ED_region_panels_layout_ex(const struct bContext *C, struct ListBase *paneltypes, const char *contexts[], const char *category_override); +bool ED_region_property_search(const struct bContext *C, + struct ARegion *region, + struct ListBase *paneltypes, + const char *contexts[], + const char *category_override); void ED_region_panels_layout(const struct bContext *C, struct ARegion *region); void ED_region_panels_draw(const struct bContext *C, struct ARegion *region); |