xsheet
JSON exposure sheets and Toei XDTS interchange for timing animation from few drawings.
Exposure-sheet compiler and Toei XDTS (.xdts) converter that turns compact JSON timing specs—holds, ones/twos/threes, cycles, swings, spacing charts, and pegbar moves—into concrete frame lists.
git clone https://github.com/BestRoiMedia/anim-toolkit.gitWhy we built it
Traditional animators get expressive timing out of a handful of drawings using exposure sheets, holds, ping-pong cycles, and spacing charts. We built xsheet.py and xdts.py so AI agents and downstream tools (onion, keylib, bonion, anim-studio) can author, validate, and interchange studio-grade timing without duplicating drawing files.
Architecture & how it works
xsheet.py validates and expands a declarative JSON timeline composed of hold, seq, cycle (loop or swing), seeded random, tween, chart (halves_out, halves_in, halves_both, thirds, or custom t-lists), and reusable section segments with modifiers like repeat, reverse, mirror, stretch, pose_test, and OpenToonz-compatible pegbar eases. xdts.py provides bidirectional conversion between xsheet JSON and Toei's public version-5 Exchange Digital Time Sheet (.xdts) format used by OpenToonz, TVPaint, and CACANi.
Key capabilities
- Declarative timing segments: holds, ones/twos/threes, ping-pong swings, seeded boil, and reusable sections
- Spacing-chart validation (CHART_MISMATCH) and animatic pose_test mode
- OpenToonz-compatible interpolation curves: linear, ease_in, ease_out, ease_in_out, speed_in_out, exponential, constant
- Per-segment pegbar transforms (x, y, rotation, scale) and x-mirroring
- Bidirectional Toei XDTS (.xdts) import/export with cell, tick-mark, and keyframe metadata
- Zero external dependencies with built-in JSON Schema export and self-tests
Usage example
python3 anim/xsheet.py validate ./walk.xsheet.json --drawings ./frames
python3 anim/xsheet.py expand ./walk.xsheet.json --drawings ./frames --out ./frames_expanded.json
python3 anim/xdts.py from-xsheet ./walk.xsheet.json --out ./walk.xdts
python3 anim/xdts.py to-xsheet ./walk.xdts --fps 24 --out ./imported.xsheet.json