ezEngine OpenDDL 文档编辑
ez-ddl
读取并编辑磁盘上的 ezEngine 文档——场景(.ezScene)、预制体(.ezPrefab)和资产(.ez*Asset)均为 OpenDDL 文本。使用 Utilities/Scripts/ezddl.py 转换 GUID('{ xxxxxxxx-... }' <-> 'u4{low,high}')和十六进制浮点数(0x0000803F)、将资产 GUID 解析为路径、查找哪些文档使用了某资产、打印场景层级、添加游戏对象和组件、设置属性、验证文档,并让编辑器重新转换手工编辑过的资产。触发词——ezScene、ezPrefab、ezMaterialAsset、ezTextureAsset、DDL、OpenDDL、asset GUID、Uuid u4、asset reference、hex float、edit scene file、add object to scene、which asset is this GUID、who references this asset、HeaderV2、Types section、type version。
- License 许可
- MIT
- 最近更新
- 2026-11-13
- Stars
- ★ 2.0k
- Forks
- 268
01 前言 Front Matter
- name
- ez-ddl
- description
- Read and edit ezEngine documents on disk - scenes (.ezScene), prefabs (.ezPrefab) and assets (.ez*Asset) are OpenDDL text. Use Utilities/Scripts/ezddl.py to convert GUIDs ('{ xxxxxxxx-... }' <-> 'u4{low,high}') and hex floats (0x0000803F), resolve asset GUIDs to paths, find which documents use an asset, print a scene hierarchy, add game objects and components, set properties, validate a document, and make the editor re-transform a hand-edited asset. Triggers - ezScene, ezPrefab, ezMaterialAsset, ezTextureAsset, DDL, OpenDDL, asset GUID, Uuid u4, asset reference, hex float, edit scene file, add object to scene, which asset is this GUID, who references this asset, HeaderV2, Types section, type version.
03 SKILL.md 正文
Editing ezEngine documents as text
python Utilities/Scripts/ezddl.py <command> (stdlib only, run from the repo root). -h on any command lists
its options. All commands accept GUIDs in any form: "{ 7c71fc2d-2a1a-4938-9305-f3a0f26d73cc }",
u4{14732239694908818835,5276013256709897261} or 14732239694908818835,5276013256709897261.
| Task | Command |
|---|---|
| Convert a GUID / make new ones | guid <guid> [-r] (-r names the asset), guid new 3 |
| Hex float <-> decimal | float 0x0000803F 1.5 |
| Which asset is this GUID / GUID of this file | asset <guid>, asset Coin.ezPrefab, asset "*Materials/*Wood*" |
| Who references an asset | uses <guid or path> (-l for file names only) |
| Read a document | show <file> (decimal floats, GUIDs as strings, asset paths), -o <guid or Name>, -t "*Light*" |
| Scene / prefab hierarchy | tree <file> [--props] [--depth N] |
| Validate after editing | check <file>... |
| Add a game object | new-object <file> --name N --parent <guid or Name> --pos 1,2,3 -c ezPointLightComponent |
| Set a property | set <file> <object> <Property> <value>, --type if not stored yet |
| Type version, base classes, property names, enum values | type ezPointLightComponent, type --list "*Light*" |
| A real object of a type, as a template | example ezSpotLightComponent |
| Make the editor re-transform after a hand edit | touch <file> |
Asset lookups index the data directories of the project that contains the file (from
RuntimeConfigs/DataDirectories.ddl); without a file they index all of Data/. Override with --project or
--root.
Files or MCP?
- Editor running with the document open -> use MCP (
ez-mcpskill). The editor does not reload a document that changes on disk; its next save silently overwrites the edit. If it must be a file edit,document_closefirst anddocument_openafterwards. - Editor not running, many documents, or mechanical changes (rename a reference everywhere, add the same component to many prefabs) -> edit the files.
show/tree/uses/assetare usually the fastest way to understand data even when the editor runs.
Format facts
- Three sections:
HeaderV2(asset info:DocumentID,Hash,Dependencies,References,PackageDeps),Objects(every object aso { Uuid %id, s %t (type), u3 %v (version), p { properties } }; the one withs %n{"ObjectTree"}is the root),Types(descriptors of the types used, with their versions). - A scene's hierarchy is GUID lists: root
Children-> game objects, each withChildrenandComponents. Every object must be referenced exactly once;checkverifies that. - Asset references are strings:
s %Mesh{"{ guid }"}. Some are paths ("White.color","Shaders/Materials/DefaultMaterial.ezShader"). Game object references (e.g. a constraint'sChildActor) are also GUID strings, pointing to an object in the same document. - Floats are written as hex bytes, but the parser accepts decimals:
f %Intensity{2.5}andVec3 %LocalPosition{f{1,2,-3}}load fine.Angleis stored in radians,Timeas double seconds,ColorGammaasu1{r,g,b,a},Coloras linear floats. Enums and bitflags are strings:"ezFoo::Bar","ezFoo::A|ezFoo::B". - Properties that are not written take the type's default when loaded. A new object only needs the properties that differ from the default.
- Order of objects and properties does not matter for loading; the editor sorts both when it saves.
- Editable prefab instances (and materials with a base material) carry
MetaFromPrefab(the source asset),MetaPrefabSeedandMetaBasePrefab(the whole source document as a string). Their objects' ids areprefab object id + seed(guid add/sub). Do not editMetaBasePrefab.
Rules that are not obvious
- After a hand edit run
touch. The asset curator compares only the headerHashwith the transformed output. Edited content with an unchangedHashcounts as up to date and is never transformed. - The header is not recomputed by
touch.Dependencies/References/PackageDepsare written by the editor based on property attributes (a scene to load, for instance, is deliberately not a dependency). Usually it does not matter for a transform, but export packaging andasset_usesread them. For an exact header open the document in the editor and save it withdocument_saveforcetrue. - New GUIDs must be random and new (
guid new, or letnew-objectmake them). Never copy an object block without changing its id, never derive ids by incrementing. - Type versions. If the
Typessection lists a type, its version (not the object'sv) is what loading uses, and graph patches run from there to the code's version.new-objectwrites the matching version and warns when the file is older than the code - then upgrade the file first (open and save in the editor). When adding an object of a type that is not inTypesyet,vmust be the code's version (type <name>). - Run
checkafter every structural edit. It reports parse errors with a line number and warns about GUID strings that are neither a known asset nor an object of the document - typos, deleted assets, or sub-assets (e.g. Fmod events), which the index does not know. - Files may use CRLF; the script keeps the existing line endings. When editing with other tools, keep tabs for indentation.
04 同仓库更多 Skills
MCP 服务管理
ez-mcp
暂无简介
数据库 DDL 管理
ez-ddl
暂无简介
调试器美化打印器
debug-pretty-printers
暂无简介
Android 构建与测试
android-build-test
暂无简介
ezEngine MCP 运行时操控
ez-mcp
通过 MCP 从 agent 驱动运行中的 ezEditor 或 ezPlayer/游戏——先用端口启动,再调用工具检查并修改实时项目。适用于需要运行中的应用而非磁盘文件的 ezEngine 任务。触发词——ezEditor、ezPlayer、ezEditorProcessor、MCP server、editor-mcpport、mcpport、transform asset、asset dependencies、asset browser、open document、edit scene、build a scene、game object、component、prefab、property grid、selection、reflected types、RTTI、CVar、editor action、play the game、screenshot、inject input、press key、step frames、export project、create project、build the C++ plugin。
GDB/LLDB 调试可视化器开发
debug-pretty-printers
为 ezEngine C++ 类型调试并开发 GDB 和 LLDB 的 pretty printer(调试可视化器)。当处理 ezEngine-gdb.py、ezEngine.py 或 ezEngine.natvis 中的调试可视化器时,使用本技能。涵盖使用 VisualizerZoo.cpp 进行测试、常见错误及调试技巧。