progress.pop_task()
- def export_object_resources(self, context, obj, resources, progress, material_atlass=None):
- if material_atlass is None:
- material_atlass = {}
+ def export_object_resources(self, context, obj, resources, progress, material_atlases=None):
+ if material_atlases is None:
+ material_atlases = {}
lods = self.collect_object_lods(obj)
if not all(atlas_flags) or key_mismatch:
raise Exception("Conflicting settings in object materials")
- if material_atlas_key in material_atlass:
- material_atlas = material_atlass[material_atlas_key]
+ if material_atlas_key in material_atlases:
+ material_atlas = material_atlases[material_atlas_key]
else:
material_atlas = create_material_atlas(context, l.data.materials[0])
- material_atlass[material_atlas_key] = material_atlas
+ material_atlases[material_atlas_key] = material_atlas
tech_name = "{}.tech".format(material_atlas.name)
if tech_name not in resources:
object_export = ObjectExporter()
object_export.single_file = False
- material_atlass = {}
+ material_atlases = {}
for i, o in enumerate(objs):
progress.push_task_slice(o.name, i, len(objs))
- object_export.export_object_resources(context, o, resources, progress, material_atlass=material_atlass)
+ object_export.export_object_resources(context, o, resources, progress, material_atlases=material_atlases)
obj_name = o.name+".object"
resources[obj_name] = object_export.export_object(context, o, progress, resources=resources)
progress.pop_task()