setLayerKeyframe
Sets a keyframe for a layer property at a specified time in After Effects, enabling precise animation control.
Instructions
Set a keyframe for a specific layer property at a given time.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"compIndex": "<compIndex>",
"layerIndex": "<layerIndex>",
"propertyName": "<propertyName>",
"timeInSeconds": "<timeInSeconds>"
},
"name": "setLayerKeyframe"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| value | No | The value for the keyframe (e.g., [x,y] for Position, [w,h] for Scale, angle for Rotation, percentage for Opacity) | |
| compIndex | Yes | 1-based index of the target composition in the project panel. | |
| layerIndex | Yes | 1-based index of the target layer within the composition. | |
| propertyName | Yes | Name of the property to keyframe (e.g., 'Position', 'Scale', 'Rotation', 'Opacity'). | |
| timeInSeconds | Yes | The time (in seconds) for the keyframe. |