## GetNumberOfAnimationLayers

### Introduced

v6.0

### Description

Returns the number of animation layers for the specified objects. If objects in different models are passed to the command then the result will be the model with the least number of animation layers. Note: The mimimum number of animation layers is 1 since the base layer is always present.

### Scripting Syntax

    oLong = GetNumberOfAnimationLayers( [InputObjs] );

### Return Value

Long

### Parameters

Parameter | Type | Description
--- | --- | ---
InputObjs | String | List of objects. Default Value: Currently selected objects

### Examples

#### VBScript Example

    '
    ' In this example, we will get the number of animation layers before and after adding a new layer
    '
    NewScene , false
    Application.LogMessage "Number of animation layers before : " & GetNumberOfAnimationLayers()
    SetCurrentAnimationLayer ,1,True
    Application.LogMessage "Number of animation layers after  : " & GetNumberOfAnimationLayers()
    ' Output of above script:
    'INFO : Number of animation layers before : 1
    'INFO : Number of animation layers after  : 2

### See Also

GetCurrentAnimationLayer SetCurrentAnimationLayer AddAnimationLayer DeleteAnimationLayer DuplicateAnimationLayer RemoveAnimation RemoveAllAnimation SaveKey RemoveKey PrevKey FirstKey LastKey Parameter.AddFCurve