]> git.tdb.fi Git - libs/gl.git/blobdiff - blender/io_mesh_mspgl/__init__.py
Use a custom drawing function to group the properties in a sensible way
[libs/gl.git] / blender / io_mesh_mspgl / __init__.py
index 37eec0889853a1c5942abfd67c0d51c403eb0840..e7fa07ce1928512b293c241ae3a5fb5a0fcdc53c 100644 (file)
@@ -44,6 +44,28 @@ class ExportMspGLBase(ExportHelper):
                for k, v in self.as_keywords().items():
                        setattr(exporter, k, v)
 
+       def draw(self, context):
+               col = self.layout.column()
+               col.prop(self, "export_lines")
+               col.prop(self, "compound")
+               col.prop(self, "smoothing")
+               self.layout.separator()
+               col = self.layout.column()
+               col.label("Triangle strips")
+               col.prop(self, "use_strips")
+               col.prop(self, "use_degen_tris")
+               col.prop(self, "max_strip_len")
+               self.layout.separator()
+               col = self.layout.column()
+               col.label("Vertex cache")
+               col.prop(self, "optimize_cache")
+               col.prop(self, "cache_size")
+               self.layout.separator()
+               col = self.layout.column()
+               col.label("TBN vectors")
+               col.prop(self, "tbn_vecs")
+               col.prop(self, "tbn_uvtex")
+
 class ExportMspGLMesh(bpy.types.Operator, ExportMspGLBase):
        bl_idname = "export_mesh.mspgl_mesh"
        bl_label = "Export Msp GL mesh"
@@ -56,12 +78,24 @@ class ExportMspGLObject(bpy.types.Operator, ExportMspGLBase):
 
        filename_ext = ".object"
 
+       textures = bpy.props.EnumProperty(name="Textures", description="Export textures", default="REF",
+               items=(("NONE", "None", "Ignore textures"),
+                       ("REF", "Referenced", "Reference external data"),
+                       ("INLINE", "Inline", "Embed textures in the object")))
        material_tex = bpy.props.BoolProperty(name="Material texture", description="Generate a texture based on material colors", default=False)
 
        def prepare_exporter(self, exporter):
                super().prepare_exporter(exporter)
                exporter.object = True
 
+       def draw(self, context):
+               super().draw(context)
+               self.layout.separator()
+               col = self.layout.column()
+               col.label("Texturing")
+               col.prop(self, "textures")
+               col.prop(self, "material_tex")
+
 def menu_func_export(self, context):
        self.layout.operator(ExportMspGLMesh.bl_idname, text="Msp GL mesh")
        self.layout.operator(ExportMspGLObject.bl_idname, text="Msp GL object")