[Bf-blender-cvs] [a764044cccc] blender2.8: Fix Eevee "No output node" issue

Luca Rood noreply at git.blender.org
Fri Jun 23 10:51:54 CEST 2017


Commit: a764044cccc2f31c75d27d60e38dcd9f4d80b836
Author: Luca Rood
Date:   Fri Jun 23 10:49:09 2017 +0200
Branches: blender2.8
https://developer.blender.org/rBa764044cccc2f31c75d27d60e38dcd9f4d80b836

Fix Eevee "No output node" issue

This fixes an issue introduced by the new output node system, where "No
output node" was displayed in the material panel even when an output
node was present.

===================================================================

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 2feb60f3bfa..2991dc110ee 100644
--- a/release/scripts/startup/bl_ui/properties_material.py
+++ b/release/scripts/startup/bl_ui/properties_material.py
@@ -1119,19 +1119,8 @@ def panel_node_draw(layout, ntree, output_type):
     node = find_output_node(ntree, output_type)
 
     if node:
-        def display_input(layout, ntree, node, input_name):
-            input = find_node_input(node, input_name)
-            layout.template_node_view(ntree, node, input)
-
-        display_input(layout, ntree, node, 'Base Color')
-        if output_type == 'OUTPUT_METALLIC':
-            display_input(layout, ntree, node, 'Metallic')
-        display_input(layout, ntree, node, 'Specular')
-        display_input(layout, ntree, node, 'Roughness')
-        display_input(layout, ntree, node, 'Emissive Color')
-        display_input(layout, ntree, node, 'Transparency')
-        display_input(layout, ntree, node, 'Normal')
-        display_input(layout, ntree, node, 'Ambient Occlusion')
+        input = find_node_input(node, 'Surface')
+        layout.template_node_view(ntree, node, input)
         return True
 
     return False
@@ -1156,9 +1145,8 @@ class EEVEE_MATERIAL_PT_surface(MaterialButtonsPanel, Panel):
         layout.separator()
 
         if mat.use_nodes:
-            if not panel_node_draw(layout, mat.node_tree, 'OUTPUT_METALLIC'):
-                if not panel_node_draw(layout, mat.node_tree, 'OUTPUT_SPECULAR'):
-                    layout.label(text="No output node")
+            if not panel_node_draw(layout, mat.node_tree, 'OUTPUT_EEVEE_MATERIAL'):
+                layout.label(text="No output node")
         else:
             raym = mat.raytrace_mirror
             layout.prop(mat, "diffuse_color", text="Base Color")




More information about the Bf-blender-cvs mailing list