Fix material with no output node

This commit is contained in:
Lubos Lenco 2017-04-21 11:10:49 +02:00
parent b21e0fe099
commit 8c6947f054

View file

@ -28,7 +28,8 @@ def build(material, mat_users, mat_armusers, rid):
mat_state.data.add_elem('nor', 3)
mat_state.output_node = cycles.node_by_type(mat_state.nodes, 'OUTPUT_MATERIAL')
if mat_state.output_node == None:
return None
# Place empty material output to keep compiler happy..
mat_state.output_node = mat_state.nodes.new('ShaderNodeOutputMaterial')
wrd = bpy.data.worlds['Arm']
rpasses = mat_utils.get_rpasses(material)