Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans Goudey <h.goudey@me.com>2020-09-15 17:38:19 +0300
committerHans Goudey <h.goudey@me.com>2020-09-15 17:38:19 +0300
commit67e630609bb408e366398cb7ea9fdc09f31190e7 (patch)
tree3407d0cec29bc2b685a53334a7d6c0bc8d2d4e55 /source/blender/editors/interface/interface_intern.h
parentf886e138365b610adf932d38ba663fa81380ce29 (diff)
Property Search: Build button groups for Search
This is needed for property search (upcoming patch D8856) where a buttons labels are often separate buttons, but we need to highlight the label to show that a property is a search result. This is especially important in "property split" layouts where the label is almost always another button in a separate column. The button groups here are basically a flattened view of the buttons in the layout tree. Every function that adds a new set of buttons creates a new button group, and the new buttons are automatically added to the most recent group. Then, each group is searched separately in the property search phase. It's important that every function adding a new button set calls layout_root_new_button_group. Note that this won't be disabled when property search isn't active. It may be useful for other things in the future, and trying to pass that information to layout functions didn't feel worth it to me. Differential Revision: https://developer.blender.org/D8783
Diffstat (limited to 'source/blender/editors/interface/interface_intern.h')
-rw-r--r--source/blender/editors/interface/interface_intern.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/source/blender/editors/interface/interface_intern.h b/source/blender/editors/interface/interface_intern.h
index 4661d0816ae..edaadd880d7 100644
--- a/source/blender/editors/interface/interface_intern.h
+++ b/source/blender/editors/interface/interface_intern.h
@@ -994,6 +994,7 @@ void ui_resources_free(void);
/* interface_layout.c */
void ui_layout_add_but(uiLayout *layout, uiBut *but);
bool ui_layout_replace_but_ptr(uiLayout *layout, const void *old_but_ptr, uiBut *new_but);
+void ui_button_group_replace_but_ptr(uiLayout *layout, const void *old_but_ptr, uiBut *new_but);
uiBut *ui_but_add_search(uiBut *but,
PointerRNA *ptr,
PropertyRNA *prop,