Interfaces > Core Interfaces > LayerManager |
This Core Interface exposes the Layer Manager to MAXScript.
Get the number of layers in the scene
Returns a LayerProperties MixinInterface to the current layer.
Returns a LayerProperties MixinInterface to the indexed layer.
Creates a new Layer and returns a LayerProperties MixinInterface to it.
Returns a LayerProperties MixinInterface to the layer with the given name.
Creates a new layer with the given name and returns a LayerProperties MixinInterface to it.
Enters editing mode for the layer with the given 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.
Closes the Layer Manager dialog.
Returns true if the Layer Manager dialog is open, false otherwise.
<void>LayerManager.layerPropDialog <&maxObject array>layerList layerList is In and Out parameter
Opens the Layer Property Dialogs of the LayerProperties MixinInterfaces passed in a by-reference array.
Available in 3ds Max 2015 and higher.
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.
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.
<bool>LayerManager.doesLayerHierarchyContainNodes <string>name
NEW in 3ds Max 2016: Returns True if the Layer Hierarchy of the specified Layer Name contains nodes.
Returns False if the Layer Hierarchy of the specified Layer Name does not contain nodes, or if the specified Layer Name does not exist.
<bool>LayerManager.deleteLayerHierarchy <string>name forceDelete:<bool> forceDelete default value: false
NEW in 3ds Max 2016: Deletes the Layer Hierarchy of the specified Layer Name. If the Active layer was deleted, the default "0" layer will become the Active layer. When the optional keyword forceDelete: is set to False or is not supplied, only deletes empty layers.
When the optional keyword forceDelete: is set to True, layers with nodes will be deleted and the nodes will be moved to the default "0" layer.
Returns True if the deleting was successful.
Returns False if the deleting failed because the hierarchy contained nodes while forceDelete: was set to False or not specified, or if the specified Layer Name does not exist.
<bool>LayerManager.getDuplicateLayerWithoutSameHierarchyOnMerge()
NEW in 3ds Max 2016: Returns the state of the option controlling whether to duplicate a layer when merging if a layer to be merged has the same name but different hierarchy as an existing layer in the scene.
When set to True, a duplicate layer will be created.
When set to False, no duplicate will be created.
<void>LayerManager.setDuplicateLayerWithoutSameHierarchyOnMerge <bool>duplicateLayerWithoutSameHierarchyOnMerge persist:<bool> persist default value: true
NEW in 3ds Max 2016: Sets the state of the option controlling whether to duplicate a layer when merging if a layer to be merged has the same name, but different hierarchy as an existing layer in the scene.
When set to True, a duplicate layer will be created.
When set to False, no duplicate will be created.
When the persist: optional argument is set to True or omitted, the setting will persist between sessions.
When the persist: option is set to False, the setting will affect only the current session.