class ObjectExporter:
def __init__(self):
self.show_progress = True
- self.use_strips = True
- self.use_degen_tris = False
- self.use_textures = True
self.export_all = False
self.collection = False
self.shared_resources = True
- self.export_lods = True
def compute_bounding_sphere(self, obj):
p1 = max(((v.co, v.co.length) for v in obj.data.vertices), key=lambda x:x[1])[0]
def collect_object_lods(self, obj):
lods = [obj]
- if self.export_lods:
- lods += sorted([c for c in obj.children if c.lod_for_parent], key=(lambda l: l.lod_index))
- for i, l in enumerate(lods):
- if i>0 and l.lod_index!=i:
- raise Exception("Inconsistent LOD indices")
+ lods += sorted([c for c in obj.children if c.lod_for_parent], key=(lambda l: l.lod_index))
+ for i, l in enumerate(lods):
+ if i>0 and l.lod_index!=i:
+ raise Exception("Inconsistent LOD indices")
return lods
def create_mesh_exporter(self):
from .export_mesh import MeshExporter
mesh_export = MeshExporter()
- mesh_export.use_strips = self.use_strips
- mesh_export.use_degen_tris = self.use_degen_tris
return mesh_export
def create_material_exporter(self):
from .export_material import MaterialExporter
material_export = MaterialExporter()
- material_export.use_textures = self.use_textures
return material_export
def create_material_atlas_exporter(self):