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:
-rw-r--r--intern/cycles/blender/addon/ui.py2
-rw-r--r--intern/cycles/blender/blender_shader.cpp2
-rw-r--r--release/scripts/startup/bl_ui/properties_world.py19
-rw-r--r--source/blender/makesrna/intern/rna_world.c4
4 files changed, 21 insertions, 6 deletions
diff --git a/intern/cycles/blender/addon/ui.py b/intern/cycles/blender/addon/ui.py
index 6e56e42f9b2..3d5ed6b9b44 100644
--- a/intern/cycles/blender/addon/ui.py
+++ b/intern/cycles/blender/addon/ui.py
@@ -1227,7 +1227,7 @@ class CYCLES_WORLD_PT_surface(CyclesButtonsPanel, Panel):
world = context.world
if not panel_node_draw(layout, world, 'OUTPUT_WORLD', 'Surface'):
- layout.prop(world, "horizon_color", text="Color")
+ layout.prop(world, "color")
class CYCLES_WORLD_PT_volume(CyclesButtonsPanel, Panel):
diff --git a/intern/cycles/blender/blender_shader.cpp b/intern/cycles/blender/blender_shader.cpp
index 6129565fec5..b3dfe1f6800 100644
--- a/intern/cycles/blender/blender_shader.cpp
+++ b/intern/cycles/blender/blender_shader.cpp
@@ -1330,7 +1330,7 @@ void BlenderSync::sync_world(BL::Depsgraph& b_depsgraph, bool update_all)
}
else if(b_world) {
BackgroundNode *background = new BackgroundNode();
- background->color = get_float3(b_world.horizon_color());
+ background->color = get_float3(b_world.color());
graph->add(background);
ShaderNode *out = graph->output();
diff --git a/release/scripts/startup/bl_ui/properties_world.py b/release/scripts/startup/bl_ui/properties_world.py
index b6ea8054b0c..ed1b17a911d 100644
--- a/release/scripts/startup/bl_ui/properties_world.py
+++ b/release/scripts/startup/bl_ui/properties_world.py
@@ -90,7 +90,6 @@ class WORLD_PT_custom_props(WorldButtonsPanel, PropertyPanel, Panel):
class EEVEE_WORLD_PT_surface(WorldButtonsPanel, Panel):
bl_label = "Surface"
- bl_context = "world"
COMPAT_ENGINES = {'BLENDER_EEVEE'}
@classmethod
@@ -119,13 +118,29 @@ class EEVEE_WORLD_PT_surface(WorldButtonsPanel, Panel):
else:
layout.label(text="No output node")
else:
- layout.prop(world, "horizon_color", text="Color")
+ layout.prop(world, "color")
+
+
+class WORLD_PT_viewport_display(WorldButtonsPanel, Panel):
+ bl_label = "Viewport Display"
+ bl_options = {'DEFAULT_CLOSED'}
+
+ @classmethod
+ def poll(cls, context):
+ return context.world
+
+ def draw(self, context):
+ layout = self.layout
+ layout.use_property_split = True
+ world = context.world
+ layout.prop(world, "color")
classes = (
WORLD_PT_context_world,
EEVEE_WORLD_PT_surface,
EEVEE_WORLD_PT_mist,
+ WORLD_PT_viewport_display,
WORLD_PT_custom_props,
)
diff --git a/source/blender/makesrna/intern/rna_world.c b/source/blender/makesrna/intern/rna_world.c
index ead67814f01..f4dc07cf6c3 100644
--- a/source/blender/makesrna/intern/rna_world.c
+++ b/source/blender/makesrna/intern/rna_world.c
@@ -207,10 +207,10 @@ void RNA_def_world(BlenderRNA *brna)
rna_def_animdata_common(srna);
/* colors */
- prop = RNA_def_property(srna, "horizon_color", PROP_FLOAT, PROP_COLOR);
+ prop = RNA_def_property(srna, "color", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "horr");
RNA_def_property_array(prop, 3);
- RNA_def_property_ui_text(prop, "Horizon Color", "Color at the horizon");
+ RNA_def_property_ui_text(prop, "Color", "Color of the background");
/* RNA_def_property_update(prop, 0, "rna_World_update"); */
/* render-only uses this */
RNA_def_property_update(prop, 0, "rna_World_draw_update");