refactor(tooling): T-1273 — the Blender carve-out, and a guard that keeps it carved
35 payloads move to tooling/scripts/blender/ and stay outside package scope. They run under Blender's bundled Python, which cannot see the repo venv, so they physically cannot import tooling.core — holding them to the D-263 contract would either fail the gate forever or force the contract to be weakened for everyone, and the second is how a gate stops meaning anything. Count verified by import rather than filename: 33 import bpy/bmesh directly, and the two that do not are still payloads per their own usage lines. garment-fit/make_logo.py is the one genuine non-payload and stays for T-1290. The bash wrapper is retired rather than kept. Keeping it would have put the install-resolution logic in two places, which is the duplication T-1286 had just finished collapsing three copies of. domains/blender/service.py owns the decisions — resolve_blender (native beats flatpak, ordering preserved), resolve_payload, absolutise — and only run_payload performs. test_blender.py pins all of them without launching Blender, which matters here more than usual: the thing being launched is a 200 MB GUI application that writes GLBs. `reach blender run` takes a registered payload name OR a path to any script, because the wrapper served both — the spikes and the glb-gen skill hand it one-off scripts of their own. An unknown name enumerates all 35 and exits 2. The exclusion now defends itself. check_carve_out_stays_carved fails if `scripts` is added to PACKAGE_ROOTS, if the payload directory empties (an empty exclusion proves nothing), or if an __init__.py appears there (which would make the payloads importable — the coupling the carve-out exists to prevent). All three arms mutation-proved. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -606,7 +606,8 @@ clothing/coveralls_basic/
|
||||
child.glb # Output: fitted variant
|
||||
```
|
||||
|
||||
The batch script lives in `tooling/blender/` (not in the client tree). It takes arguments:
|
||||
The batch script lives in `tooling/scripts/blender/` (not in the client tree),
|
||||
run as `reach blender run <name>`. It takes arguments:
|
||||
- Input: path to reference GLB
|
||||
- Input: path to the 11 body type meshes (for Surface Deform targets)
|
||||
- Output: directory to write fitted variants
|
||||
@@ -761,7 +762,7 @@ single-channel convention as originally written.
|
||||
### Authoring: offset-shell from our own body segments
|
||||
|
||||
The preferred authoring route is **offset-shell**
|
||||
(`tooling/garment-fit/blender_author_offset_shell.py`, one per-garment companion script per
|
||||
(`tooling/scripts/blender/blender_author_offset_shell.py`, one per-garment companion script per
|
||||
item, e.g. `blender_author_hoodie.py`, `blender_author_boots.py`): extract the body segment(s)
|
||||
a garment covers, cut neckline/hem/sleeve boundaries via bone-plane thresholds, offset the
|
||||
surface outward along vertex normals, solidify for real cloth thickness. Because the shell
|
||||
@@ -785,7 +786,7 @@ shoe shell -- residual toe hints are accepted for first release (see Catalogue b
|
||||
|
||||
### Fitting: Surface-Deform batch route
|
||||
|
||||
`tooling/garment-fit/blender_batch_fit_skinned.py` remains the route for garments sharing one
|
||||
`tooling/scripts/blender/blender_batch_fit_skinned.py` remains the route for garments sharing one
|
||||
reference mesh + mask across all 11 bodies -- Fantasy-pack-derived cuts and hand-authored
|
||||
pieces on a single UV layout (the suit, the uniform). SD-bind to each target body, bake the
|
||||
deformed rest shape, transfer + normalize weights, retarget the armature, export with
|
||||
|
||||
Reference in New Issue
Block a user