Godot Blender Import Hook (tags in Blender, colliders in Godot)
/godot-blender-import-hook
A GameSkill original that carries game tags from Blender to Godot 4: set collider, group or remove as custom properties, export a GLB headless with them as glTF extras, and a post-import script adds StaticBody3D colliders, persistent groups and removes helper objects on every import, so reimports never lose the fixes. Ships the Blender export script, the EditorScenePostImport hook, an installer and a headless check.
- 许可证
- MIT
- 出品
- GameSkill 出品
我们测过
在 Blender 5.2.3 LTS (background export) + Godot 4.7.2 (headless import with EditorScenePostImport) 上通过 23/23 项检查(2026-11-09):能触发、有可运行示例、有截图和自检清单、单一职责、中英文文档齐全。触发检查是把提示词和 skill 描述做匹配,不是真实 agent 运行。
测试报告GameSkill 测过的版本
GameSkill 为 gameskill.dev 原创编写并测过。ZIP 里是完整的 skill:SKILL.md 及中文版、脚本、可运行示例、测试、自检清单和我们的测试报告。
GameSkill 原创,协议 MIT。ZIP 保留 LICENSE 和 CREDITS.md,里面列出了流程灵感来源、CC0 测试素材和第三方库及其协议。

自检清单
- hook.py check 对每个标签都 PASS,problems=0 / hook.py check passes every tag with problems=0
- 重新导入结果相同 / A reimport gives the same result
- 导入后的场景没有手工修改 / No manual edits in the imported scene
推荐搭配
中文指南
这个 skill 做什么
GameSkill 原创(MIT)。把游戏标签从 Blender 带到 Godot 4:在 Blender 里用自定义属性设置 collider、group 或 remove,无界面导出 GLB(标签作为 glTF extras),Godot 的导入后脚本在每次导入时自动加 StaticBody3D 碰撞体、持久分组,并删掉辅助物体,重新导入也不会丢。附带 Blender 导出脚本、EditorScenePostImport 钩子、安装器和无界面检查。
什么时候用
- Blender 做的关卡和道具在 Godot 里需要碰撞体、分组或清理
- 导入后手工修的东西每次重新导入都丢
- agent 在 Blender 里搭场景,需要不点编辑器就能在 Godot 里用
怎么装
下载本页的 ZIP,把 godot-blender-import-hook/ 文件夹放进 .claude/skills/(Claude Code)或 .agents/skills/(Codex、Cursor),重启 agent。需要 Python 3、用于导出的 Blender 4.2 以上和用于导入与检查的 Godot 4.2 以上。
最小示例
blender -b --factory-startup --python blender/export_tagged.py -- --demo --out example/project/assets/potting-shed.glbpython3 tools/hook.py install example/projectpython3 tools/hook.py check example/project res://assets/potting-shed.glb --godot "$GODOT" --collider ShedFloor=box --removed LayoutGuide --group Lantern=lights,全部 PASS。
我们怎么测的
示例是我们自己做的「园艺小屋」:地板、两面墙、工作台、一盏灯和一张布局参考面,每个都打了标签。test/run_tests.py 共 11 项检查,用 Blender 5.2.3 和 Godot 4.7.2 跑:Blender 无界面导出带 extras 的 GLB;安装器设置默认导入脚本且可重复运行;Godot 导入后 4 个碰撞体类型正确、参考面被删除、3 个分组都在(10/10);没装钩子时检查失败并给出修法;已经导入过的 GLB 也能被指向钩子并通过;未知的碰撞体标签会被报告;已有其他导入脚本时不加 --force 拒绝覆盖,加了干净替换。截图是 Godot 渲染的导入结果,碰撞体用绿色显示。结果在 gameskill/test-report.json。
致谢
"在 Godot 导入时做 Blender 后处理"的思路来自 X 上 @ashlee3dee 的帖子(只放链接,没有使用任何代码或文字)。代码、示例和文字都是我们自己的。
搭配
glb-godot-acceptance:检查模型是否能用于游戏blender-export-pipelines:Blender 到各引擎的导出设置godot4-guard:Godot 4 代码守卫
安装
告诉你的 AI
Install the skill from https://gameskill.dev/skills/godot-blender-import-hook/install.md
GameSkill 测过的版本
mkdir -p .claude/skills
curl -fsSL https://gameskill.dev/dl/skills/godot-blender-import-hook.zip -o /tmp/gameskill-godot-blender-import-hook.zip
unzip -oq /tmp/gameskill-godot-blender-import-hook.zip -d .claude/skills
rm /tmp/gameskill-godot-blender-import-hook.zip包含内容
- blender/export_tagged.py: headless GLB export with transforms applied, Y up and custom properties as glTF extras
- godot/post_import.gd: EditorScenePostImport hook for collider (box, convex, trimesh), group and remove tags
- tools/hook.py: install as the project's default scene import script, and a headless check of every tag
- Our potting shed example and 11 checks in test/run_tests.py on Blender 5.2.3 and Godot 4.7.2
适合
- Blender levels and props that need colliders, groups or cleanup in Godot
- Teams whose manual post-import fixes keep getting lost on reimport
- Agents that build scenes in Blender and need them to work in Godot without editor clicks
不适合
- Checking whether a model is game-ready (size, budget, drop test): use glb-godot-acceptance
- Rigged characters and animation retargeting
- Unity or Unreal imports
试试这条提示词
My Blender level has floors, crates and a few layout planes. Make Godot add the right colliders and remove the planes every time it imports the GLB.关于这个 Skill
A GameSkill original. Anything fixed by hand in an imported Godot scene is lost on the next reimport. This skill moves those fixes to the source: tag objects in Blender with custom properties (collider = box, convex or trimesh; group; remove), export a GLB headless with blender/export_tagged.py so the tags travel as glTF extras, and godot/post_import.gd applies them on every import. tools/hook.py install makes the hook the project's default scene import script, and tools/hook.py check imports headless and proves every tag landed.
Agent steps
- Tag objects in Blender and export with
export_tagged.py. - Install the hook once per project with
hook.py install. - Check with
hook.py check, listing the colliders, removed objects and groups you expect, until all PASS.
Common problems it solves
- Colliders, groups and cleanup done by hand in the imported scene and lost on reimport.
- Exports without custom properties, so the engine never sees the tags.
- Unknown or misplaced tags that were silently ignored; the hook reports them.
Credits
The idea of doing Blender-side post-processing at Godot import time comes from a post by @ashlee3dee (link only; no code or text was used). The code, the potting shed example and the text are ours.
环境要求
- Python 3 standard library; no packages or add-ons
- Blender 4.2+ (tested on 5.2.3), background mode
- Godot 4.2+ (tested on 4.7.2); set GODOT or pass --godot for the check
相关主题
常见问题
AI 2D 美术与序列帧管线 Sprite Asset Pipeline
把 AI 生成的原始视频直接变成商业级透明 2D 游戏序列帧:绿幕/溢色消除命令、0px 脚底锚点锁死排版、动作非线性重定时(4.33s → ~1.88s 含打击顿帧)与 Phaser / Godot 4 图集一键导出。
基于 Headless Blender post-processing at Godot import (post, idea only) (作者 @ashlee3dee,no licence, idea only, no code or text used)的思路。代码和文字由 GameSkill 编写,ZIP 里的 CREDITS.md 列出所有来源。
搭配使用
作者标注的相关 Skills,或更适合相邻任务的 Skills。
GLB to Godot Acceptance (is this model really done?)
A GameSkill original that decides whether a 3D model is ready for a game: Godot 4 imports the GLB like any file in the project, then checks import errors, triangle budget, size in metres with Y up, origin at the base, materials, colliders, the clips the code plays, a drop test on a floor and runtime errors, with a fix for every failure. Works on any GLB from Blender or an image-to-3D model.
Blender Export Pipelines
Export from Blender 5.2 with verified presets - Roblox (FBX/glTF, cages, R15, SurfaceAppearance), Unity (FBX, Humanoid), Unreal (FBX skeletal, Nanite, UCX), Godot/web (GLB, meshopt/Draco, WebP), USD.
Godot 4 Guard (no Godot 3 code, no silent script errors)
A GameSkill original gate for Godot 4 projects: lints every .gd, .tscn and project.godot for Godot 3 API with the Godot 4 form, auto-fixes the mechanical renames, then has Godot 4 headless load every script and play a scene for N frames, failing on parse errors, SCRIPT ERRORs or a missing expected line even when Godot exits 0.
相似 skills
3AGameFactory (GameFactory-3A)
An Apache-2.0 framework of agent skills and pipelines that turns a game requirement into assets (image, 3D, motion, audio, CG video) and engine-ready code for UE5, Blender, Unity, Godot 4 and three.js.
Construct
Describe a prop as data (parts in metres, joints, assembly order) and a deterministic engine builds it: an animated hologram page, and a glTF model with named parts, working joints and optional colliders for Godot, Unity, Unreal or Blender. Python standard library only.
ForgeSkills
28 gated game-development agent skills (concept, orchestration, verification, Blender headless, reference reconstruction, textures, animation, VFX, lighting, foliage, Godot pipeline) plus Python tools that measure the result. GameSkill hosts the 27 we ran, with the tools. Apache-2.0.
Image to 3D Hero (one picture to a playable rigged GLB, free open-source route, three.js WASD)
A GameSkill original that takes one character image to a third-person hero you can walk with WASD, using free tools only: TripoSR or TRELLIS.2 for the mesh, UniRig or Blender for the rig, Quaternius CC0 clips, then a headless Blender fix step and a GLB check for scale, feet, facing and clip names. Meshy, Tripo and Mixamo are listed as alternatives only. Tested on Bram, a made-up stand-in hero.