from .datafile import Resource, Statement
mat_res = Resource(material.name+".mat", "material")
- if material.type!="pbr":
+ if material.type!="pbr" and material.type!="unlit":
raise Exception("Can't export unknown material type "+material.type)
st = Statement(material.type)
roughness.set_from_input(material.node_tree, surface_node.inputs["Roughness"])
normal.set_from_input(material.node_tree, surface_node.inputs["Normal"])
emission.set_from_input(material.node_tree, surface_node.inputs["Emission"])
+ elif surface_node.type=='EMISSION':
+ self.type = "unlit"
+
+ color = self.create_property("color", "texture", (1.0, 1.0, 1.0, 1.0))
+
+ color.set_from_input(material.node_tree, surface_node.inputs["Color"])
else:
raise Exception("Unsupported surface node type "+surface_node.type)