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>
33 lines
1.0 KiB
Python
33 lines
1.0 KiB
Python
# Stage 8: export the finished hires nude sculpt as a packed GLB.
|
|
# blender --background --python 08_export.py -- <07_polished.blend> <out.glb>
|
|
import bpy, sys, time
|
|
import numpy as np
|
|
|
|
argv = sys.argv[sys.argv.index("--") + 1:]
|
|
BLEND, OUT = argv[0], argv[1]
|
|
t0 = time.time()
|
|
|
|
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
|
|
co = np.empty(len(me.vertices) * 3)
|
|
me.vertices.foreach_get("co", co)
|
|
co = co.reshape(-1, 3)
|
|
print(f"[export] {ob.name}: {len(me.vertices)}v {len(me.polygons)}f "
|
|
f"height {co[:,2].max()-co[:,2].min():.4f} units, "
|
|
f"images {[i.name for i in bpy.data.images if i.has_data]}")
|
|
|
|
bpy.ops.export_scene.gltf(
|
|
filepath=OUT,
|
|
export_format='GLB',
|
|
export_image_format='AUTO',
|
|
export_yup=True,
|
|
export_apply=False,
|
|
export_animations=False,
|
|
export_skins=True,
|
|
export_morph=False,
|
|
)
|
|
print(f"[export] WROTE {OUT} ({time.time()-t0:.1f}s)")
|
|
print("EXPORT_DONE")
|