Interface: LayerManager

Interfaces > Core Interfaces > LayerManager

 

   

Core Interfaces - Quick Navigation

This Core Interface exposes the Layer Manager to MAXScript.

   

Properties:

LayerManager.count : integer : Read 	 

Get the number of layers in the scene

   

LayerManager.current : Interface : Read   

Returns a LayerProperties MixinInterface to the current layer.

   

Methods:

<Interface>LayerManager.getLayer <integer>which 

Returns a LayerProperties MixinInterface to the indexed layer.

The index is 0-based.

   

<Interface>LayerManager.newLayer() 

Creates a new Layer and returns a LayerProperties MixinInterface to it.

   

<Interface>LayerManager.getLayerFromName <string>name 

Returns a LayerProperties MixinInterface to the layer with the given name.

   

<Interface>LayerManager.newLayerFromName <string>name 

Creates a new layer with the given name and returns a LayerProperties MixinInterface to it.

   

<void>LayerManager.editLayerByName <string>name 

Enters editing mode for the layer with the given name.

   

<boolean>LayerManager.deleteLayerByName <string>name 

Deletes the layer with the given name.

Returns True if layer deleted, false otherwise.

A layer can only be deleted if no nodes are in the layer and the layer is not the currently active layer.

   

<void>LayerManager.closeDialog() 

Closes the Layer Manager dialog.

   

<boolean>LayerManager.isDialogOpen() 

Returns true if the Layer Manager dialog is open, false otherwise.

   

<void>LayerManager.layerPropDialog <&maxObject array>layerList 
       layerList is In and Out parameter

NEW in 3ds Max 2015: Opens the Layer Property Dialogs of the LayerProperties MixinInterfaces passed in a by-reference array.

   

<ReferenceTarget>LayerManager.getLayerObject {<integer layer_index>|<string layer_name>} 

Returns the specified layer as a ReferenceTarget.

layer_index is 0-based, layer_name is case-insensitive.

Available in 3ds Max 2008 and higher. Previously available in the Avguard Extensions.

NOTE:

Deprecated.

Use the LayerProperties interface's .layerAsRefTarg property instead.

Provided for backwards compatibility with scripts written using the Avguard Extension in previous versions of 3ds Max.

EXAMPLE

for i = 0 to layerManager.count-1 do
(
  ilayer = layerManager.getLayer i
  layerName = ilayer.name
  layer = ILayerManager.getLayerObject i
  layerNodes = refs.dependents layer
  format "Layer: %; nodes: %\n" layerName layerNodes
)

LayerManager Interfaces:

Interface: LayerProperties

Interface: LayerProperties

See Also