Returns or changes the visibility property of a layer.
rhinoscriptsyntax.LayerVisible(layer, visible=None)
rhinoscript.layer.LayerVisible(layer, visible=None)
layer |
Required. String. The name of an existing layer. |
visible |
Optional. Boolean. The new layer visibility. True = Visible, False = Hidden. |
Boolean |
If a layer mode is not specified, the current layer visibility if successful. |
Boolean |
If a layer mode is specified, the previous layer visibility if successful. |
import rhinoscriptsyntax as rs
layers = rs.LayerNames()
if layers:
for layer in layers:
if rs.LayerVisible(layer)==False:
rs.LayerVisible(layer,True)