Iterating over Layers by Name
 
 
 

The ILayerManager class is an interface that manages all the scene layers in 3ds Max. A pointer to an ILayerManager singleton object can be obtained using the method Interace13::GetLayerManager().

With this ILayerManager pointer you can get the number of scene layers.

Using the ILayerManager::GetLayer() function you can get an ILayer pointer which can be used to modify the properties of a layer.

One shortcoming of ILayerManager, is that it requires pre-knowledge of the names of all the layers to access specific layers. A work-around is to use IFPLayerManager and iterate over layers by index.

See Also