- # TODO Export techniques as separate items in the collection
- for i, o in enumerate(unique_objects):
- res_out.begin("object", '"{}.object"'.format(o.name))
- progress.push_task_slice(o.name, i, len(objs))
- object_export.export(context, res_out, o, progress)
- progress.pop_task()
- res_out.end()
+ from .datafile import Statement
+ if self.resource_collection:
+ with open(os.path.join(path, base+"_resources.mdc"), "w") as res_out:
+ for i, o in enumerate(unique_objects):
+ progress.push_task_slice(o.name, i, len(unique_objects))
+ st = Statement("object", "{}.object".format(o.name))
+ st.sub = object_export.export_object(context, o, progress)
+ st.write_to_file(res_out)
+ progress.pop_task()