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:
Diffstat (limited to 'source/blender/editors')
-rw-r--r--source/blender/editors/interface/interface_layout.c4
-rw-r--r--source/blender/editors/screen/area.c5
-rw-r--r--source/blender/editors/space_buttons/buttons_context.c2
-rw-r--r--source/blender/editors/space_buttons/space_buttons.c3
4 files changed, 13 insertions, 1 deletions
diff --git a/source/blender/editors/interface/interface_layout.c b/source/blender/editors/interface/interface_layout.c
index ad260274e78..03a017b5d4a 100644
--- a/source/blender/editors/interface/interface_layout.c
+++ b/source/blender/editors/interface/interface_layout.c
@@ -5167,6 +5167,10 @@ bool UI_block_apply_search_filter(uiBlock *block, const char *search_filter)
return false;
}
+ if (block->panel && block->panel->type && block->panel->type->flag & PNL_NO_SEARCH) {
+ return false;
+ }
+
const bool panel_label_matches = block_search_panel_label_matches(block, search_filter);
const bool has_result = (panel_label_matches) ?
diff --git a/source/blender/editors/screen/area.c b/source/blender/editors/screen/area.c
index f5962f36412..a5858d3d65c 100644
--- a/source/blender/editors/screen/area.c
+++ b/source/blender/editors/screen/area.c
@@ -3080,6 +3080,11 @@ static bool panel_property_search(const bContext *C,
uiBlock *block = UI_block_begin(C, region, panel_type->idname, UI_EMBOSS);
UI_block_set_search_only(block, true);
+ /* Skip panels that give meaningless search results. */
+ if (panel_type->flag & PNL_NO_SEARCH) {
+ return false;
+ }
+
if (panel == NULL) {
bool open; /* Dummy variable. */
panel = UI_panel_begin(region, &region->panels, block, panel_type, panel, &open);
diff --git a/source/blender/editors/space_buttons/buttons_context.c b/source/blender/editors/space_buttons/buttons_context.c
index 60ce86740cd..b31879e3745 100644
--- a/source/blender/editors/space_buttons/buttons_context.c
+++ b/source/blender/editors/space_buttons/buttons_context.c
@@ -1182,7 +1182,7 @@ void buttons_context_register(ARegionType *art)
strcpy(pt->translation_context, BLT_I18NCONTEXT_DEFAULT_BPYRNA);
pt->poll = buttons_panel_context_poll;
pt->draw = buttons_panel_context_draw;
- pt->flag = PNL_NO_HEADER;
+ pt->flag = PNL_NO_HEADER | PNL_NO_SEARCH;
BLI_addtail(&art->paneltypes, pt);
}
diff --git a/source/blender/editors/space_buttons/space_buttons.c b/source/blender/editors/space_buttons/space_buttons.c
index 3d470b19c1c..fa626ea0855 100644
--- a/source/blender/editors/space_buttons/space_buttons.c
+++ b/source/blender/editors/space_buttons/space_buttons.c
@@ -402,6 +402,9 @@ static void property_search_all_tabs(const bContext *C,
ScrArea *area_original = CTX_wm_area(C);
ScrArea area_copy = *area_original;
ARegion *region_copy = BKE_area_region_copy(area_copy.type, region_original);
+ /* Set the region visible field. Otherwise some layout code thinks we're drawing in a popup.
+ * This likely isn't necessary, but it's nice to emulate a "real" region where possible. */
+ region_copy->visible = true;
CTX_wm_area_set((bContext *)C, &area_copy);
CTX_wm_region_set((bContext *)C, region_copy);