Going over basic interactions with collections
There was some interest in how you would work with collections using Python.
Here is some code examples of how you can set the properties connected to a given collection.
I explain this code in detail in the attached video.
```
view_layer_collection = dict()
for view_col in bpy.context.view_layer.layer_collection.children:
view_layer_collection[view_col.name] = view_col
view_layer_collection = {view_col.name: view_col for view_col in bpy.context.view_layer.layer_collection.children}
view_layer_collection['Collection'].holdout = True
view_layer_collection['Collection'].indirect_only = True
view_layer_collection['Collection'].exclude = True
view_layer_collection['Collection'].hide_viewport = True
bpy.data.collections['Collection'].hide_render = True
bpy.data.collections['Collection'].hide_select = True
bpy.data.collections['Collection'].hide_viewport = True
```
2
4 comments
Victor Stepanov
2
Going over basic interactions with collections
CG Python Academy
skool.com/cgpython
3D artists learning Blender Python.
Leaderboard (30-day)
powered by