2.0 KiB
2.0 KiB
Implementation Plan
Checklist
- Capture a parity baseline before product-code edits.
- Add
blender/osmassets/building.pywith the current building assembly and detail helper logic. - Import
building.pyinblender/generate_scene.py. - Remove inline
_assemble_building()andadd_building_details()fromgenerate_scene.py. - Replace the building call site with
building.assemble(...), passingargs["office_overrides"]instead of the fullargsdict. - Run Python validation:
python3 -m py_compile blender/osmassets/building.pypython3 -m py_compile blender/generate_scene.pypython3 -m unittest blender/tests/test_pure.py
- Capture parity after the refactor.
- Compare before/after parity snapshots and inspect any non-ignored diff.
- Update
.trellis/specanddocs/changelog.mdonly for durable status or convention changes discovered during implementation. - Commit, archive the task, and record the journal entry.
Validation Commands
node scripts/parity.js capture building-module-before --stages blender,cesium
python3 -m py_compile blender/osmassets/building.py
python3 -m py_compile blender/generate_scene.py
python3 -m unittest blender/tests/test_pure.py
node scripts/parity.js capture building-module-after --stages blender,cesium
node scripts/parity.js compare building-module-before building-module-after
Risk Points
- Passing
office_overridesinstead ofargschanges the function contract; verifyoffice_overridecustom properties and industrial classification via parity. Building_<way_id>_Windowsmesh construction depends onMeshBatchobject naming andadd_wall_panel()geometry; copy it mechanically.make_prism()can returnNoneon degenerate input, but the current call site filterslen(ring) >= 3. Preserve the existing behavior and return tuple shape.- Do not reorder building material creation or catalog entries; material order affects GLB material indices.
- Parity is mandatory because this is a pure refactor of bpy-layer scene generation.