I need to create instance of collection in python and i cant find any way to do this.

Im stuck because i cant find a way to "set selected" anything in outliner via code and the console command seems to need that:


Is there a way to tell outliner what item to select?


1 Answer 1


Here is the code to create an instance from a collection named "monkeys":

bpy.ops.object.collection_instance_add(collection='monkeys', align='WORLD', location=(0, 0, 0), scale=(1, 1, 1))

and the manual entry describes the arguments.


You must log in to answer this question.

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