Linzhan's picture
Add files using upload-large-folder tool
12b5ac7 verified
Raw
History Blame Contribute Delete
562 Bytes
#!/usr/bin/env python3
"""Regenerate ../animation_frames.json by parsing every FBX in ../animation/."""
import json, os, sys
HERE = os.path.dirname(os.path.abspath(__file__))
sys.path.insert(0, HERE)
from fbx_frames import parse
ROOT = os.path.dirname(HERE)
adir = os.path.join(ROOT, "animation")
out = os.path.join(ROOT, "animation_frames.json")
d = {}
for f in sorted(os.listdir(adir)):
if f.endswith(".fbx"):
d[f] = parse(os.path.join(adir, f))["keys_max"]
json.dump(d, open(out, "w"), indent=1, sort_keys=True)
print("wrote", out, "->", len(d))