3ba86b2ea8
Bulk import of the working lanes that were living untracked on the PC. Content: - characters/ Lena/male body lanes, bakes, texture work, run logs - clothing/ garment pipeline, configs, gates, contract docs - garments/ MD-authored garment sources (.zprj/.zpac) - UAL-Lib/ Universal Animation Library 2 source (.blend/.fbx/.glb) - tools/ blender_bridge, iclone_bridge, md_bridge, tailor, glm_agent - docs/, plans/, dev/, .agents/plans/ Repo hygiene: - .gitattributes: LFS now covers .blend, .zprj, .zpac, .obj, .npy and the Reallusion .iAvatar/.ccAvatar/.ccRestore containers. Without this the ~3.8 GB in this commit would land as raw blobs. .png/.jpg are left out on purpose — ~250 are already tracked raw and converting them would rewrite every one without shrinking history. - .gitignore: exclude /accurig/ (~1 GB AccuRig program files, redistributable from Reallusion, nothing authored here) and /dev/null/ (git-lfs hook copies dropped by a `>/dev/null` redirect on Windows). Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
38 lines
1.5 KiB
Python
38 lines
1.5 KiB
Python
# Probe: (1) duplicate coincident verts along the stomach/waist lines, (2) where the heal
|
|
# strip actually was vs where the lines are.
|
|
# blender --background --python dbg_lines.py -- <blend> <masks.npz>
|
|
import bpy, sys
|
|
import numpy as np
|
|
|
|
argv = sys.argv[sys.argv.index("--") + 1:]
|
|
BLEND, MASKS = argv[0], argv[1]
|
|
bpy.ops.wm.open_mainfile(filepath=BLEND)
|
|
ob = max([o for o in bpy.data.objects if o.type == 'MESH'],
|
|
key=lambda o: len(o.data.vertices))
|
|
me = ob.data
|
|
n_v = len(me.vertices)
|
|
co = np.empty(n_v * 3)
|
|
me.vertices.foreach_get("co", co)
|
|
co = co.reshape(-1, 3)
|
|
print(f"verts: {n_v}")
|
|
|
|
# coincident duplicates: exact-position hash
|
|
key = np.round(co * 1e5).astype(np.int64)
|
|
kview = key[:, 0] * 73856093 ^ key[:, 1] * 19349663 ^ key[:, 2] * 83492791
|
|
uniq, counts = np.unique(kview, return_counts=True)
|
|
dup_groups = (counts > 1).sum()
|
|
print(f"coincident position groups: {dup_groups} (verts in dups: {counts[counts>1].sum()})")
|
|
|
|
# where are the dups? histogram by z in the torso front
|
|
from collections import Counter
|
|
dupset = set(uniq[counts > 1].tolist())
|
|
isdup = np.array([k in dupset for k in kview])
|
|
front = (np.abs(co[:, 0]) < 0.06) & (co[:, 1] < 0)
|
|
print("z-slice | dup verts (front) | hemband verts (front)")
|
|
M = np.load(MASKS)
|
|
hemband = M["hemband"]
|
|
for z0 in np.arange(0.44, 0.68, 0.02):
|
|
zi = (co[:, 2] >= z0) & (co[:, 2] < z0 + 0.02) & front
|
|
print(f" {z0:.2f}-{z0+0.02:.2f}: dup {int((zi & isdup).sum()):6d} hem {int((zi & hemband).sum()):6d}")
|
|
print("PROBE_DONE")
|