- material_maps = {}
-
- 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_maps=material_maps)
- obj_name = o.name+".object"
- resources[obj_name] = object_export.export_object(context, o, progress, resources=resources)
- progress.pop_task()
-
- def export_scene(self, context, objs, progress, *, prototypes, resources):
- from .datafile import Resource, Statement
- scene_res = Resource("scene.scene")
-
- for o in objs:
- obj_res = resources[prototypes[o.name].name+".object"]
- st = scene_res.create_reference_statement("object", obj_res, o.name)
+ for i in scene.instances:
+ obj_res = resources[i.prototype+".object"]
+ st = scene_res.create_reference_statement("object", obj_res, i.name)