This patch enables property search for all tabs in the property editor.
This is definitely the most "crazy" of the changes in terms of code, but
it's also where the new functionality gets good.
In order to make interaction faster, if the editor's current tab doesn't
have a result, the search moves you to the next panel that does.
That way you can just press ctrl-F, search, and have the result appear.
In order to keep the searching safe, to make sure the editor isn't influenced
by anything that happens while building the layout for the other tabs,
the space is duplicated and the new search is run in the duplicated
editor. This also helps isolate this code, which could be fairly invasive
otherwise. While we could run the regular "single tab" property search,
that would also do everything else related to the layout pass, which less
efficient, and probably more complicated to maintain down the line.
So this patch implements basic searching panel searching code.
The search match status for every current tab of the property editor is
stored in a runtime field and them displayed later by dimming icons in
the tab selector panel to the left. The functionality for that dimming is
Note that the tool settings tab works slightly different than the other
tabs, so I've disabled searching it for this patch. That would be a relatively
simple improvement, but would just require a bit of refactoring of
This patch does not address the performance aspects of searching every
tab. This shouldn't be too bad, but it would be good to make some changes
to improve this, ideally in separate patches. I have done some initial profiling,
and it looks like a significant portion of time is spent doing string comparisons,
so that may be the best place to start. Here are some ideas:
- Use ghash instead of string lookups for panel types
- Possibly only search in other tabs while editing search string. I would like to avoid this though.
- Look into using ED_region_tag_redraw_no_rebuild for some interactions like panel dragging.
Exit early when a search match is found for a tab.Done