Notifications
Clear all

[Closed] Controlling a layer's visibility

Greetings,
Is there a way to control a specific Layers visibility (just need to toggle them on and off) via max script?

Thanks in advance…
David

2 Replies
ilayer = layerManager.getLayerFromName i --where i is the name of the layer you want to control or...
ilayer = LayerManager.current

Then use layer properties:

<LayerProperties>.ishidden : bool : Read|Write

Get/Set whether the objects on the layer are hidden.

 <LayerProperties>.isfrozen : bool : Read|Write

Get/Set whether the objects on the layer are frozen.

so…

ilayer = LayerManager.current
ilayer.ishidden = false --will hide the current layer

Thanks Mike.