Blender Git Loki

Git Commits -> Revision 58488c0

Revision 58488c0 by Hans Goudey (property-search-ui-v2)
September 9, 2020, 18:01 (GMT)
Property Search: Single tab

This adds a search bar to the properties editor. The full search for every tab
isn't includede in this patch, but the interaction with panels, searching
behavior, internal UI, region level, and DNA changes are included here.

The block-level search works by iterating over the block's buttons and
checking whether they match the search. If they do, they are tagged with
a flag, and the block's panel is tagged too.

For every update (text edit), the panel's expansion is set to whether the
panel has a result or not.

There is some complications to this that you might no initially think of:
1. Closed panel's subpanels have to be searched too. This adds some
complexity and special cases to the area-level panel layout code.
2. //Maybe more if I think of things to add here//

There might be some methods of simplifying some of the logic, particularly
around choosing whether to highlight panel headers. Also note that automatic
subpanel expansion isn't working right now. I'll look into this, but I want to post
all the patches first.

**Future Improvements**
Here are some improvements possible in the future that won't be part of this patch:
1. Use the new fuzzy search in BLI
2. Reseting panels to their expansion before the search started if you `esc`
out of the text box
3. Open parent panels if their subpanels have a match but they don't. This
requires adding a reference to parent panels for subpanels.

Differential Revision: https://developer.blender.org/D8856

Commit Details:

Full Hash: 58488c08b869a42f81c2acec5b14504a59d5b500
Parent Commit: 6a76eea
Lines Changed: +414, -24

12 Modified Paths:

/release/scripts/startup/bl_ui/space_properties.py (+4, -0) (Diff)
/source/blender/editors/include/ED_screen.h (+3, -0) (Diff)
/source/blender/editors/include/UI_interface.h (+9, -0) (Diff)
/source/blender/editors/interface/interface.c (+29, -2) (Diff)
/source/blender/editors/interface/interface_intern.h (+7, -1) (Diff)
/source/blender/editors/interface/interface_layout.c (+200, -0) (Diff)
/source/blender/editors/interface/interface_panel.c (+81, -15) (Diff)
/source/blender/editors/screen/area.c (+49, -6) (Diff)
/source/blender/editors/space_buttons/space_buttons.c (+1, -0) (Diff)
/source/blender/makesdna/DNA_screen_types.h (+8, -0) (Diff)
/source/blender/makesdna/DNA_space_types.h (+3, -0) (Diff)
/source/blender/makesrna/intern/rna_space.c (+20, -0) (Diff)
Tehnyt: Miika HämäläinenViimeksi päivitetty: 07.11.2014 14:18MiikaH:n Sivut a.k.a. MiikaHweb | 2003-2021