Wondering how I could switch a collection to "Indirect Only" in Blender 2.8 with Python.

So far I have found this:


And this:

bpy.context.scene.indirect_only = True

As you can see none of these will work. As far as I understand it I need some kind of bpy.data function that would effectively allow me to choose which collection (using it's name, or "keys()") to set as Indirect Only.


You can enable Indirect Only for the currently active collection (as indicated in the outliner) by using:

bpy.context.view_layer.active_layer_collection.indirect_only = True
|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.