]> git.tdb.fi Git - libs/gl.git/blobdiff - blender/io_mspgl/__init__.py
More options for exporting techniques
[libs/gl.git] / blender / io_mspgl / __init__.py
index 9f7c48e1ed38493cb846397f3a3bc4cf5bfe43e8..a8cdb4c1d4f10cb3e80fbc9dddaaf4af204351d7 100644 (file)
@@ -54,6 +54,7 @@ class ExportMspGLMeshBase(ExportMspGLBase):
                col.prop(self, "compound")
                col.prop(self, "smoothing")
                col.prop(self, "export_groups")
+               self.general_col = col
 
                self.layout.separator()
 
@@ -95,6 +96,8 @@ class ExportMspGLObject(bpy.types.Operator, ExportMspGLMeshBase):
 
        filename_ext = ".object"
 
+       external_tech = bpy.props.BoolProperty(name="External technique", description="Use an external technique specified in the object", default=True)
+
        textures = bpy.props.EnumProperty(name="Textures", description="Export textures", default="REF",
                items=(("NONE", "None", "Ignore textures"),
                        ("REF", "Referenced", "Reference external data"),
@@ -103,6 +106,8 @@ class ExportMspGLObject(bpy.types.Operator, ExportMspGLMeshBase):
        srgb_colors = bpy.props.BoolProperty(name="sRGB colors", description="Export material colors as sRGB instead of linear", default=True)
 
        separate_mesh = bpy.props.BoolProperty(name="Separate mesh", description="Write mesh data into a separate file", default=False)
+       separate_tech = bpy.props.BoolProperty(name="Separate technique", description="Write technique data into a separate file", default=False)
+       shared_tech = bpy.props.BoolProperty(name="Shared technique", description="Use material name for technique file to enable sharing", default=True)
 
        def create_exporter(self):
                from .export_object import ObjectExporter
@@ -111,6 +116,9 @@ class ExportMspGLObject(bpy.types.Operator, ExportMspGLMeshBase):
        def draw(self, context):
                super().draw(context)
 
+               col = self.general_col
+               col.prop(self, "external_tech")
+
                col = self.texturing_col
                col.prop(self, "textures")
                col.prop(self, "material_tex")
@@ -121,6 +129,9 @@ class ExportMspGLObject(bpy.types.Operator, ExportMspGLMeshBase):
                col = self.layout.column()
                col.label("Files")
                col.prop(self, "separate_mesh")
+               col.prop(self, "separate_tech")
+               if self.separate_tech:
+                       col.prop(self, "shared_tech")
 
 class ExportMspGLArmature(bpy.types.Operator, ExportMspGLBase):
        bl_idname = "export.mspgl_armature"