0
$\begingroup$

This may have been asked before, but I cannot make sense of it. I need a script which simply toggles the eye of my collection named "Animation". I have enabled my viewport by using bpy.data.collections["Animation"].hide_viewport = False The eye however is closed and I need to open it with a script. Any help is appreciated.

$\endgroup$
0
$\begingroup$

Have you tried accessing collection from view layer?

bpy.context.view_layer.layer_collection.children["Collection Name"].hide_viewport = False
| improve this answer | |
$\endgroup$

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