animation_track
Manage Godot animation tracks and keyframes: add or remove tracks, insert or update keyframes, and set curve handles. Runtime operations affect only the current execution context.
Instructions
动画轨道与关键帧操作。轨道: add_track, remove_track。关键帧: add_keyframe, remove_keyframe, update_keyframe。曲线: set_curve。运行时操作,仅影响当前执行上下文。如需持久化,请编辑 .tscn 文件。
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| time | No | 关键帧时间(秒)(add_keyframe 时必填) | |
| value | No | 关键帧值(add_keyframe/update_keyframe) | |
| action | Yes | 操作类型 | |
| in_handle | No | 入控制柄坐标(set_curve) | |
| insert_at | No | 轨道插入位置,-1 为末尾(add_track 时可选) | |
| node_path | No | AnimationPlayer 节点路径 | |
| out_handle | No | 出控制柄坐标(set_curve) | |
| track_path | No | 轨道路径,如 "Sprite2D:frame"(add_track 时可选) | |
| track_type | No | 轨道类型(add_track 时必填) | |
| transition | No | 过渡曲线,1.0=线性 | |
| track_index | No | 轨道索引 | |
| project_path | No | Godot 项目目录路径(可选,默认使用 GODOT_PROJECT_PATH 环境变量或当前目录) | |
| animation_name | No | 动画名称 | |
| keyframe_index | No | 关键帧索引(remove_keyframe/update_keyframe/set_curve 时必填) | |
| load_autoloads | No | 是否加载 Autoload 上下文(默认 true) |