Blender Git Loki
Git Commits -> Revision 4a4e36f
Revision 4a4e36f by Hans Goudey (property-search-ui-v2) September 9, 2020, 18:46 (GMT) |
Property Search: All tabs 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. There is one piece of funcionality that wasn't obvious when I began the implementation. 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. Only the layout pass is done in the other tabs, and it works by just running the regular single tab property search (D8856) and checking if any of the active panels in the tab match the search filter. 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 in D8858. Note that there are currently some issues with the tool tab, where some context variables end up being `None`. I'm curious if reviewers have any advice if they encounter this. **Future Improvements** This patch does not addresss 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: 1. Use ghash instead of string lookups for panel types 2. Possibly only search in other tabs while editing search string. I would like to avoid this though. 3. Look into using ED_region_tag_redraw_no_rebuild for some interactions like panel dragging. Differential Revision: https://developer.blender.org/D8859 |
Commit Details:
Full Hash: 4a4e36ff9bbc330f859b0e35d7b81029f0b59083
Parent Commit: 44dcc74
Lines Changed: +155, -9
6 Modified Paths:
/release/scripts/startup/bl_ui/space_properties.py (+5, -1) (Diff)
/source/blender/editors/include/UI_interface.h (+3, -0) (Diff)
/source/blender/editors/interface/interface_panel.c (+21, -4) (Diff)
/source/blender/editors/space_buttons/space_buttons.c (+113, -3) (Diff)
/source/blender/makesdna/DNA_space_types.h (+4, -1) (Diff)
/source/blender/makesrna/intern/rna_space.c (+9, -0) (Diff)
/source/blender/editors/include/UI_interface.h (+3, -0) (Diff)
/source/blender/editors/interface/interface_panel.c (+21, -4) (Diff)
/source/blender/editors/space_buttons/space_buttons.c (+113, -3) (Diff)
/source/blender/makesdna/DNA_space_types.h (+4, -1) (Diff)
/source/blender/makesrna/intern/rna_space.c (+9, -0) (Diff)