RhinoScript: IsLayerVisible vs IsLayerOn


#1

hi @Dale, what is the difference between the two methods?


#2

On the python/rhinoscriptsyntax end, there is zero difference, they both call

    layer = __getlayer(layer, True)
    return layer.IsVisible

Maybe one or the other is there for legacy/backwards compatibility reasons?

–Mitch


#3

Thanks Mitch, I think the legacy must be the case.
I thought it may be Visible determines general visibility (dependent on Parent status) and On would be direct “bulb” On/Off status, but no - both of them seem to be the case #1

–jarek


(Dale Fugier) #4

Hi @Jarek,

In RhinoScript, both functions do the same this. IsLayerOn is a remnant from the Rhino 2.0 days, when the layer’s “state” was a tri-state (on, off, locked).

– Dale