Blockbench 动画
使用 Blockbench MCP 工具为 3D 模型创建动画。
可用工具
| 工具 | 用途 |
|---|---|
create_animation | 为骨骼创建动画及关键帧 |
manage_keyframes | 按骨骼和通道创建/编辑/删除关键帧 |
animation_graph_editor | 微调动画曲线(平滑、线性、缓动) |
bone_rigging | 创建/修改用于动画的骨骼结构 |
animation_timeline | 控制播放、时间、FPS、循环设置 |
batch_keyframe_operations | 批量操作:偏移、缩放、反转、镜像 |
animation_copy_paste | 在骨骼/动画之间复制动画数据 |
快速开始
创建简单动画
1. create_animation: name="walk", animation_length=1.0, loop=true
2. manage_keyframes: bone_name="leg_left", channel="rotation",
keyframes=[{time: 0, values: [30, 0, 0]}, {time: 0.5, values: [-30, 0, 0]}]
3. animation_timeline: action="play"
动画通道
position- [x, y, z] 偏移rotation- [x, y, z] 度数scale- [x, y, z] 或统一数字
插值类型
linear- 恒定速率catmullrom- 平滑样条bezier- 自定义曲线step- 瞬间变化
常见工作流程
行走循环(1 秒)
create_animation: name="walk", animation_length=1.0, loop=true, bones={
"leg_left": [
{time: 0, rotation: [30, 0, 0]},
{time: 0.5, rotation: [-30, 0, 0]},
{time: 1.0, rotation: [30, 0, 0]}
],
"leg_right": [
{time: 0, rotation: [-30, 0, 0]},
{time: 0.5, rotation: [30, 0, 0]},
{time: 1.0, rotation: [-30, 0, 0]}
]
}
平滑曲线
animation_graph_editor: bone_name="arm", channel="rotation", action="smooth"
将动画复制到镜像骨骼
animation_copy_paste: action="copy", source={bone: "arm_left"}
animation_copy_paste: action="mirror_paste", target={bone: "arm_right", mirror_axis: "x"}
批量调整时间
batch_keyframe_operations: operation="scale", selection="all",
parameters={scale_factor: 2.0} # 将动画时长加倍
骨骼绑定
创建骨骼结构
bone_rigging: action="create", bone_data={name: "spine", origin: [0, 12, 0]}
bone_rigging: action="create", bone_data={name: "head", origin: [0, 24, 0], parent: "spine"}
设置枢轴点
bone_rigging: action="set_pivot", bone_data={name: "arm_left", origin: [4, 22, 0]}
时间轴控制
animation_timeline: action="set_fps", fps=60
animation_timeline: action="set_length", length=2.5
animation_timeline: action="loop", loop_mode="loop" # 或 "once"、"hold"
animation_timeline: action="set_time", time=0.5
animation_timeline: action="play"
提示
- 在制作动画前,使用
list_outline查看可用骨骼 - 使用
bone_rigging先设置骨骼层级,再添加关键帧 - 对有机运动使用
catmullrom插值 - 对机械/机器人运动使用
step插值 - 对对称骨骼使用镜像动画以节省时间