From a764044cccc2f31c75d27d60e38dcd9f4d80b836 Mon Sep 17 00:00:00 2001 From: Luca Rood Date: Fri, 23 Jun 2017 10:49:09 +0200 Subject: [PATCH] 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. --- .../startup/bl_ui/properties_material.py | 20 ++++--------------- 1 file changed, 4 insertions(+), 16 deletions(-) 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")