The proper objects are now hidden, but as soon as I collapse the layer in the layer list of Rhino all the objects re-appear and if I open it again all are turned back to visible.
So I am wondering a) how to set the visibility of a layer to properly off and b) what is happening right now and is it a Human or Rhino bug!?
Using the latest Rhino 6 SR 27 and Human for Rhino 6.
Rhino maintains a distinction between simple visibility and persistent visibility; Human only sets simple visibility. Try this script – it will set the persistent visibility instead: layer_visibility.gh (17.4 KB)
Interesting, I didn’t know that. But what is the “simple” visibility used for? Especially in the contect of the modify layer component? Why would that set the simple visibility? Like, in what scenario do you want to hide a layer, but only until you do anything in the layers panel? I’m confused…
I think it’s mostly used internally by rhino to handle things like the visibility of sublayers (the child of a layer that’s not visible should also not be visible, but it should turn back on if the parent is visible again). The Human tools should probably affect the persistent visibility rather than the simple — at the time I wrote those components I didn’t understand the distinction. There’s also cases where you can get yourself into trouble and trigger errors setting the persistent visibility (make the child layer persistently visible while the parent is invisible) that can be annoying when you’re working programmatically… I’d have to try it to see if I could affect persistent visibility in a non-annoying way. ¯\_(ツ)_/¯