refactor(tools): group the sixty scripts by what they talk to
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.
This commit is contained in:
1 parent
f681d83736
commit
4d27109668
168 files changed
+799
-407
No files matched your search
@@ -4,6 +4,15 @@ The Geo tools live outside `Tools/`, so the test adds `Geo/tools` to `sys.path`
|
||||
before importing the module by name.
|
||||
"""
|
||||
|
||||
import os
|
||||
import sys
|
||||
|
||||
_TOOLS = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
||||
sys.path.insert(0, _TOOLS)
|
||||
for _sub in ("review", "gen", "unreal", "blender", "input"):
|
||||
sys.path.insert(0, os.path.join(_TOOLS, _sub))
|
||||
|
||||
|
||||
import os
|
||||
import sys
|
||||
import unittest
|
||||
|
||||
@@ -1,5 +1,14 @@
|
||||
"""Tests for the pure parts of Tools/character_match.py."""
|
||||
|
||||
import os
|
||||
import sys
|
||||
|
||||
_TOOLS = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
||||
sys.path.insert(0, _TOOLS)
|
||||
for _sub in ("review", "gen", "unreal", "blender", "input"):
|
||||
sys.path.insert(0, os.path.join(_TOOLS, _sub))
|
||||
|
||||
|
||||
import os
|
||||
import sys
|
||||
import unittest
|
||||
|
||||
@@ -1,5 +1,14 @@
|
||||
"""Graph shape for the documented texture workflows (no ComfyUI process involved)."""
|
||||
|
||||
import os
|
||||
import sys
|
||||
|
||||
_TOOLS = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
||||
sys.path.insert(0, _TOOLS)
|
||||
for _sub in ("review", "gen", "unreal", "blender", "input"):
|
||||
sys.path.insert(0, os.path.join(_TOOLS, _sub))
|
||||
|
||||
|
||||
import unittest
|
||||
|
||||
from comfyui_generate import TEXTURE_PROFILES, texture_workflow
|
||||
|
||||
@@ -4,6 +4,15 @@ No network calls: the OpenRouter request and the image bytes are represented as
|
||||
the small structures the API uses. Generation itself is manual and paid.
|
||||
"""
|
||||
|
||||
import os
|
||||
import sys
|
||||
|
||||
_TOOLS = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
||||
sys.path.insert(0, _TOOLS)
|
||||
for _sub in ("review", "gen", "unreal", "blender", "input"):
|
||||
sys.path.insert(0, os.path.join(_TOOLS, _sub))
|
||||
|
||||
|
||||
import base64
|
||||
import json
|
||||
import os
|
||||
|
||||
@@ -5,6 +5,15 @@ The preset module keeps its argument set in plain dicts and builds it in
|
||||
Blender. Only `export_static`/`export_character` import `bpy`.
|
||||
"""
|
||||
|
||||
import os
|
||||
import sys
|
||||
|
||||
_TOOLS = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
||||
sys.path.insert(0, _TOOLS)
|
||||
for _sub in ("review", "gen", "unreal", "blender", "input"):
|
||||
sys.path.insert(0, os.path.join(_TOOLS, _sub))
|
||||
|
||||
|
||||
import os
|
||||
import sys
|
||||
import unittest
|
||||
|
||||
@@ -5,6 +5,15 @@ covered here; the end-to-end injection is verified by running the tool (see
|
||||
Docs/release-checks.md and MEMORY.md).
|
||||
"""
|
||||
|
||||
import os
|
||||
import sys
|
||||
|
||||
_TOOLS = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
||||
sys.path.insert(0, _TOOLS)
|
||||
for _sub in ("review", "gen", "unreal", "blender", "input"):
|
||||
sys.path.insert(0, os.path.join(_TOOLS, _sub))
|
||||
|
||||
|
||||
import unittest
|
||||
|
||||
import input_emulation as ie
|
||||
|
||||
@@ -1,5 +1,14 @@
|
||||
"""Tests for the multi-model reconciliation in judge_screenshot.combine()."""
|
||||
|
||||
import os
|
||||
import sys
|
||||
|
||||
_TOOLS = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
||||
sys.path.insert(0, _TOOLS)
|
||||
for _sub in ("review", "gen", "unreal", "blender", "input"):
|
||||
sys.path.insert(0, os.path.join(_TOOLS, _sub))
|
||||
|
||||
|
||||
import unittest
|
||||
|
||||
from judge_screenshot import combine
|
||||
|
||||
@@ -5,6 +5,15 @@ the API returns, and only the selection/comparison/formatting helpers are
|
||||
exercised. The live call is verified by running the tool.
|
||||
"""
|
||||
|
||||
import os
|
||||
import sys
|
||||
|
||||
_TOOLS = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
||||
sys.path.insert(0, _TOOLS)
|
||||
for _sub in ("review", "gen", "unreal", "blender", "input"):
|
||||
sys.path.insert(0, os.path.join(_TOOLS, _sub))
|
||||
|
||||
|
||||
import json
|
||||
import os
|
||||
import sys
|
||||
|
||||
@@ -4,6 +4,15 @@ The builder itself needs Blender; `bay_centres` does not, so the bay rhythm the
|
||||
façade depends on is checkable without starting Blender or Unreal.
|
||||
"""
|
||||
|
||||
import os
|
||||
import sys
|
||||
|
||||
_TOOLS = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
||||
sys.path.insert(0, _TOOLS)
|
||||
for _sub in ("review", "gen", "unreal", "blender", "input"):
|
||||
sys.path.insert(0, os.path.join(_TOOLS, _sub))
|
||||
|
||||
|
||||
import unittest
|
||||
|
||||
from Tools._common import bay_centres
|
||||
|
||||
@@ -1,5 +1,14 @@
|
||||
"""Tests for the pure parts of Tools/shadow_gap.py."""
|
||||
|
||||
import os
|
||||
import sys
|
||||
|
||||
_TOOLS = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
||||
sys.path.insert(0, _TOOLS)
|
||||
for _sub in ("review", "gen", "unreal", "blender", "input"):
|
||||
sys.path.insert(0, os.path.join(_TOOLS, _sub))
|
||||
|
||||
|
||||
import os
|
||||
import sys
|
||||
import unittest
|
||||
|
||||
@@ -4,6 +4,15 @@ Pure stdlib: these helpers exist to turn two silent failures into loud ones, so
|
||||
they are tested without starting Unreal.
|
||||
"""
|
||||
|
||||
import os
|
||||
import sys
|
||||
|
||||
_TOOLS = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
||||
sys.path.insert(0, _TOOLS)
|
||||
for _sub in ("review", "gen", "unreal", "blender", "input"):
|
||||
sys.path.insert(0, os.path.join(_TOOLS, _sub))
|
||||
|
||||
|
||||
import os
|
||||
import stat
|
||||
import sys
|
||||
|
||||
@@ -6,6 +6,15 @@ Running the importer moved the hero 13 m east and onto the north side of the
|
||||
boulevard, and nothing complained because a displaced building still renders.
|
||||
"""
|
||||
|
||||
import os
|
||||
import sys
|
||||
|
||||
_TOOLS = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
||||
sys.path.insert(0, _TOOLS)
|
||||
for _sub in ("review", "gen", "unreal", "blender", "input"):
|
||||
sys.path.insert(0, os.path.join(_TOOLS, _sub))
|
||||
|
||||
|
||||
import os
|
||||
import sys
|
||||
import unittest
|
||||
@@ -70,14 +79,14 @@ class SingleSourceOfTruthTest(unittest.TestCase):
|
||||
"""The import script and the demo builder must not carry their own literals."""
|
||||
|
||||
def test_import_script_uses_the_shared_constant(self):
|
||||
src = open(os.path.join(ROOT, "Tools", "ue_hero_facade_import.py"),
|
||||
src = open(os.path.join(ROOT, "Tools", "unreal", "ue_hero_facade_import.py"),
|
||||
encoding="utf-8").read()
|
||||
self.assertIn("ue_placement.HERO_LOCATION_CM", src)
|
||||
self.assertNotIn("(-12024.5, -1450.0, 0.0)", src,
|
||||
"the stale pre-0.1.0 hero position must not come back")
|
||||
|
||||
def test_demo_builder_uses_the_shared_constant(self):
|
||||
src = open(os.path.join(ROOT, "Tools", "ue_build_demo_map.py"),
|
||||
src = open(os.path.join(ROOT, "Tools", "unreal", "ue_build_demo_map.py"),
|
||||
encoding="utf-8").read()
|
||||
self.assertIn("ue_placement.HERO_LOCATION_CM", src)
|
||||
|
||||
|
||||
@@ -5,6 +5,15 @@ numbers can be reasoned about directly (a mid-grey flat frame has near-zero edge
|
||||
density and contrast; a checkerboard has a lot of both).
|
||||
"""
|
||||
|
||||
import os
|
||||
import sys
|
||||
|
||||
_TOOLS = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
||||
sys.path.insert(0, _TOOLS)
|
||||
for _sub in ("review", "gen", "unreal", "blender", "input"):
|
||||
sys.path.insert(0, os.path.join(_TOOLS, _sub))
|
||||
|
||||
|
||||
import os
|
||||
import sys
|
||||
import tempfile
|
||||
|
||||
Reference in new issue
Block a user