3
$\begingroup$

As simple as it is to link a collection with another one just by drag and drop I can't manage to find the way in python.

scene = bpy.context.scene
scene.collection.objects.link(obj)

this seem to work only with objects, how would it be with collections?

$\endgroup$

1 Answer 1

6
$\begingroup$

You need to link other collection under collection's children, not objects:

bpy.data.collections["Collection1"].children.link(bpy.data.collections["Collection2"])
$\endgroup$

You must log in to answer this question.

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