[Bf-blender-cvs] [09ea940e7ba] blender2.8: Fix missing Eevee volume panel in material tab.
Brecht Van Lommel
noreply at git.blender.org
Thu Sep 20 19:29:46 CEST 2018
Commit: 09ea940e7ba8c4905e692134dfc14d0a6fbf909b
Author: Brecht Van Lommel
Date: Thu Sep 20 19:26:41 2018 +0200
Branches: blender2.8
https://developer.blender.org/rB09ea940e7ba8c4905e692134dfc14d0a6fbf909b
Fix missing Eevee volume panel in material tab.
===================================================================
M release/scripts/startup/bl_ui/properties_material.py
===================================================================
diff --git a/release/scripts/startup/bl_ui/properties_material.py b/release/scripts/startup/bl_ui/properties_material.py
index 706ce497dee..d843387720d 100644
--- a/release/scripts/startup/bl_ui/properties_material.py
+++ b/release/scripts/startup/bl_ui/properties_material.py
@@ -141,11 +141,11 @@ class EEVEE_MATERIAL_PT_context_material(MaterialButtonsPanel, Panel):
row.template_ID(space, "pin_id")
-def panel_node_draw(layout, ntree, output_type):
+def panel_node_draw(layout, ntree, output_type, input_name):
node = ntree.get_output_node('EEVEE')
if node:
- input = find_node_input(node, 'Surface')
+ input = find_node_input(node, input_name)
if input:
layout.template_node_view(ntree, node, input)
else:
@@ -173,7 +173,7 @@ class EEVEE_MATERIAL_PT_surface(MaterialButtonsPanel, Panel):
layout.separator()
if mat.use_nodes:
- panel_node_draw(layout, mat.node_tree, 'OUTPUT_MATERIAL')
+ panel_node_draw(layout, mat.node_tree, 'OUTPUT_MATERIAL', 'Surface')
else:
layout.use_property_split = True
layout.prop(mat, "diffuse_color", text="Base Color")
@@ -182,6 +182,26 @@ class EEVEE_MATERIAL_PT_surface(MaterialButtonsPanel, Panel):
layout.prop(mat, "roughness")
+class EEVEE_MATERIAL_PT_volume(MaterialButtonsPanel, Panel):
+ bl_label = "Volume"
+ bl_context = "material"
+ bl_options = {'DEFAULT_CLOSED'}
+ COMPAT_ENGINES = {'BLENDER_EEVEE'}
+
+ @classmethod
+ def poll(cls, context):
+ engine = context.engine
+ mat = context.material
+ return mat and mat.use_nodes and (engine in cls.COMPAT_ENGINES)
+
+ def draw(self, context):
+ layout = self.layout
+
+ mat = context.material
+
+ panel_node_draw(layout, mat.node_tree, 'OUTPUT_MATERIAL', 'Volume')
+
+
class EEVEE_MATERIAL_PT_options(MaterialButtonsPanel, Panel):
bl_label = "Options"
bl_context = "material"
@@ -242,6 +262,7 @@ classes = (
MATERIAL_PT_preview,
EEVEE_MATERIAL_PT_context_material,
EEVEE_MATERIAL_PT_surface,
+ EEVEE_MATERIAL_PT_volume,
EEVEE_MATERIAL_PT_options,
MATERIAL_PT_viewport,
MATERIAL_PT_custom_props,
More information about the Bf-blender-cvs
mailing list