## SaveKeyOnKeyable

### Introduced

v5.0

### Description

Saves key frames on keyable parameters at a given frame. The tolerance argument can be used to merge all keys within a certain range. The range is defined as Frame - Tolerance and Frame + Tolerance. The merged key will inherit the constraints of the nearest key within this range.
Note: This command is very similiar to SaveKey with the only difference being the input objects and the list of parameters on which the keys are saved.

### Scripting Syntax

    SaveKeyOnKeyable( [InputObjs], [Time], [Value], [Tolerance], [Layer], [ModifiedOnly], [AutokeyScope] );

### Parameters

Parameter | Type | Description
--- | --- | ---
InputObjs | String | Object name (anything selectable) Default Value: Currently selected objects
Time | Number | Key frames are set at this frame. Default Value: Key frame
Value | Number | Key frame values Default Value: Parameter values at current frame
Tolerance | Double | Frame tolerance Default Value: Nearest 0.5 frame (-1)
Possible Values: | Description:
>0 | Merge all keys between Frame - Tolerance and Frame + Tolerance
0 | Key must be exactly at frame
-1 | Nearest 0.5 frame
Layer | Integer | Animation layer to set keys on Default Value: Current animation layer (-1)
ModifiedOnly | Boolean | If true keys will only be set for parameters that have been modified at the current frame Default Value: False
AutokeyScope | Integer | Specifies whether keys will be set on all parameters or only those with existing fcurves or keys. Default Value: All specified parameters (0)
Possible Values: | Description:
0 | Key all specified parameters
1 | Only key parameters that have an existing key at the given time
2 | Only key parameters that have an existing fcurve

### Examples

#### VBScript Example

    CreatePrim "Grid", "MeshSurface"

    Translate , -7.01063515498729, 5.25147709343595, -0.525147709343595, siRelative, siView, siObj, siXYZ

    'Saves a key on all the keyable parameters on the currently selected object(s) at the current frame.

    SaveKeyOnKeyable

### See Also

SaveKey SaveKeyOnMarkedKeyable