diff options
-rw-r--r-- | release/scripts/startup/bl_operators/object.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/release/scripts/startup/bl_operators/object.py b/release/scripts/startup/bl_operators/object.py index 60f534b3ab6..6e08d557353 100644 --- a/release/scripts/startup/bl_operators/object.py +++ b/release/scripts/startup/bl_operators/object.py @@ -596,6 +596,8 @@ class MakeDupliFace(Operator): for obj in context.selected_objects: if obj.type == 'MESH': linked[obj.data].append(obj) + elif obj.type == 'EMPTY' and obj.instance_type == 'COLLECTION' and obj.instance_collection: + linked[obj.instance_collection].append(obj) for data, objects in linked.items(): face_verts = [axis for obj in objects @@ -621,7 +623,12 @@ class MakeDupliFace(Operator): ob_new = bpy.data.objects.new(mesh.name, mesh) context.collection.objects.link(ob_new) - ob_inst = bpy.data.objects.new(data.name, data) + if type(data) is bpy.types.Collection: + ob_inst = bpy.data.objects.new(data.name, None) + ob_inst.instance_type = 'COLLECTION' + ob_inst.instance_collection = data + else: + ob_inst = bpy.data.objects.new(data.name, data) context.collection.objects.link(ob_inst) ob_new.instance_type = 'FACES' |