How blackoutbuild/textrig works
TextRig turns a flat image plus agent-authored rig markup into a DragonBones rig, then supports visual inspection and human review. The main workflow is documented in the README; sampled files confirm the MCP wrapper, editor geometry, rendering, morph processing, occlusion filling, and export responsibilities. Some pipeline stages are represented at their documented module paths, but their internal call wiring was not sampled, so uncertain links are omitted.
Main entry points: build_pieces_rig.py Rig builder · server.py MCP tools · editor.ts Markup editor · renderEntry.ts Filmstrip renderer
Components 21
Agent and review
- MCP tools
mcp/server.py - Markup editor
renderer/src/markup/editor.ts - Markup geometry
renderer/src/markup/geometry.ts - Skeleton helpers
renderer/src/markup/skeleton.ts
Rig build pipeline
- Input normalization
pipeline/normalize_input.py - Piece cutting
pipeline/cut_pieces.py - Occlusion filling
pipeline/fill_occlusions.py - Mesh generation
pipeline/mesh_gen.py - Bone weights
pipeline/weights_gen.py - Texture atlas
pipeline/pack_atlas.py - DragonBones export
pipeline/dragonbones_writer.py - Rig builder
pipeline/build_pieces_rig.py
Rig capabilities
- Whole-image deform
pipeline/mesh_gen.py - Morph compiler
pipeline/morph_compiler.py - Path and wave motion
pipeline/flow_gen.py
Output and runtime
- DragonBones rig
- Filmstrip renderer
renderer/src/renderEntry.ts - Live preview
renderer/src/previewEntry.ts - Renderer service
renderer/vite.config.ts
Other components
- Vision agent
- Human rigger
Connections 24
- Vision agent → MCP tools: authors via
- MCP tools → Rig builder: builds rig
- Rig builder → Input normalization: normalizes input
- Rig builder → Piece cutting: cuts pieces
- Rig builder → Occlusion filling: fills occlusions
- Rig builder → Mesh generation: generates meshes
- Rig builder → Bone weights: generates weights
- Rig builder → Texture atlas: packs atlas
- Rig builder → DragonBones export: exports rig
- DragonBones export → DragonBones rig: writes files
- Rig builder → Whole-image deform: builds deform rigs
- Rig builder → Morph compiler: compiles morphs
- Rig builder → Path and wave motion: supports motion tracks
- MCP tools → Filmstrip renderer: requests render
- Filmstrip renderer → DragonBones rig: reads rig
- Filmstrip renderer → MCP tools: returns filmstrip
- MCP tools → Live preview: starts preview
- Renderer service → DragonBones rig: serves files
- Human rigger → Markup editor: edits markup
- Markup editor → Markup geometry: uses geometry
- Markup editor → Skeleton helpers: uses helpers
- MCP tools → Markup editor: opens review
- Markup editor → MCP tools: submits edits
- Live preview → Renderer service: loads rig assets