How to exchange the linked group of an object.

I placed many trees in a scene using link to a library .blend-file. I spreaded them in the targetfile using Alt-D Duplicate. In the library-file each of the trees was added to an own group (tree_small, tree_big … ). Some of the created duplications in the targetfile were intended to be placeholders and have now to be replaced by an other group. [Similar to exchange the MeshData of an object, but now exchange a linked in group by another.] Is this possible?

UPDATE: Yes.
Just scroll down to Duplication in the Object-Buttons select Group and there you can select.
For multiple Objects here a little script to copy from an active Object to selected ones.
Copy the script to the texteditor and press “Run Script” in the Window-Header to execute.

I don’t know how to write a UserInterface to add this to the 3D-Window Toolbar, but feel free to do so and post it here :slight_smile:

Here’s my script:


import bpy
import os

scene = bpy.context.scene

obj_active = scene.objects.active
selection = bpy.context.selected_objects

for obj in selection:
    obj.select = True
    obj.dupli_group = obj_active.dupli_group