In case of being in Asset browsing mode, the search field is located in
the header (RGN_TYPE_HEADER not RGN_TYPE_UI as for file browsing mode).
To be future proof, now iterate all regions and act if the "filter_search" is found.
Details
Details
- Reviewers
Julian Eisel (Severin) - Maniphest Tasks
- T83888: Ctrl F in Asset Browser crashes blender
- Commits
- rBfed995ced5b0: Fix T83888: Ctrl F in Asset Browser crashes blender
Diff Detail
Diff Detail
- Repository
- rB Blender
Event Timeline
Comment Actions
I don't like that the current code makes assumptions about where the button is. That could change and then the operator would break. So I'd suggest iterating over all regions and stopping when UI_textbutton_activate_rna() exists successfully.
This might not work as expected if the button is shown in multiple regions, but a) that's a purely theoretical corner case currently and b) if somebody decides to do this it is a problem they'd have to be aware of either way.