Linzhan's picture
Add tabular index (metadata.csv, characters.csv) + card metadata
7b1add0 verified
|
Raw
History Blame Contribute Delete
3.17 kB

Scripts

Everything used to build and verify this dataset: download, index generation, bone-namespace normalisation, and validation.

Pure Python 3 + requests; no Blender or Autodesk tooling required.

Download

Needs a Mixamo access_token saved in a file, passed with --token-file.

script purpose
mixamo_download.py All animations as skin-free FBX on the Y Bot rig, 30 fps. Sweeps the catalogue several times because Mixamo's pagination is not stable, writes a manifest as it goes, and re-reads the token file so a long run survives a token refresh.
mixamo_characters.py All 114 characters as T-pose FBX with skin mesh.
mixamo_console_download.js Alternative route: paste into a normal Chrome console and let the browser save the files.
python3 mixamo_download.py --pages all --skin false --token-file tok.txt --out animation
python3 mixamo_characters.py --token-file tok.txt --out character

Index generation

No token needed.

script output
build_prompts.py ../animation_prompts.json
build_frames.py ../animation_frames.json
build_characters.py ../characters.json
check_retarget.py ../animation_bones.json, ../character_bones.json
build_tables.py ../metadata.csv, ../characters.csv (the browsable/loadable index)

Two small libraries back these, and are useful on their own:

  • fbx_frames.py — binary-FBX parser; counts keyframes. Also a CLI.
  • fbx_bones.py — extracts real bone names from the FBX node tree. Use this rather than a byte-level regex: mixamorig:Hips followed by binary data can look like a nonexistent mixamorig:Hipsf bone.

Bone-namespace fix

script purpose
fbx_rename_bones.py Surgical binary-FBX rewriter: renames mixamorig<N>:mixamorig: and recomputes node offsets. --selftest <files> asserts that a no-edit round-trip reproduces its input byte-for-byte — the correctness gate for the whole fix.
refine_characters.py Builds ../character_refined/: rewrites the 27 affected characters, hardlinks the other 87.
verify_refined.py Walks the original and refined node trees in parallel and asserts every non-string property is byte-identical, so only bone names changed.

Verification

script scope
validate.py Structural integrity plus index completeness and correctness. Pass a token file to add a sampled API cross-check.
full_check.py Same, but cross-checks every motion name/id and character name against the Mixamo API.
final_audit.py Widest sweep: all three FBX directories, content-duplicate detection by hash, index consistency, frame re-derivation, and animation-to-character bone compatibility.
python3 validate.py            # offline
python3 final_audit.py         # full audit

manifests/

Records written at download time (filemotion_id / name / type / description). These are the source of truth: the JSON indexes are regenerated from them plus the FBX files, so the indexes can always be rebuilt or reformatted without re-downloading anything.