From dede4aac5be942d7619d29680a7534e536617946 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Foucault?= Date: Tue, 17 Nov 2020 15:56:18 +0100 Subject: Fix T77561 EEVEE: Refraction BSDF is using world probe during glossy bake This fixes light leaking during baking indoor environment when using refraction bsdfs. --- source/blender/draw/engines/eevee/shaders/closure_lit_lib.glsl | 3 +++ 1 file changed, 3 insertions(+) (limited to 'source') diff --git a/source/blender/draw/engines/eevee/shaders/closure_lit_lib.glsl b/source/blender/draw/engines/eevee/shaders/closure_lit_lib.glsl index 613b48ff9b8..30ce60f3ec0 100644 --- a/source/blender/draw/engines/eevee/shaders/closure_lit_lib.glsl +++ b/source/blender/draw/engines/eevee/shaders/closure_lit_lib.glsl @@ -464,6 +464,9 @@ void CLOSURE_NAME(vec3 N float btdf = get_btdf_lut(NV, roughness, ior); out_refr += refr_accum.rgb * btdf; + + /* Global toggle for lightprobe baking. */ + out_refr *= float(specToggle); # endif # ifdef CLOSURE_CLEARCOAT -- cgit v1.2.3 From 0724fabcf52ad9b97649969ab3c830b9fd5ac9ea Mon Sep 17 00:00:00 2001 From: Julian Eisel Date: Tue, 17 Nov 2020 15:25:05 +0100 Subject: Fix T81227: Modifier menu and text switch places Logic was incorrect, mistake in f3b8792b963b. Updated comment to make intent more clear. Same as fd78f8699e03, but needed conflict resolution as the panel-type flags where renamed in master. --- source/blender/editors/interface/interface_panel.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'source') diff --git a/source/blender/editors/interface/interface_panel.c b/source/blender/editors/interface/interface_panel.c index bfe5dc223c8..e6e9f378349 100644 --- a/source/blender/editors/interface/interface_panel.c +++ b/source/blender/editors/interface/interface_panel.c @@ -1654,12 +1654,12 @@ static int find_highest_panel(const void *a, const void *b) /* Stick uppermost header-less panels to the top of the region - * prevent them from being sorted (multiple header-less panels have to be sorted though). */ if (panel_a->type->flag & PNL_NO_HEADER && panel_b->type->flag & PNL_NO_HEADER) { - /* Skip and check for `ofsy` and #Panel.sortorder below. */ + /* Pass the no-header checks and check for `ofsy` and #Panel.sortorder below. */ } - if (panel_a->type->flag & PNL_NO_HEADER) { + else if (panel_a->type->flag & PNL_NO_HEADER) { return -1; } - if (panel_b->type->flag & PNL_NO_HEADER) { + else if (panel_b->type->flag & PNL_NO_HEADER) { return 1; } -- cgit v1.2.3 From cc0b8cb3599f50012bd90a0c41462290007f3328 Mon Sep 17 00:00:00 2001 From: Hans Goudey Date: Tue, 17 Nov 2020 10:07:38 -0500 Subject: Fix T82341: Warning in terminal during property search After recent changes to the context panel layout (rB187cc5e26d28b1a8), there has been an error printed when running propery search: > Error: separator_spacer() not supported in popups. The layout code thinks it's drawing in a menu because region->visible isn't properly set for the other tab searches. This patch sets that field for the temporary searching region, but it also disables searching in the context breadcrumbs panel, because at best this will just give results for the names of the active object, etc. This isn't helpful since those labels are mostly in every tab anyway. Differential Revision: https://developer.blender.org/D9425 --- source/blender/editors/interface/interface_layout.c | 4 ++++ source/blender/editors/screen/area.c | 5 +++++ source/blender/editors/space_buttons/buttons_context.c | 2 +- source/blender/editors/space_buttons/space_buttons.c | 3 +++ source/blender/makesdna/DNA_screen_types.h | 2 ++ 5 files changed, 15 insertions(+), 1 deletion(-) (limited to 'source') 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, ®ion->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); diff --git a/source/blender/makesdna/DNA_screen_types.h b/source/blender/makesdna/DNA_screen_types.h index f0ff02d3668..ce56dbcaf8e 100644 --- a/source/blender/makesdna/DNA_screen_types.h +++ b/source/blender/makesdna/DNA_screen_types.h @@ -568,6 +568,8 @@ enum { PNL_INSTANCED = (1 << 4), /** Draw panel like a box widget. */ PNL_DRAW_BOX = (1 << 6), + /** Don't search this panel for property search. */ + PNL_NO_SEARCH = (1 << 7), }; /* Fallback panel category (only for old scripts which need updating) */ -- cgit v1.2.3