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:
authorBrecht Van Lommel <brechtvanlommel@gmail.com>2019-05-07 12:56:55 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2019-05-07 12:57:55 +0300
commit090545158ac541b1daacd56a6906ec5653da42f4 (patch)
treeff4ea58b2306c490c909c576ceab31bcf74db57f /release
parent2b9965122e132a2c25652ebf62d6353183f0f644 (diff)
Fix T64223: missing volume panel for Eevee world
Diffstat (limited to 'release')
-rw-r--r--release/scripts/startup/bl_ui/properties_world.py29
1 files changed, 29 insertions, 0 deletions
diff --git a/release/scripts/startup/bl_ui/properties_world.py b/release/scripts/startup/bl_ui/properties_world.py
index fc1e718ea1e..d059c2d2e4d 100644
--- a/release/scripts/startup/bl_ui/properties_world.py
+++ b/release/scripts/startup/bl_ui/properties_world.py
@@ -121,6 +121,34 @@ class EEVEE_WORLD_PT_surface(WorldButtonsPanel, Panel):
layout.prop(world, "color")
+class EEVEE_WORLD_PT_volume(WorldButtonsPanel, Panel):
+ bl_label = "Volume"
+ bl_options = {'DEFAULT_CLOSED'}
+ COMPAT_ENGINES = {'BLENDER_EEVEE'}
+
+ @classmethod
+ def poll(cls, context):
+ engine = context.engine
+ world = context.world
+ return world and world.use_nodes and (engine in cls.COMPAT_ENGINES)
+
+ def draw(self, context):
+ layout = self.layout
+
+ world = context.world
+ ntree = world.node_tree
+ node = ntree.get_output_node('EEVEE')
+
+ if node:
+ input = find_node_input(node, 'Volume')
+ if input:
+ layout.template_node_view(ntree, node, input)
+ else:
+ layout.label(text="Incompatible output node")
+ else:
+ layout.label(text="No output node")
+
+
class WORLD_PT_viewport_display(WorldButtonsPanel, Panel):
bl_label = "Viewport Display"
bl_options = {'DEFAULT_CLOSED'}
@@ -139,6 +167,7 @@ class WORLD_PT_viewport_display(WorldButtonsPanel, Panel):
classes = (
WORLD_PT_context_world,
EEVEE_WORLD_PT_surface,
+ EEVEE_WORLD_PT_volume,
EEVEE_WORLD_PT_mist,
WORLD_PT_viewport_display,
WORLD_PT_custom_props,