diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2017-08-01 19:03:16 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2017-08-01 20:13:41 +0300 |
commit | c42c12939342bdccb98000c195503a78423ddc2c (patch) | |
tree | a60e272cbe1f4805e34e39f8f5118ec0fb743c77 /release/scripts/startup/bl_ui/properties_material.py | |
parent | 110d6832a88a3ebca0b0d4c3d996e545c2f5e1f1 (diff) |
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.
Diffstat (limited to 'release/scripts/startup/bl_ui/properties_material.py')
-rw-r--r-- | release/scripts/startup/bl_ui/properties_material.py | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/release/scripts/startup/bl_ui/properties_material.py b/release/scripts/startup/bl_ui/properties_material.py index e7e92000723..0e130b20566 100644 --- a/release/scripts/startup/bl_ui/properties_material.py +++ b/release/scripts/startup/bl_ui/properties_material.py @@ -1120,10 +1120,12 @@ def panel_node_draw(layout, ntree, output_type): if node: input = find_node_input(node, 'Surface') - layout.template_node_view(ntree, node, input) - return True - - return False + if input: + layout.template_node_view(ntree, node, input) + else: + layout.label(text="Incompatible output node") + else: + layout.label(text="No output node") class EEVEE_MATERIAL_PT_surface(MaterialButtonsPanel, Panel): @@ -1145,8 +1147,7 @@ class EEVEE_MATERIAL_PT_surface(MaterialButtonsPanel, Panel): layout.separator() if mat.use_nodes: - if not panel_node_draw(layout, mat.node_tree, 'OUTPUT_EEVEE_MATERIAL'): - layout.label(text="No output node") + panel_node_draw(layout, mat.node_tree, ['OUTPUT_EEVEE_MATERIAL', 'OUTPUT_MATERIAL']) else: raym = mat.raytrace_mirror layout.prop(mat, "diffuse_color", text="Base Color") |