Skip to content

πŸ’ƒ Free CC0 mannequin pose reference library for AI image tools (Nano Banana, ChatGPT, ComfyUI, Midjourney) β€” 250+ poses Γ— 5 angles in line art, names in ja/zh/en/ko

feat(tools): import_redraws --only picks the sets a person chose

wquguru4eb47cd46e89
diff --git a/tools/import_redraws.py b/tools/import_redraws.py
index 89d48549..087af2c3 100644
--- a/tools/import_redraws.py
+++ b/tools/import_redraws.py
@@ -1,13 +1,14 @@
#!/usr/bin/env python3
"""Stage whole-set redraws from another generator as a new source and point their catalog entries at it.
-Usage: python3 tools/import_redraws.py SRC OUT --source digi
+Usage: python3 tools/import_redraws.py SRC OUT --source digi [--only P019,U051,...]
SRC is a redraw delivery with index.json (one row per set: set, shisei_id) and <group>/<set>/<view>.png.
Each listed view is written losslessly to OUT/img/<series>_<ID>_<view>.webp, the name the tiers use, so OUT works
as a source set for build_images.py, review_sheets.py, line_dups.py and pack_release.py (`--src digi=OUT`).
In data/catalog.json the pose gets `source` and its views are replaced as a whole set: a view the delivery lacks
becomes null, never a view kept from the old drawing (AGENTS Β§2, no mixing within a set). Names, class, rating and
orig_id stay; ja is the original naming and the delivery's own labels are not imported.
+--only takes the sets a person chose after QC (docs/GENERATION.md); the others keep their original drawing.
Run qc_merge.py afterwards: results from other sources no longer apply to these poses (docs/qc/README.md).
"""
import argparse, json, pathlib, subprocess
@@ -21,6 +22,7 @@ def main() -> None:
ap.add_argument("src")
ap.add_argument("out")
ap.add_argument("--source", required=True)
+ ap.add_argument("--only", default="")
a = ap.parse_args()
src, out = pathlib.Path(a.src).expanduser(), pathlib.Path(a.out).expanduser()
(out / "img").mkdir(parents=True, exist_ok=True)
@@ -28,7 +30,10 @@ def main() -> None:
cat = json.loads(path.read_text())
by_id = {p["id"]: p for p in cat}
n = 0
+ only = {s for s in a.only.split(",") if s}
for row in json.loads((src / "index.json").read_text()):
+ if only and row["shisei_id"] not in only:
+ continue
p = by_id[row["shisei_id"]]
views = {}
for v in VIEWS: