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:
authorClément Foucault <foucault.clem@gmail.com>2020-01-28 16:34:35 +0300
committerClément Foucault <foucault.clem@gmail.com>2020-01-28 16:34:35 +0300
commited4cbde967af2fd4731db485be0a9c5b369893d9 (patch)
treec8050cd2b4c0603519b56d0444ed20fd684de840 /source/blender/editors/interface/interface_templates.c
parentcdd223039b1ce5670ac62163dfa288e2b7f90123 (diff)
Fix T66699 EEVEE: Material Preview "World" option doesn't work
Just hide the button for now.
Diffstat (limited to 'source/blender/editors/interface/interface_templates.c')
-rw-r--r--source/blender/editors/interface/interface_templates.c10
1 files changed, 8 insertions, 2 deletions
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) {