Files
settled-reach/spikes/synty-intake/scripts/recon_body_aabb.py
T
jpmschweitzerandClaude Fable 5 4bcd778e16 chore(assets): Synty intake spike — scripts, evidence logs, verdict data (T-1089)
Bridge-C evidence spike: unitypackage extraction, rest-pose recon, garment
transplant onto the Quaternius rig (Data Transfer POLYINTERP_NEAREST), 11-body
batch fit, Godot QA scenes. Technical PASS; route nonetheless REJECTED by
product call (cost, baked body-segment modularity, style) — full trail on
T-1089. Salvage: source-agnostic transplant/batch-fit scripts (the G1-family
pipeline for any donor mesh) and the T-1090 discovery (5 body types misrender
bare). Extracted vendor payload (spikes/**/raw/) now gitignored.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-06 14:01:24 +02:00

38 lines
1.5 KiB
Python

"""Quick recon: joined garment-adjacent body mesh AABB per body type."""
import bpy
import os
REPO = "/var/mnt/data/projects/settled-reach"
BODIES_DIR = os.path.join(REPO, "client/assets/characters/bodies")
BODY_TYPES = ["average_m", "average_f", "muscular_m", "muscular_f",
"thin_m", "thin_f", "heavy_m", "heavy_f",
"teen_m", "teen_f", "child"]
SEGS = ["seg_torso", "seg_hips", "seg_neck",
"seg_arm_upper_l", "seg_arm_upper_r",
"seg_leg_upper_l", "seg_leg_upper_r"]
for body in BODY_TYPES:
bpy.ops.object.select_all(action='SELECT')
bpy.ops.object.delete(use_global=False)
xs, ys, zs = [], [], []
t_xs, t_ys = [], []
for seg in SEGS:
path = os.path.join(BODIES_DIR, body, seg + ".glb")
if not os.path.exists(path):
continue
before = set(bpy.data.objects)
bpy.ops.import_scene.gltf(filepath=path)
for o in set(bpy.data.objects) - before:
if o.type == 'MESH' and len(o.vertex_groups) > 0:
for v in o.data.vertices:
w = o.matrix_world @ v.co
xs.append(w.x)
ys.append(w.y)
zs.append(w.z)
if seg == "seg_torso":
t_xs.append(w.x)
t_ys.append(w.y)
print(f"AABB {body}: full x={max(xs)-min(xs):.3f} "
f"y={max(ys)-min(ys):.3f} z_top={max(zs):.3f} "
f"| torso x={max(t_xs)-min(t_xs):.3f} depth y={max(t_ys)-min(t_ys):.3f}")