- if self.collection:
- from .datafile import Statement
- with open(os.path.join(path, base+".mdc"), "w") as out_file:
- for r in resources.values():
- st = Statement("animation", r.name)
- st.sub = r.statements
- st.write_to_file(out_file)
+ if collection:
+ from .datafile import Resource
+ dummy = Resource("dummy", "dummy")
+ dummy.references = list(sorted(resources.values(), key=lambda r: r.name))
+ dummy.write_collection(os.path.join(path, base+".mdc"), exclude_self=True)