## GetCurrentAnimationLayer

### Introduced

v6.0

### Description

Returns the current animation layer for the specified objects. A return value of -1 indicates that the objects have different current animation layers which can happen when the selection contains objects that are in different models.

### Scripting Syntax

    oLong = GetCurrentAnimationLayer( [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 set and retrieve the current animation layer
    '
    NewScene , false
    Application.LogMessage "Current animation layer before : " & GetCurrentAnimationLayer()
    SetCurrentAnimationLayer ,1,True
    Application.LogMessage "Current animation layer after  : " & GetCurrentAnimationLayer()
    SetCurrentAnimationLayer ,0
    ' Output of above script:
    'INFO : Current animation layer before : 0
    'INFO : Current animation layer after  : 1

### See Also

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