I can fetch a layer list, and I can fetch the objects from a certain layer. However, I can't find anything that changes their visibility. Is that not implemented?
If it is, is it possible to run a script that I could use for toggling visibility based on a variable within the script? AFAIK the whole script is always run, so if I define switch variables and change them, they're reset every time I run the script again.