feat: clothing lane, character sources, and DCC bridges
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>
This commit is contained in:
@@ -0,0 +1,55 @@
|
||||
# Local melt of the crotch underside strip (residue from the donor snap's cage edge).
|
||||
# blender --background --python 06b_strip_melt.py -- <in.blend> <out.blend>
|
||||
import bpy, sys, time
|
||||
import numpy as np
|
||||
|
||||
argv = sys.argv[sys.argv.index("--") + 1:]
|
||||
t0 = time.time()
|
||||
bpy.ops.wm.open_mainfile(filepath=argv[0])
|
||||
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)
|
||||
|
||||
mid = (np.abs(co[:, 0]) < 0.01) & (co[:, 2] > 0.38) & (co[:, 2] < 0.50)
|
||||
sad = co[mid][np.argmin(co[mid, 2])]
|
||||
# ABSOLUTE bounds: the donor snap moved the saddle landmark, so a saddle-relative window
|
||||
# centred 3.5 cm below the visible residue
|
||||
strip = (np.abs(co[:, 0]) < 0.048) & (co[:, 2] > 0.368) & (co[:, 2] < 0.434)
|
||||
sidx = np.nonzero(strip)[0]
|
||||
print(f"[strip] {len(sidx)} verts around saddle {sad}")
|
||||
|
||||
ev = np.empty(len(me.edges) * 2, dtype=np.int32)
|
||||
me.edges.foreach_get("vertices", ev)
|
||||
ev = ev.reshape(-1, 2)
|
||||
o_ = np.concatenate([ev[:, 0], ev[:, 1]])
|
||||
n_ = np.concatenate([ev[:, 1], ev[:, 0]])
|
||||
s_ = np.argsort(o_, kind="stable")
|
||||
o_s = o_[s_]
|
||||
n_s = n_[s_]
|
||||
ptr = np.searchsorted(o_s, np.arange(n_v + 1))
|
||||
cnt = np.maximum(np.diff(ptr), 1)
|
||||
|
||||
Q = co.copy()
|
||||
for _ in range(120):
|
||||
su = np.add.reduceat(Q[n_s], ptr[:-1], axis=0)
|
||||
emp = np.diff(ptr) == 0
|
||||
su[emp] = Q[emp]
|
||||
mean = su / cnt[:, None]
|
||||
for f in (0.55, -0.58):
|
||||
pass
|
||||
Q[sidx] = 0.45 * Q[sidx] + 0.55 * mean[sidx]
|
||||
print(f"[strip] melted, max move {np.linalg.norm(Q-co,axis=1).max():.4f} "
|
||||
f"({time.time()-t0:.1f}s)")
|
||||
me.vertices.foreach_set("co", Q.reshape(-1))
|
||||
me.update()
|
||||
if me.has_custom_normals:
|
||||
vn = np.empty(n_v * 3, dtype=np.float32)
|
||||
me.vertices.foreach_get("normal", vn)
|
||||
me.normals_split_custom_set_from_vertices(vn.reshape(-1, 3))
|
||||
bpy.context.preferences.filepaths.save_version = 0 # no .blend1 autosave
|
||||
bpy.ops.wm.save_as_mainfile(filepath=argv[1])
|
||||
print("STRIP_DONE")
|
||||
Reference in New Issue
Block a user