Commit: ce6270d24dd5c76204d68f2a208e6d956b9a3301
Author: Hans Goudey
Date: Fri Aug 14 16:12:56 2020 -0400
Branches: property-search-ui-v2
https://developer.blender.org/rBce6270d24dd5c76204d68f2a208e6d956b9a3301
Property Search: Clarify comments, rename function
===================================================================
M source/blender/editors/include/UI_interface.h
M source/blender/editors/interface/interface_intern.h
M source/blender/editors/interface/interface_layout.c
M source/blender/editors/space_buttons/space_buttons.c
M source/blender/makesdna/DNA_space_types.h
===================================================================
diff --git a/source/blender/editors/include/UI_interface.h
b/source/blender/editors/include/UI_interface.h
index ace5e4db465..c3650e81a75 100644
--- a/source/blender/editors/include/UI_interface.h
+++ b/source/blender/editors/include/UI_interface.h
@@ -157,8 +157,8 @@ enum {
UI_BLOCK_POPOVER_ONCE = 1 << 22,
/** Always show keymaps, even for non-menus. */
UI_BLOCK_SHOW_SHORTCUT_ALWAYS = 1 << 23,
- /** The block is only used during the layout process and will not be drawn,
- * for the case of a subpanel of a closed panel. */
+ /** The block is only used during the layout process and will not be drawn.
+ * Currently just for the case of a panel's closed subpanel. */
UI_BLOCK_SEARCH_ONLY = 1 << 25,
};
diff --git a/source/blender/editors/interface/interface_intern.h
b/source/blender/editors/interface/interface_intern.h
index 422e487aed1..3f5c3b9a995 100644
--- a/source/blender/editors/interface/interface_intern.h
+++ b/source/blender/editors/interface/interface_intern.h
@@ -80,8 +80,9 @@ enum {
UI_ACTIVE = (1 << 2),
UI_HAS_ICON = (1 << 3),
UI_HIDDEN = (1 << 4),
- UI_SELECT_DRAW = (1 << 5), /* Display selected, doesn't impact
interaction. */
- UI_SEARCH_FILTER_MATCHES = (1 << 12), /* The button matches the search
filter. */
+ UI_SELECT_DRAW = (1 << 5), /* Display selected, doesn't impact interaction.
*/
+ /** The button matches the search filter, later used to deactivate it. */
+ UI_SEARCH_FILTER_MATCHES = (1 << 12),
/* warn: rest of uiBut->flag in UI_interface.h */
};
@@ -275,8 +276,8 @@ struct uiBut {
/**
* Used for property search, so that a button's label and decorator can be
filtered and
- * unfiltered along with it. Due to the sometimes arbitrary nature of these
values,
- * they aren't always filled.
+ * unfiltered along with it. Due to the sometimes arbitrary nature of which
button to choose
+ * for these values, they aren't always filled.
*/
uiBut *label_but;
uiBut *decorator_but;
diff --git a/source/blender/editors/interface/interface_layout.c
b/source/blender/editors/interface/interface_layout.c
index 466c1aca4cf..b6cc39a521f 100644
--- a/source/blender/editors/interface/interface_layout.c
+++ b/source/blender/editors/interface/interface_layout.c
@@ -85,9 +85,11 @@ typedef struct uiLayoutRoot {
int type;
int opcontext;
- /** If true, the root will be removed as part of the property search process.
+ /**
+ * If true, the root will be removed as part of the property search process.
* Necessary for cases like searching the contents of closed panels, where
the
- * block-level tag isn't enough because there might be buttons in the
header. */
+ * block-level tag isn't enough because there might be buttons in the header.
+ */
bool search_only;
int emw, emh;
diff --git a/source/blender/editors/space_buttons/space_buttons.c
b/source/blender/editors/space_buttons/space_buttons.c
index 51ae97b2bfe..3f7e4030f73 100644
--- a/source/blender/editors/space_buttons/space_buttons.c
+++ b/source/blender/editors/space_buttons/space_buttons.c
@@ -300,7 +300,9 @@ static void buttons_main_region_layout_properties(const
bContext *C,
C, region, ®ion->type->paneltypes, contexts, sbuts->mainb, vertical,
NULL);
}
-static void main_region_layout(const bContext *C, SpaceProperties *sbuts,
ARegion *region)
+static void main_region_layout_current_context(const bContext *C,
+ SpaceProperties *sbuts,
+ ARegion *region)
{
if (sbuts->mainb == BCONTEXT_TOOL) {
ED_view3d_buttons_region_layout_ex(C, region, "Tool");
@@ -340,10 +342,10 @@ static void property_search_all_tabs(const bContext *C,
/* Run the layout for the actual region if the tab matches to avoid doing
it again later on. */
const bool use_actual_region = sbuts->mainb == sbuts_copy->mainb;
if (use_actual_region) {
- main_region_layout(C, sbuts, main_region);
+ main_region_layout_current_context(C, sbuts, main_region);
}
else {
- main_region_layout(C_copy, sbuts_copy, region_copy);
+ main_region_layout_current_context(C_copy, sbuts_copy, region_copy);
}
/* Store whether this tab has any unfiltered panels left. */
@@ -378,7 +380,7 @@ static void buttons_main_region_layout(const bContext *C,
ARegion *region)
property_search_all_tabs(C, sbuts, region);
}
else {
- main_region_layout(C, sbuts, region);
+ main_region_layout_current_context(C, sbuts, region);
}
sbuts->mainbo = sbuts->mainb;
diff --git a/source/blender/makesdna/DNA_space_types.h
b/source/blender/makesdna/DNA_space_types.h
index 9be4780d487..af764c8dc1a 100644
--- a/source/blender/makesdna/DNA_space_types.h
+++ b/source/blender/makesdna/DNA_space_types.h
@@ -147,7 +147,7 @@ typedef struct SpaceProperties {
/** Context tabs. */
short mainb, mainbo, mainbuser;
- /** Bitfield flag (in the same order as the tabs) for whether each tab has
properties
+ /** Runtime. Bitfield flag (in the same order as the tabs) for whether each
tab has properties
* that match the search filter. Only valid when #search_string is set. */
int context_search_filter_active;
/** Preview is signal to refresh. */
_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs