Desperate! This must be simple. Replace existing geometry with a linked object

Ok, so before anyone mentions Ctrl L let me tell you what I am trying to do.
I have imported an fbx file with 100s of chairs in to blender, my client wants me to replace the chairs with a paticular type of chair.

The image attached shows the existing fbx geometry in green, the chair in the blue circle is linked from an external blender file. I would like to replace all the charis in the green circle with the linked chair.

Surely this is possible?

Swap the new chair in the linked file? Reopen this scene… done?
Be sure to keep it in the same Collection, and you should be good.

Or, in a more complicated route without a link back…

Make the linked file into real/local geo with Object>Apply>Make Instances Real.
Then select all the localized geo, and make the vertex data & material a singlle user.
Check in the outliner if all ‘chain’ icons are gone for the vertex and material blocks.
Finally, swap out the vertex data of the old chair, with the vertex data of the new chair you added to the scene.

rob

I read. And my conclusion is that solution is Ctrl L > Link Object Data.

You cannot swap vertex data on a linked file. The data is locked.

You can if it is a linked object.
If it is a linked collection you have to turn the chairs into collection instances first and then:
ctrl-L → collection instance

Hi Rob,
Swapping the new chair in the linked file still gives me the same problem just with different geometry in the area circled in blue. I cant swap the chair anyway as it is linked to other projects.
Your other option works and I am doing this at present…Unfortunately this is not what I want to do.
I guess the only alternative would be to replace the chairs in green with individual empties and get the expties to reference a collection. The problem is i dont want to have to manually do this.
I think I am going to have to perserve with your second option that i was already running with.

Thanks for your reply bud.

This is interesting, how do I turn each of the chairs in the green cirlcle to a collection isntance?

I must add, the reason i am using links is that if the client wants to swap out the chairs for a different one, I only have to go to one file rather than 3 others.

This is the problem, blender wont let me use this command on an externally linked file. The chair in the blue circle is an externally linked file.

Ah yes… Forgot you can just swap out the instances.

Just to be complete on this, you can also do this by selecting a Collection Instance, and in the Object Properties you have the option to switch the Collection in the Instancing tab.

And for the object data swap, you can only swap from linked to local. Not linked to linked data, or local to linked.

Enough options for @SublimeSpaces now :slight_smile:

rob

Hi Rob,
I must be missing something here, none of the chairs in the green circle are collection instances, they are just geometry, how would I turn all the chairs in the green to collection isntances to swap them?

Not sure what you mean…
How did you instance the linked chair? normally you link the Collection containing the chair, and instance that via the Add>Collection Instance>your linked stuff.

If not, maybe the other tips above might help you?

File > Link (the individual chair is from an external blender file)

If the external blender file is loaded into ram, then maybe you can save it local. Did you say this was on a android?

Im working on a windows 10 pc…didnt realise you could run blender on an android device…worth a look.

I have heard of people running it on phones.

If you linked in the chair, it’s a) a Linked Collection, or b) a Linked Object.
In both cases you can populate your scene via the Add>Collection Instance>your linked stuff menu option.
If you have the new chair linked in as well, you should be able to swap the chairs with the new one.
Select the old, shift select the new chair last, Crtl+L the Instance Collection option.

Well, I think you would have to do it by hand or by script.

Here is a script. You simply have to select all your chairs. If they are not a single objects then select all the “base” parts of your chairs where you want the collection instance to be.
Then select your linked instance so that all your chairs are selected and the linked instance is the active object.
Then run the following script:


import bpy

myActive = bpy.context.active_object
mySel = bpy.context.selected_objects
myInstance = myActive.instance_collection


for i in mySel:
    if i != myActive:
        myLoc = i.location
        myRot = i.rotation_euler
        myScale = i.scale
        bpy.ops.object.collection_instance_add(collection = myInstance.name, location = myLoc, rotation = myRot, scale = myScale)

ok so the chair circled in blue is a linked collection from another blend file. All the other chairs are imported from an fbx, i didnt place them, they were already placed in the fbx file.

Ah… like that. Sorry… Gotta read posts better…

I think the script from @Lumpengnom will help you out then. :slight_smile:
And I think we really got all cases now :smiley: