3.0 KiB
3.0 KiB
Extract fountain module
Goal
Move the fountain assembly code out of blender/generate_scene.py into a
dedicated bpy-layer module, keeping the generated .blend / .glb structure
unchanged. This is the first low-risk step toward the documented P2 feature
module / registry direction.
Background
.trellis/spec/guides/artifact-parity-guide.mdrecords P2 as partial:water.py,grass.py,scrub.py, andtree.pyexist, butbuilding,fountain, androadsstill live ingenerate_scene.py.blender/generate_scene.py:639definesadd_fountain()inline.blender/generate_scene.py:895dispatches OSM point features withamenity=fountain, callsadd_fountain("Fountain_" + id, ...), and incrementscounts["fountain_count"].blender/osmassets/catalog.pyalready owns the three fountain materials:fountain_stone,fountain_water, andfountain_spray.- This task is a pure refactor. It must not change fountain geometry, object names, materials, custom properties, counts, stdout markers, or Cesium export behavior.
Requirements
- Add a new bpy-layer module at
blender/osmassets/fountain.py. - Move the current fountain assembly behavior from
generate_scene.pyinto the new module. - Keep
generate_scene.pyresponsible for:- creating fountain materials from
catalog.MATERIALS; - filtering
point_featuresforamenity=fountain; - projecting coordinates;
- incrementing
counts["fountain_count"].
- creating fountain materials from
- Preserve the existing object names:
Fountain_<id>_BasinFountain_<id>_WaterFountain_<id>_PedestalFountain_<id>_Water_CrownFountain_<id>_Droplet_<n>
- Preserve the existing basin custom property:
osm_feature = "amenity=fountain". - Do not introduce a full
features/registry in this task. - Do not modify
building,roads, material definitions,MATERIALSorder,ROAD_LAYERSorder, stdout markers, or parity ignore lists. - Do not fix unrelated documented defects D1, D2, or D3.
Acceptance Criteria
blender/osmassets/fountain.pycontains the fountain assembly behavior and imports only bpy-layer-safe dependencies.blender/generate_scene.pyimports and calls the new fountain module; no inlineadd_fountain()function remains there.- Scene counts and
SCENE_DONEJSON keys remain unchanged. python3 -m unittest blender/tests/test_pure.pypasses.python3 -m py_compile blender/osmassets/fountain.pypasses.python3 -m py_compile blender/generate_scene.pypasses.- A before/after parity comparison is run for the Blender/Cesium stages and any non-ignored diff is either absent or explicitly explained as expected. For this refactor, the expected result is no contract diff.
Out Of Scope
- Full feature registry design or implementation.
- Building extraction.
- Road extraction.
- Fountain visual redesign or geometry changes.
- Material contract changes.
- Documentation-only cleanup of stale comments such as D3.
Open Questions
None.