Render: make Cycles and Evee support each other's output material nodes.

This changes the Cycles exporting and Cycles/Eevee UI code to support both
output material nodes, giving priority to the renderer native one. Still
missing is Eevee code to prefer the Eevee output node.
This commit is contained in:
Brecht Van Lommel
2017-08-01 18:03:16 +02:00
parent 110d6832a8
commit c42c129393
7 changed files with 85 additions and 66 deletions

View File

@@ -270,13 +270,16 @@ class EEVEE_WORLD_PT_surface(WorldButtonsPanel, Panel):
if world.use_nodes:
ntree = world.node_tree
node = find_output_node(ntree, 'OUTPUT_WORLD')
node = find_output_node(ntree, ['OUTPUT_WORLD'])
if not node:
layout.label(text="No output node")
else:
if node:
input = find_node_input(node, 'Surface')
layout.template_node_view(ntree, node, input)
if input:
layout.template_node_view(ntree, node, input)
else:
layout.label(text="Incompatible output node")
else:
layout.label(text="No output node")
else:
layout.prop(world, "horizon_color", text="Color")