]> git.tdb.fi Git - libs/gl.git/commitdiff
Remove the external tech exporter property
authorMikko Rasa <tdb@tdb.fi>
Wed, 1 May 2019 09:29:11 +0000 (12:29 +0300)
committerMikko Rasa <tdb@tdb.fi>
Thu, 2 May 2019 19:48:21 +0000 (22:48 +0300)
Always use an external technique if one is specified through the object
property.

blender/io_mspgl/__init__.py
blender/io_mspgl/export_object.py
blender/io_mspgl/export_scene.py

index 899bdcedd434738708eb5b13cfbde0386cd56b16..11a22e9f4ff992be980f29bceb0732866e2c0b6d 100644 (file)
@@ -69,8 +69,6 @@ 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's properties", default=True)
-
        textures = bpy.props.EnumProperty(name="Textures", description="Export textures", default="REF",
                items=(("NONE", "None", "Ignore textures"),
                        ("REF", "Referenced", "Reference external data"),
@@ -91,7 +89,6 @@ class ExportMspGLObject(bpy.types.Operator, ExportMspGLMeshBase):
                super().draw(context)
 
                col = self.general_col
-               col.prop(self, "external_tech")
                col.prop(self, "export_lods")
                col.prop(self, "textures")
                col.separator()
@@ -123,7 +120,6 @@ class ExportMspGLScene(bpy.types.Operator, ExportMspGLBase):
 
        filename_ext = ".scene"
 
-       external_tech = bpy.props.BoolProperty(name="External techniques", description="Use external techniques specified in objects' properties", default=True)
        resource_collection = bpy.props.BoolProperty(name="Resource collection", description="Put resources to a single collection file", default=True)
 
        def create_exporter(self):
index 7918af786a03243af401eb9ae6e6f00146a125ab..810d1cbfe42fc719878dc48580fa5b8b0b9a4083 100644 (file)
@@ -34,7 +34,6 @@ class ObjectExporter:
                self.separate_mesh = False
                self.shared_mesh = True
                self.separate_tech = False
-               self.external_tech = True
                self.shared_tech = True
                self.export_lods = True
 
@@ -80,7 +79,7 @@ class ObjectExporter:
                                mat = l.material_slots[0].material.name
                                if mat!=prev_tech[1]:
                                        same_tech = False
-                       if self.external_tech and l.technique!=prev_tech[0]:
+                       if l.technique!=prev_tech[0]:
                                same_tech = False
                        if i==0 or not same_tech:
                                self.export_object_technique(l, mesh, out_file, i)
@@ -122,7 +121,7 @@ class ObjectExporter:
                from .outfile import open_output
                path, name = external_name(out_file, ".tech", lod_index)
 
-               if self.external_tech and obj.technique:
+               if obj.technique:
                        if obj.inherit_tech and material and (obj.override_material or material.texture_slots):
                                out_file.begin("technique")
                                out_file.begin("inherit", '"{}"'.format(obj.technique))
index 77d7d09bd9761543fca3e159ae1be5507687be5f..a538f4da3ba0f7cd6126e923d5d36693cb3b5a4a 100644 (file)
@@ -3,7 +3,6 @@ import os
 
 class SceneExporter:
        def __init__(self):
-               self.external_tech = True
                self.resource_collection = True
 
        def export(self, context, out_file):
@@ -18,7 +17,6 @@ class SceneExporter:
 
                from .export_object import ObjectExporter
                object_export = ObjectExporter()
-               object_export.external_tech = self.external_tech
 
                object_prototypes = {}
                unique_objects = []