Active collection

To get the current active collection through the Blender Python API we need to access it through the “view_layer” layer.

The following command will return the active collection from the scene:

The active collection can also be accessed directly through the current context:

Note that toggling the collection visibility in the outliner using the “eye” and “monitor” icons resets the currently active collection and makes the scene’s main collection active.

*.blend file with the example code for my Patreon subscribers

0 0 votes
Article Rating
Notify of

0 Comment
Inline Feedbacks
View all comments