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:
- Closed panel's subpanels have to be searched too. This adds some complexity and special cases to the area-level panel layout code.
- 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:
- Use the new fuzzy search in BLI
- Reseting panels to their expansion before the search started if you esc out of the text box
- Open parent panels if their subpanels have a match but they don't. This requires adding a reference to parent panels for subpanels.