import itertools
class DataExporter:
- def __init__(self):
- self.collection = False
- self.shared_resources = True
-
- def export_to_file(self, context, out_fn):
+ def export_to_file(self, context, out_fn, *, collection=False, shared_resources=False):
from .util import Progress
progress = Progress(context)
base, ext = os.path.splitext(base)
refs = dummy_res.collect_references()
- if not self.shared_resources:
+ if not shared_resources:
numbers = {}
for r in refs:
res_ext = os.path.splitext(r.name)[1]
r.name = base+res_ext
numbers[res_ext] = n+1
- if self.collection:
+ if collection:
dummy_res.write_collection(out_fn, exclude_self=True)
else:
for r in refs: