Blender deselect all layers

845 Views Asked by At

Please, can sombody help me with problem in Blender? I won't deselect all layers with python script. I can select all, but deselect not.

I use this (not working):

bpy.context.scene.layers=((False,)*20) 

This works, I dont understand this :

bpy.context.scene.layers=((False,)*19+(True,)) 

Thanks for help

1

There are 1 best solutions below

0
On

You can't deselect all layers (if you can't do it form UI don't expect the python code to do it either).

And the second code doesn't work as you expect, you are not deselecting all, it just deselects the first 19 and select the last one (20)!