Geo/tools/ is now every geographic script, with Geo/README.md documenting each one; the Blender-side builders moved beside their outputs in Art/blender/*/ and import their helpers from Geo/tools/osm_common.py. That module gains to_unreal_local() and to_blender_local(): the only place in the repository that multiplies metres by 100, so a second silent scale cannot be introduced. block_height_report.py adds height provenance for the block — 3 of 15 buildings have no height data and render at a placeholder 6.4 m. asset_metadata.py writes and audits <asset>.geo.json sidecars; four now exist (hero-facade, terrain, street, blockout) and the audit recomputes each centre from the origin, failing anything that disagrees.
2.6 KiB
2.6 KiB
Tools
Repeatable import/export and processing helpers. Anything that was done twice by hand belongs here.
Conventions
- One script, one job. No interactive prompts; every input is an argument.
- Each script documents its input format, output format, and the exact tool version it was tested with.
- Blender scripts run headless (
blender --background --python), so they can be re-run for a regression check. - No credentials, no absolute machine paths, no writes outside the project by default.
- A script that produces game content logs what it produced, so
Game/Contentcan be audited against it.
Helpers
render_screenshots.sh— visual-review pipeline: rebuilds/Game/Test/ReviewMapfrom current content (ue_build_review_map.py), runs the game on it in-gamemode, letsAGigLineShotActor(Game/GigLine/Source/GigLine/) capture the fixed camera list, and copies the PNGs into the gitignoredScreenshots/. SeeScreenshots/README.md.check-lfs.sh— repository guard: fails ifgit-lfsor thelfsfilter is missing, or if an LFS-tracked file was committed as a plain blob.- Geographic tools and their shared helpers live in
Geo/tools/(seeGeo/README.md). - Blender-side builders that turn geo data into meshes live beside their output:
Art/blender/terrain/terrain_from_dem.py,Art/blender/street/street_mesh.py,Art/blender/site/site_assembly.py,Art/blender/blockout/blosm_blockout.py. They import their helpers fromGeo/tools/osm_common.py, which is also the only place that converts metres to Unreal centimetres. sibling_asset_audit.py— reads the sibling project's prop library straight from GLB headers and writesArt/props/reuse-manifest.json; copies nothing.page_image_fetch.py— resolves a web page'sog:imageand downloads it, with page URL and hash in a local sidecar. Works for Flickr, Commons file pages, and most photo blogs.commons_fetch.py— Wikimedia Commons reference fetcher. Search, exactFile:titles, or a whole Commons category (--category), thumbnails, provenancesidecar.jsonper folder. Wikimedia throttlesupload.wikimedia.org(HTTP 429), so keep batches to six or fewer files and pass--delay 3; a throttled file is skipped and recorded rather than aborting the run. Writes only into the gitignoredArt/reference/; reference images are never committed.
Planned helpers
- Blender export preset runner (named presets, metric scale assertion)
- OSM extract fetch and manifest writer (records date, bounds, checksum)
- QGIS processing steps as batch scripts, so the geo cleanup is reproducible rather than GUI-only