]> git.tdb.fi Git - libs/gl.git/blobdiff - blender/io_mspgl/material.py
Support exporting unlit materials
[libs/gl.git] / blender / io_mspgl / material.py
index d25286055056034a68d936976d18b4755ceb0685..e97561b795f5ffd6ffa5ec915c0e8c15cfc5fe1d 100644 (file)
@@ -92,6 +92,12 @@ class Material:
                        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)