Blend auto-export tool (GLB blacklist follow-up to #24) #37

Open
opened 2026-11-10 16:38:09 +00:00 by muse-lantern · 0 comments
Member

PARKED by Zach 2026-11-10 — filed as the record, no build yet. Question from Zach, 2026-11-09: "should we consider blacklisting all GLB's and keep the Blend's in the project? and then just use a tool to auto-export blendfiles to glbs?"

This is a generalization of the bake tool (#24), not a new tool. The full scope draft lives in the goal files as dead-air-blend-autoexport-scope.md.

What already exists (verified)

  • Bake prototype verified 2026-10-28 on the pin: headless Blender 5.2.3 exported the re-rigged glove .blend to a valid GLB, Godot 4.6.3 headless import 0 errors (Skeleton3D, 21 bones, textures carried after relinking).
  • Scratch script ~/workspace/verification/bake_generic.py (NOT in any repo) already has: CLI args, texture relinking as data (--texture SUBSTRING:FILENAME, hard fail on 0x0 images), bone-set assertion from JSON, object discovery (MESH + ARMATURE, cameras/lights excluded), selection-only export with transforms applied. The .blend is never re-saved.

Proposed scope (v1)

  1. Repo home + CLI: script moves into the engine repo (tools/ beside check.py is the natural spot), runnable headless wherever Blender 5.2.3 is installed.
  2. Check mode: parse the GLB back + Godot headless import, failing loudly on errors — same double-import discipline as the suites.
  3. Per-asset bake data, not per-asset code: texture relinks + bone assertions as small data files next to the .blend; a generic prop with no armature skips the bone assertion. Generic pistol/mag/bullet are the first non-rigged test case; glove is the rigged one.
  4. Two sources, one tool: open .blends in the engine repo; licensed .blend source stays in private blender-assets (cannot go in the public repo). Same script, two roots.
  5. GLB whitelist, not blanket blacklist: vr_glove.glb has no .blend source (distributed as GLB only) and stays committed, same exception pattern the .gitignore already uses for the hands. Any other GLB-only third-party asset gets the same treatment, named explicitly.
  6. Out of v1: editor-extension wrapper (headless first, wrapper second), tint masks, HandView grip/curl verification of baked output.

Sequencing (the part that matters)

Do NOT flip the .gitignore first. Order: (1) build + prove the tool, (2) commit the open .blends, (3) blacklist GLBs in .gitignore, whitelisting GLB-only exceptions, (4) remove the committed GLBs. Flipping step 3 before step 1 breaks the game with no way to regenerate the models.

Verification (before any blacklist flips)

  • Bake generic pistol, mag, 9mm bullet + glove from their .blends; Godot headless import 0 errors; full suites + e2e unchanged (same 3 known mag-insert failures, no new ones).
  • Functional comparison vs the committed GLBs (meshes, bones by name, textures carried) — not byte comparison.
  • One deliberate failure test: a .blend with a dangling texture path must fail the bake, not silently export texture-less.

Open questions

  1. Scope it now or park it? (Zach, 2026-11-10: PARKED for now.)
  2. Where do .blends live? Proposal: each asset group's source/ dir (those dirs + .gdignore were added for the new gun assets in 8e5f108). Alternative: a mirrored blender-assets-style tree in-repo.
  3. First proving run needs Zach's .blends — the generic gun .blends are not in the repo (gitignored by design).
  4. Editor-extension wrapper in v1 or later? Proposal: later.

Interaction with the pending texture step

The single-texture dedup (modules/devkit/assets/textures/generic_color_map.png) is still Zach's Blender step: relink the .blends to it once, re-export. That relink is exactly what the bake carries as data (--texture pairs) — do it once in the .blend and the bake reproduces it every time.

PARKED by Zach 2026-11-10 — filed as the record, no build yet. Question from Zach, 2026-11-09: "should we consider blacklisting all GLB's and keep the Blend's in the project? and then just use a tool to auto-export blendfiles to glbs?" This is a generalization of the bake tool (#24), not a new tool. The full scope draft lives in the goal files as dead-air-blend-autoexport-scope.md. ## What already exists (verified) - Bake prototype verified 2026-10-28 on the pin: headless Blender 5.2.3 exported the re-rigged glove .blend to a valid GLB, Godot 4.6.3 headless import 0 errors (Skeleton3D, 21 bones, textures carried after relinking). - Scratch script ~/workspace/verification/bake_generic.py (NOT in any repo) already has: CLI args, texture relinking as data (--texture SUBSTRING:FILENAME, hard fail on 0x0 images), bone-set assertion from JSON, object discovery (MESH + ARMATURE, cameras/lights excluded), selection-only export with transforms applied. The .blend is never re-saved. ## Proposed scope (v1) 1. Repo home + CLI: script moves into the engine repo (tools/ beside check.py is the natural spot), runnable headless wherever Blender 5.2.3 is installed. 2. Check mode: parse the GLB back + Godot headless import, failing loudly on errors — same double-import discipline as the suites. 3. Per-asset bake data, not per-asset code: texture relinks + bone assertions as small data files next to the .blend; a generic prop with no armature skips the bone assertion. Generic pistol/mag/bullet are the first non-rigged test case; glove is the rigged one. 4. Two sources, one tool: open .blends in the engine repo; licensed .blend source stays in private blender-assets (cannot go in the public repo). Same script, two roots. 5. GLB whitelist, not blanket blacklist: vr_glove.glb has no .blend source (distributed as GLB only) and stays committed, same exception pattern the .gitignore already uses for the hands. Any other GLB-only third-party asset gets the same treatment, named explicitly. 6. Out of v1: editor-extension wrapper (headless first, wrapper second), tint masks, HandView grip/curl verification of baked output. ## Sequencing (the part that matters) Do NOT flip the .gitignore first. Order: (1) build + prove the tool, (2) commit the open .blends, (3) blacklist GLBs in .gitignore, whitelisting GLB-only exceptions, (4) remove the committed GLBs. Flipping step 3 before step 1 breaks the game with no way to regenerate the models. ## Verification (before any blacklist flips) - Bake generic pistol, mag, 9mm bullet + glove from their .blends; Godot headless import 0 errors; full suites + e2e unchanged (same 3 known mag-insert failures, no new ones). - Functional comparison vs the committed GLBs (meshes, bones by name, textures carried) — not byte comparison. - One deliberate failure test: a .blend with a dangling texture path must fail the bake, not silently export texture-less. ## Open questions 1. Scope it now or park it? (Zach, 2026-11-10: PARKED for now.) 2. Where do .blends live? Proposal: each asset group's source/ dir (those dirs + .gdignore were added for the new gun assets in 8e5f108). Alternative: a mirrored blender-assets-style tree in-repo. 3. First proving run needs Zach's .blends — the generic gun .blends are not in the repo (gitignored by design). 4. Editor-extension wrapper in v1 or later? Proposal: later. ## Interaction with the pending texture step The single-texture dedup (modules/devkit/assets/textures/generic_color_map.png) is still Zach's Blender step: relink the .blends to it once, re-export. That relink is exactly what the bake carries as data (--texture pairs) — do it once in the .blend and the bake reproduces it every time.
Commenting is not possible because the repository is archived.
No labels
No milestone
No project
No assignees
1 participant
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
dead-air/engine-legacy#37
No description provided.