3
$\begingroup$

I often use instances to create scenes. To reduce the load on the PC, when placing a single object repeatedly in several places, it is placed by duplicating it as an instance.

However, the scene I am currently working on is in a state where a single object is placed by duplicating it instead of placing it through an instance. Is it possible to change each duplicated object into an instance linked to one object without changing current scale or location of each objects?

$\endgroup$

2 Answers 2

5
$\begingroup$

Yes, you can. The key concept is Linked Data. You can access this menu with Ctrl+L or CMD+L on Mac OS.

First select all your duplicates. Then select the origin, or what you want to be the origin, last. It is important you select it last, this makes it the active object. You can see this because it is outlined in yellow instead of orange. Press Ctrl+L and select Link Object Data.

In this screenshot I have duplicated two cubes from the original, and rotated them so you can see that linking them does not alter their location or rotation. The Link/Transfer Data menu is active.

enter image description here

Once they are linked, if you make changes to the original object in Edit mode it will affect all linked duplicates:

enter image description here

$\endgroup$
2
$\begingroup$

This script will create a collection instancer empty at the position of every selected object, using the given collection as the instanced collection.

Assuming you have a scene like that with an object inside a collection which has been duplicated and transformed in the scene.

enter image description here

Select your duplicated objects, then run the script :

enter image description here

import bpy
  
# Type the name of your collection between the brackets : Case sensitive !
instance_collection = bpy.data.collections["My Instanced Collection"]

for o in bpy.context.selected_objects:
    collection_instance = bpy.data.objects.new(f"{o.name}_instance", object_data=None)
    collection_instance.instance_type = "COLLECTION"
    collection_instance.instance_collection = instance_collection
    collection_instance.matrix_world = o.matrix_world
    bpy.context.scene.collection.objects.link(collection_instance)

Click here to learn how to run a script in Blender.

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .