animtree
Control and edit Godot AnimationTree at runtime: create nodes, add states and transitions, set blend parameters, play states, and modify properties for live adjustments.
Instructions
查询、控制和编辑 AnimationTree。支持创建节点、添加状态、添加转换、设置混合参数、播放状态、编辑状态属性。运行时操作,仅影响当前执行上下文。如需持久化,请编辑 .tscn 文件。
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | AnimationTree 节点名称(animtree_create 时使用) | |
| value | No | 参数值(float 用于 blends,{x,y} 用于 blend spaces) | |
| action | Yes | 操作类型:animtree_create 创建 AnimationTree 节点;animtree_add_state 添加状态;animtree_add_transition 添加转换;animtree_set_blend 设置混合参数;animtree_play 播放状态;animtree_state_edit 编辑状态属性 | |
| parent | No | 父节点路径(animtree_create 时使用,默认 root) | |
| position | No | 位置 {x, y} | |
| to_state | No | 目标状态名称(animtree_add_transition 时使用) | |
| animation | No | 关联的 Animation 名称(animtree_add_state 时使用) | |
| node_path | No | AnimationTree 节点路径 | |
| conditions | No | 转换条件列表(animtree_add_transition 时使用) | |
| from_state | No | 源状态名称(animtree_add_transition 时使用) | |
| state_name | No | 状态名称 | |
| xfade_time | No | 交叉淡入淡出时间(秒,animtree_add_transition 时使用) | |
| project_path | No | Godot 项目目录路径(可选,默认使用 GODOT_PROJECT_PATH 环境变量或当前目录) | |
| load_autoloads | No | 是否加载 Autoload 上下文(默认 true) | |
| parameter_name | No | 参数名称 | |
| tree_root_type | No | 根节点类型(animtree_create 时使用,默认 AnimationNodeStateMachine) | |
| animation_player_path | No | AnimationPlayer 的 NodePath(animtree_create 时使用) |