X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=blender%2Fio_mspgl%2Fexport_object.py;h=a8f55e92c34834a01ac0f17115b44b2d1343fd31;hb=2680cc0bf251db566753dbe9bf947ba6a4b083d2;hp=6e91df8db2d0a0b8bf302576c0624486744945f1;hpb=64450cf937a26e267a6e7bb001b04971f3bfd35e;p=libs%2Fgl.git diff --git a/blender/io_mspgl/export_object.py b/blender/io_mspgl/export_object.py index 6e91df8d..a8f55e92 100644 --- a/blender/io_mspgl/export_object.py +++ b/blender/io_mspgl/export_object.py @@ -24,32 +24,19 @@ class ObjectExporter: return lods - def create_mesh_exporter(self): - from .export_mesh import MeshExporter - mesh_export = MeshExporter() - return mesh_export - - def create_material_exporter(self): - from .export_material import MaterialExporter - material_export = MaterialExporter() - return material_export - - def create_material_atlas_exporter(self): - from .export_material import MaterialAtlasExporter - material_atlas_export = MaterialAtlasExporter() - return material_atlas_export - def export_object_resources(self, context, obj, resources, material_atlases, progress): if material_atlases is None: material_atlases = {} lods = self.collect_object_lods(obj) + from .export_mesh import MeshExporter + from .export_material import MaterialAtlasExporter, MaterialExporter from .mesh import create_mesh_from_object - from .material import create_material_atlas - mesh_export = self.create_mesh_exporter() - material_export = self.create_material_exporter() - material_atlas_export = self.create_material_atlas_exporter() + from .material import Material, create_material_atlas + mesh_export = MeshExporter() + material_export = MaterialExporter() + material_atlas_export = MaterialAtlasExporter() for i, l in enumerate(lods): lod_index = l.lod_index if l.lod_for_parent else 0 @@ -79,6 +66,7 @@ class ObjectExporter: if material.render_mode!='EXTERNAL': tech_name = material.name+".tech" if tech_name not in resources: + material = Material(material) material_export.export_technique_resources(material, resources) resources[tech_name] = material_export.export_technique(material, resources) elif "stub.tech" not in resources: