Datasets:
Download scripts/build_frames.py from Linzhan/Mixamo-Animations-Characters: direct link, hf CLI and curl.
- Browser
- Download file 562 Bytes
-
https://huggingface.co/datasets/Linzhan/Mixamo-Animations-Characters/resolve/main/scripts/build_frames.py
- Command line
-
hf download hf://datasets/Linzhan/Mixamo-Animations-Characters/scripts/build_frames.py
-
curl -L -o build_frames.py https://huggingface.co/datasets/Linzhan/Mixamo-Animations-Characters/resolve/main/scripts/build_frames.py
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)) | |