From 35f3540e50fdb9f45cd8e53cbe131610aa030a68 Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Wed, 1 May 2019 12:29:11 +0300 Subject: [PATCH] Remove the external tech exporter property Always use an external technique if one is specified through the object property. --- blender/io_mspgl/__init__.py | 4 ---- blender/io_mspgl/export_object.py | 5 ++--- blender/io_mspgl/export_scene.py | 2 -- 3 files changed, 2 insertions(+), 9 deletions(-) diff --git a/blender/io_mspgl/__init__.py b/blender/io_mspgl/__init__.py index 899bdced..11a22e9f 100644 --- a/blender/io_mspgl/__init__.py +++ b/blender/io_mspgl/__init__.py @@ -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): diff --git a/blender/io_mspgl/export_object.py b/blender/io_mspgl/export_object.py index 7918af78..810d1cbf 100644 --- a/blender/io_mspgl/export_object.py +++ b/blender/io_mspgl/export_object.py @@ -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)) diff --git a/blender/io_mspgl/export_scene.py b/blender/io_mspgl/export_scene.py index 77d7d09b..a538f4da 100644 --- a/blender/io_mspgl/export_scene.py +++ b/blender/io_mspgl/export_scene.py @@ -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 = [] -- 2.45.2