+ self.add_instance(i, bpy.data.objects[i.object.name], proto_map)
+
+ def add_instance(self, obj, proto_obj, proto_map):
+ prototype = proto_map.get(proto_obj)
+ if not prototype:
+ for p in proto_map.values():
+ if is_same_object(proto_obj, p.object):
+ prototype = p
+ break
+
+ if not prototype:
+ prototype = ObjectPrototype(proto_obj)
+ self.prototypes.append(prototype)
+
+ proto_map[proto_obj] = prototype