"""Bake a hand-pose JSON into a body GLB by rewriting finger node rest rotations. IBMs untouched -> mesh deforms to the pose. usage: bake_preview.py body.glb pose.json out.glb""" import json, struct, sys from pathlib import Path body, posef, out = sys.argv[1:4] data = Path(body).read_bytes() length = struct.unpack_from(" 4: # canonical-rest GLB: apply pose as rest-relative delta cdata = Path(sys.argv[4]).read_bytes() clen2 = struct.unpack_from(" {out}")