[Bf-blender-cvs] [ed4cbde967a] blender-v2.82-release: Fix T66699 EEVEE: Material Preview "World" option doesn't work
Clément Foucault
noreply at git.blender.org
Tue Jan 28 15:54:18 CET 2020
Commit: ed4cbde967af2fd4731db485be0a9c5b369893d9
Author: Clément Foucault
Date: Tue Jan 28 14:34:35 2020 +0100
Branches: blender-v2.82-release
https://developer.blender.org/rBed4cbde967af2fd4731db485be0a9c5b369893d9
Fix T66699 EEVEE: Material Preview "World" option doesn't work
Just hide the button for now.
===================================================================
M source/blender/editors/interface/interface_templates.c
===================================================================
diff --git a/source/blender/editors/interface/interface_templates.c b/source/blender/editors/interface/interface_templates.c
index 280ce4c0efa..be9071e75a1 100644
--- a/source/blender/editors/interface/interface_templates.c
+++ b/source/blender/editors/interface/interface_templates.c
@@ -72,6 +72,7 @@
#include "BKE_particle.h"
#include "BKE_curveprofile.h"
#include "BKE_report.h"
+#include "BKE_scene.h"
#include "BKE_screen.h"
#include "BKE_shader_fx.h"
@@ -2845,8 +2846,13 @@ void uiTemplatePreview(uiLayout *layout,
col = uiLayoutColumn(row, true);
uiLayoutSetScaleX(col, 1.5);
uiItemR(col, &material_ptr, "preview_render_type", UI_ITEM_R_EXPAND, "", ICON_NONE);
- uiItemS(col);
- uiItemR(col, &material_ptr, "use_preview_world", 0, "", ICON_WORLD);
+
+ /* EEVEE preview file has baked lighting so use_preview_world has no effect,
+ * just hide the option until this feature is supported. */
+ if (!BKE_scene_uses_blender_eevee(CTX_data_scene(C))) {
+ uiItemS(col);
+ uiItemR(col, &material_ptr, "use_preview_world", 0, "", ICON_WORLD);
+ }
}
if (pr_texture) {
More information about the Bf-blender-cvs
mailing list