return tech_res
class MaterialExporter:
- def create_texture_exporter(self):
- from .export_texture import TextureExporter
- texture_export = TextureExporter()
- return texture_export
-
def export_technique_resources(self, material, resources):
- from .export_texture import SamplerExporter
- texture_export = self.create_texture_exporter()
+ from .export_texture import SamplerExporter, TextureExporter
+ texture_export = TextureExporter()
sampler_export = SamplerExporter()
from .material import Material
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