object_prototypes = {}
unique_objects = []
export_names = {}
+ used_names = set()
for o in objs:
if o.name in object_prototypes:
continue
prefix = prefix[:pos]
if prefix:
- export_names[o.name+".object"] = prefix.strip(" .")+".object"
+ export_names[o.name+".object"] = prefix.strip(" .")
+ else:
+ used_names.add(o.name)
unique_objects.append(o)
for c in clones:
object_prototypes[c.name] = o
+ for n, e in export_names.items():
+ if e in used_names:
+ number = 1
+ while "{}_{}".format(e, number) in used_names:
+ number += 1
+ e += "_{}".format(number)
+ export_names[n] = e+".object"
+ used_names.add(e)
+
from .util import Progress
progress = Progress(self.show_progress and context)