One directory with sixty scripts stopped being navigable, and the grouping is also the sandbox boundary:
Tools/unreal/ commandlets and the two map builders, with ue_common.py and ue_placement.py as the
shared imports (they need the engine)
Tools/blender/ builders, exporters, the FBX preset, the MPFB character pipeline, blender_screenshots
(they need the Blender Flatpak)
Tools/review/ the visual loop: render_screenshots.sh, judge_screenshot.py, hero_compare.py,
build_comparison_md.py, e2e_asset_check.py, hero_iterate.sh, visual_loop.py,
visual_targets.json
Tools/gen/ image and texture generation: the ComfyUI driver, deterministic texture writers,
reference fetching
Tools/input/ OS-level input injection
root _common.py, check-lfs.sh, addon_compat_probe.py, sibling_asset_audit.py, tests/
Every moved script now resolves the repository root as ../.. and puts the tools root plus its siblings on
sys.path, so 'import ue_common' still works from unreal/. The test suite bootstrap does the same for the five
folders. render_screenshots.sh takes the folder as a third argument to run_cmdlet, and the e2e driver,
hero_iterate.sh and the comparison generator were repointed.
51 README rows now link to their new location, the README gains a Layout section naming each folder's
sandbox, and the architecture notes and Blender README follow the moves.
Verified: 108 tests pass, prettier is clean, judge_screenshot.py and hero_compare.py run from their new
homes, and the e2e run was aborted mid-way (it had been rebuilding an empty DemoMap for 15 minutes) and is
being rerun against the new layout.
60 lines
3.4 KiB
Bash
Executable File
60 lines
3.4 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# Full hero-facade iteration: build -> import -> render -> judge -> comparison plate.
|
|
#
|
|
# bash Tools/review/hero_iterate.sh [shot]
|
|
#
|
|
# `shot` defaults to review-hero-facade-front. Every step writes to /tmp/gigline/ so a failure can be
|
|
# read back: Unreal commandlets swallow print().
|
|
#
|
|
# Why a script and not four remembered commands: the loop is run once per modelling change, and the
|
|
# order is load-bearing. The Blender save happens BEFORE the FBX export, so a read-only .blend makes
|
|
# the build look successful while the old FBX is reused silently - hence the chmod at the top.
|
|
set -uo pipefail
|
|
cd "$(dirname "$0")/.." || exit 1
|
|
|
|
ENGINE="${ENGINE:-/run/media/system/DATA/Engines/UE_5.8.4}"
|
|
BLENDER_FILES="${BLENDER_FILES:-/var/lib/flatpak/app/org.blender.Blender/x86_64/stable/active/files}"
|
|
UPROJECT="$(pwd)/Game/GigLine/GigLine.uproject"
|
|
SHOT="${1:-review-hero-facade-front}"
|
|
REFERENCE="${REFERENCE:-Art/reference/hero-masonic/02-masonictemple01.jpg}"
|
|
|
|
step() { printf '\n== %s\n' "$1"; }
|
|
|
|
step "1/6 blender files writable"
|
|
find Art -name '*.blend*' -exec chmod u+w {} \;
|
|
|
|
step "2/6 build the facade"
|
|
LD_LIBRARY_PATH="$BLENDER_FILES/blender/lib" "$BLENDER_FILES/blender/blender" -b --factory-startup \
|
|
--python Tools/blender/hero_facade_build.py -- \
|
|
--out /tmp/gigline/hero-facade.fbx \
|
|
--save-blend Art/blender/hero/hero-facade-2026-11-07.blend \
|
|
--report Art/blender/hero/hero-facade-2026-11-07.json \
|
|
> /tmp/gigline/hero-build.log 2>&1 || { echo "build failed - see /tmp/gigline/hero-build.log"; exit 1; }
|
|
grep -E 'exported FBX' /tmp/gigline/hero-build.log || { echo "no FBX written"; exit 1; }
|
|
|
|
step "3/6 import into Unreal"
|
|
"$ENGINE/Engine/Binaries/Linux/UnrealEditor-Cmd" "$UPROJECT" -run=pythonscript \
|
|
-script="$(pwd)/Tools/unreal/ue_hero_facade_import.py" -nullrhi -unattended -nopause -stdout \
|
|
> /tmp/gigline/hero-import.log 2>&1
|
|
grep -q 'save_map' /tmp/gigline/hero-facade-import.txt || { echo "import failed - see /tmp/gigline/hero-facade-import.txt"; exit 1; }
|
|
|
|
step "4/6 rebuild DemoMap (materials live in the map builder)"
|
|
"$ENGINE/Engine/Binaries/Linux/UnrealEditor-Cmd" "$UPROJECT" -run=pythonscript \
|
|
-script="$(pwd)/Tools/unreal/ue_build_demo_map.py" -nullrhi -unattended -nopause -stdout \
|
|
> /tmp/gigline/hero-demomap.log 2>&1
|
|
grep -q 'save_map' /tmp/gigline/demo-map.txt || { echo "demo map rebuild failed - see /tmp/gigline/demo-map.txt"; exit 1; }
|
|
|
|
step "5/6 render the capture set"
|
|
bash Tools/review/render_screenshots.sh > /tmp/gigline/hero-render.log 2>&1 || { echo "render failed - see /tmp/gigline/hero-render.log"; exit 1; }
|
|
|
|
step "6/6 judge and compare"
|
|
python3 Tools/review/judge_screenshot.py --image "Screenshots/review/${SHOT}.png" \
|
|
--expect "A neoclassical Masonic temple facade: warm yellow-grey sandstone with horizontal ashlar courses, six giant fluted Ionic columns on square pedestals, three tall red vertical banners reading JIMMY KIMMEL LIVE hanging between the columns, dark lattice metal grilles in the window bays behind the colonnade, three recessed dark entrance doorways with steps, above the columns a carved inscription band flanked by two round medallions, topped by a crested parapet." \
|
|
| tee /tmp/gigline/hero-judge.txt | tail -2
|
|
python3 Tools/review/hero_compare.py --reference "$REFERENCE" \
|
|
--render "Screenshots/review/${SHOT}.png" \
|
|
--out "Screenshots/review/hero-compare-${SHOT#review-hero-}.png"
|
|
|
|
echo
|
|
echo "plate: Screenshots/review/hero-compare-${SHOT#review-hero-}.png"
|