# maxliu22/motion2mixamorig architecture

> Architecture diagram of the GitHub repository maxliu22/motion2mixamorig, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-12). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/maxliu22/motion2mixamorig
- Repository: https://github.com/maxliu22/motion2mixamorig

## Overview

Motion2MixamoRig converts a single-person video or still photo into a Mixamo-rigged character, animation data, and previews. The main workflow is CLI validation and run orchestration, human-motion extraction (or skeleton reuse), rig retargeting, character export, and preview generation. A Blender extension launches the same CLI in an external Python environment, monitors jobs, and imports results. The README documents these capabilities; some implementation links below rely on the SOURCE INDEX because their source was not excerpted.

Main entry points: [`motion2mixamorig/pipeline.py`](https://github.com/maxliu22/motion2mixamorig/blob/main/motion2mixamorig/pipeline.py) (Run pipeline), [`motion2mixamorig/mixamo/animation.py`](https://github.com/maxliu22/motion2mixamorig/blob/main/motion2mixamorig/mixamo/animation.py) (Animation assembly), [`motion2mixamorig/cli.py`](https://github.com/maxliu22/motion2mixamorig/blob/main/motion2mixamorig/cli.py) (CLI commands), [`blender_extension/motion2mixamorig_blender/panels/main_panel.py`](https://github.com/maxliu22/motion2mixamorig/blob/main/blender_extension/motion2mixamorig_blender/panels/main_panel.py) (Add-on panel)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_cli["CLI and workflow"]
  node_cli_entry["CLI commands<br/>[cli.py]"]
  node_preflight["Asset checks<br/>[checks.py]"]
  node_paths["Asset paths<br/>[paths.py]"]
  node_pipeline["Run pipeline<br/>[pipeline.py]"]
  node_report["Run report<br/>[run_report.py]"]
  node_progress["Progress events<br/>[progress.py]"]
end

subgraph group_motion["Human motion"]
  node_extract["Motion extraction<br/>[extract.py]"]
  node_stabilize["Keypoint stabilization<br/>[stabilize_kp2d.py]"]
  node_human["Human skeleton<br/>[human_motion.py]"]
end

subgraph group_mixamo["Mixamo output"]
  node_rig_parse["FBX skeleton parser<br/>[fbx_skeleton.py]"]
  node_kinematics["Rig kinematics<br/>[kinematics.py]"]
  node_calibration["T-pose calibration"]
  node_retarget["Motion retargeting<br/>[retarget.py]"]
  node_ybot["Y Bot retargeting<br/>[ybot_retarget.py]"]
  node_animation["Animation assembly<br/>[animation.py]"]
  node_skin["Skinned character<br/>[skinned_mesh.py]"]
  node_gltf["GLB export<br/>[gltf.py]"]
  node_render["Preview rendering<br/>[render.py]"]
  node_videos["Preview outputs<br/>[videos.py]"]
end

subgraph group_blender["Blender extension"]
  node_blender_ui["Add-on panel<br/>[main_panel.py]"]
  node_preferences["Add-on preferences<br/>[preferences.py]"]
  node_run_operator["Run operator<br/>[run_pipeline.py]"]
  node_backend["Process backend<br/>[backend.py]"]
  node_runtime["Job monitor<br/>[runtime.py]"]
  node_job_monitor["Job status<br/>[job_monitor.py]"]
  node_result_reader["Result reader<br/>[result_reader.py]"]
  node_import_result["Import character<br/>[import_result.py]"]
end

node_user(("User"))
node_blender_user(("Blender user"))
node_output_dir["Run artifacts"]
node_inference[("Inference weights")]

node_user -->|"runs"| node_cli_entry
node_cli_entry -->|"checks assets"| node_preflight
node_cli_entry -->|"starts run"| node_pipeline
node_preflight -->|"checks locations"| node_paths
node_pipeline -->|"creates run folder"| node_paths
node_pipeline -->|"extracts motion"| node_extract
node_extract -->|"uses"| node_stabilize
node_pipeline -->|"loads motion"| node_human
node_pipeline -->|"builds animation"| node_animation
node_animation -->|"retargets motion"| node_retarget
node_animation -->|"uses"| node_ybot
node_animation -->|"computes transforms"| node_kinematics
node_kinematics -->|"builds rig"| node_rig_parse
node_pipeline -->|"calibrates pose"| node_calibration
node_ybot -->|"uses"| node_calibration
node_pipeline -->|"builds character"| node_skin
node_pipeline -->|"exports GLB"| node_gltf
node_pipeline -->|"generates previews"| node_videos
node_videos -->|"renders views"| node_render
node_pipeline -->|"writes run metadata"| node_report
node_pipeline -->|"emits progress"| node_progress
node_pipeline -->|"writes artifacts"| node_output_dir
node_pipeline -->|"uses weights"| node_inference
node_blender_user -->|"uses"| node_blender_ui
node_blender_ui -->|"dispatches"| node_run_operator
node_blender_ui -->|"reads settings"| node_preferences
node_run_operator -->|"launches process"| node_backend
node_backend -->|"invokes CLI"| node_cli_entry
node_run_operator -->|"starts monitoring"| node_runtime
node_runtime -->|"reads job state"| node_job_monitor
node_runtime -->|"reads results"| node_result_reader
node_import_result -->|"loads result"| node_result_reader
node_import_result -->|"imports artifact"| node_output_dir

click node_cli_entry "https://github.com/maxliu22/motion2mixamorig/blob/main/motion2mixamorig/cli.py"
click node_preflight "https://github.com/maxliu22/motion2mixamorig/blob/main/motion2mixamorig/checks.py"
click node_paths "https://github.com/maxliu22/motion2mixamorig/blob/main/motion2mixamorig/paths.py"
click node_pipeline "https://github.com/maxliu22/motion2mixamorig/blob/main/motion2mixamorig/pipeline.py"
click node_report "https://github.com/maxliu22/motion2mixamorig/blob/main/motion2mixamorig/run_report.py"
click node_progress "https://github.com/maxliu22/motion2mixamorig/blob/main/motion2mixamorig/progress.py"
click node_extract "https://github.com/maxliu22/motion2mixamorig/blob/main/motion2mixamorig/extract.py"
click node_stabilize "https://github.com/maxliu22/motion2mixamorig/blob/main/motion2mixamorig/stabilize_kp2d.py"
click node_human "https://github.com/maxliu22/motion2mixamorig/blob/main/motion2mixamorig/human_motion.py"
click node_rig_parse "https://github.com/maxliu22/motion2mixamorig/blob/main/motion2mixamorig/mixamo/fbx_skeleton.py"
click node_kinematics "https://github.com/maxliu22/motion2mixamorig/blob/main/motion2mixamorig/mixamo/kinematics.py"
click node_calibration "https://github.com/maxliu22/motion2mixamorig/blob/main/motion2mixamorig/mixamo/tpose_calibration.py"
click node_retarget "https://github.com/maxliu22/motion2mixamorig/blob/main/motion2mixamorig/mixamo/retarget.py"
click node_ybot "https://github.com/maxliu22/motion2mixamorig/blob/main/motion2mixamorig/mixamo/ybot_retarget.py"
click node_animation "https://github.com/maxliu22/motion2mixamorig/blob/main/motion2mixamorig/mixamo/animation.py"
click node_skin "https://github.com/maxliu22/motion2mixamorig/blob/main/motion2mixamorig/mixamo/skinned_mesh.py"
click node_gltf "https://github.com/maxliu22/motion2mixamorig/blob/main/motion2mixamorig/mixamo/gltf.py"
click node_render "https://github.com/maxliu22/motion2mixamorig/blob/main/motion2mixamorig/mixamo/render.py"
click node_videos "https://github.com/maxliu22/motion2mixamorig/blob/main/motion2mixamorig/videos.py"
click node_blender_ui "https://github.com/maxliu22/motion2mixamorig/blob/main/blender_extension/motion2mixamorig_blender/panels/main_panel.py"
click node_preferences "https://github.com/maxliu22/motion2mixamorig/blob/main/blender_extension/motion2mixamorig_blender/preferences.py"
click node_run_operator "https://github.com/maxliu22/motion2mixamorig/blob/main/blender_extension/motion2mixamorig_blender/operators/run_pipeline.py"
click node_backend "https://github.com/maxliu22/motion2mixamorig/blob/main/blender_extension/motion2mixamorig_blender/services/backend.py"
click node_runtime "https://github.com/maxliu22/motion2mixamorig/blob/main/blender_extension/motion2mixamorig_blender/operators/runtime.py"
click node_job_monitor "https://github.com/maxliu22/motion2mixamorig/blob/main/blender_extension/motion2mixamorig_blender/services/job_monitor.py"
click node_result_reader "https://github.com/maxliu22/motion2mixamorig/blob/main/blender_extension/motion2mixamorig_blender/services/result_reader.py"
click node_import_result "https://github.com/maxliu22/motion2mixamorig/blob/main/blender_extension/motion2mixamorig_blender/operators/import_result.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_cli_entry,node_preflight,node_paths,node_pipeline,node_report,node_progress,node_user,node_blender_user toneBlue
class node_extract,node_stabilize,node_human,node_inference toneAmber
class node_rig_parse,node_kinematics,node_calibration,node_retarget,node_ybot,node_animation,node_skin,node_gltf,node_render,node_videos toneMint
class node_blender_ui,node_preferences,node_run_operator,node_backend,node_runtime,node_job_monitor,node_result_reader,node_import_result toneRose
class node_output_dir toneIndigo
```

## Components

### CLI and workflow

- [CLI commands](https://github.com/maxliu22/motion2mixamorig/blob/main/motion2mixamorig/cli.py): `motion2mixamorig/cli.py`
- [Asset checks](https://github.com/maxliu22/motion2mixamorig/blob/main/motion2mixamorig/checks.py): `motion2mixamorig/checks.py`
- [Asset paths](https://github.com/maxliu22/motion2mixamorig/blob/main/motion2mixamorig/paths.py): `motion2mixamorig/paths.py`
- [Run pipeline](https://github.com/maxliu22/motion2mixamorig/blob/main/motion2mixamorig/pipeline.py): `motion2mixamorig/pipeline.py`
- [Run report](https://github.com/maxliu22/motion2mixamorig/blob/main/motion2mixamorig/run_report.py): `motion2mixamorig/run_report.py`
- [Progress events](https://github.com/maxliu22/motion2mixamorig/blob/main/motion2mixamorig/progress.py): `motion2mixamorig/progress.py`

### Human motion

- [Motion extraction](https://github.com/maxliu22/motion2mixamorig/blob/main/motion2mixamorig/extract.py): `motion2mixamorig/extract.py`
- [Keypoint stabilization](https://github.com/maxliu22/motion2mixamorig/blob/main/motion2mixamorig/stabilize_kp2d.py): `motion2mixamorig/stabilize_kp2d.py`
- [Human skeleton](https://github.com/maxliu22/motion2mixamorig/blob/main/motion2mixamorig/human_motion.py): `motion2mixamorig/human_motion.py`

### Mixamo output

- [FBX skeleton parser](https://github.com/maxliu22/motion2mixamorig/blob/main/motion2mixamorig/mixamo/fbx_skeleton.py): `motion2mixamorig/mixamo/fbx_skeleton.py`
- [Rig kinematics](https://github.com/maxliu22/motion2mixamorig/blob/main/motion2mixamorig/mixamo/kinematics.py): `motion2mixamorig/mixamo/kinematics.py`
- [T-pose calibration](https://github.com/maxliu22/motion2mixamorig/blob/main/motion2mixamorig/mixamo/tpose_calibration.py): `motion2mixamorig/mixamo/tpose_calibration.py`
- [Motion retargeting](https://github.com/maxliu22/motion2mixamorig/blob/main/motion2mixamorig/mixamo/retarget.py): `motion2mixamorig/mixamo/retarget.py`
- [Y Bot retargeting](https://github.com/maxliu22/motion2mixamorig/blob/main/motion2mixamorig/mixamo/ybot_retarget.py): `motion2mixamorig/mixamo/ybot_retarget.py`
- [Animation assembly](https://github.com/maxliu22/motion2mixamorig/blob/main/motion2mixamorig/mixamo/animation.py): `motion2mixamorig/mixamo/animation.py`
- [Skinned character](https://github.com/maxliu22/motion2mixamorig/blob/main/motion2mixamorig/mixamo/skinned_mesh.py): `motion2mixamorig/mixamo/skinned_mesh.py`
- [GLB export](https://github.com/maxliu22/motion2mixamorig/blob/main/motion2mixamorig/mixamo/gltf.py): `motion2mixamorig/mixamo/gltf.py`
- [Preview rendering](https://github.com/maxliu22/motion2mixamorig/blob/main/motion2mixamorig/mixamo/render.py): `motion2mixamorig/mixamo/render.py`
- [Preview outputs](https://github.com/maxliu22/motion2mixamorig/blob/main/motion2mixamorig/videos.py): `motion2mixamorig/videos.py`

### Blender extension

- [Add-on panel](https://github.com/maxliu22/motion2mixamorig/blob/main/blender_extension/motion2mixamorig_blender/panels/main_panel.py): `blender_extension/motion2mixamorig_blender/panels/main_panel.py`
- [Add-on preferences](https://github.com/maxliu22/motion2mixamorig/blob/main/blender_extension/motion2mixamorig_blender/preferences.py): `blender_extension/motion2mixamorig_blender/preferences.py`
- [Run operator](https://github.com/maxliu22/motion2mixamorig/blob/main/blender_extension/motion2mixamorig_blender/operators/run_pipeline.py): `blender_extension/motion2mixamorig_blender/operators/run_pipeline.py`
- [Process backend](https://github.com/maxliu22/motion2mixamorig/blob/main/blender_extension/motion2mixamorig_blender/services/backend.py): `blender_extension/motion2mixamorig_blender/services/backend.py`
- [Job monitor](https://github.com/maxliu22/motion2mixamorig/blob/main/blender_extension/motion2mixamorig_blender/operators/runtime.py): `blender_extension/motion2mixamorig_blender/operators/runtime.py`
- [Job status](https://github.com/maxliu22/motion2mixamorig/blob/main/blender_extension/motion2mixamorig_blender/services/job_monitor.py): `blender_extension/motion2mixamorig_blender/services/job_monitor.py`
- [Result reader](https://github.com/maxliu22/motion2mixamorig/blob/main/blender_extension/motion2mixamorig_blender/services/result_reader.py): `blender_extension/motion2mixamorig_blender/services/result_reader.py`
- [Import character](https://github.com/maxliu22/motion2mixamorig/blob/main/blender_extension/motion2mixamorig_blender/operators/import_result.py): `blender_extension/motion2mixamorig_blender/operators/import_result.py`

### Other components

- **User**
- **Blender user**
- **Run artifacts**
- **Inference weights**

## Connections

- User → CLI commands: runs (evidence: `README.md`)
- CLI commands → Asset checks: checks assets (evidence: `motion2mixamorig/cli.py`)
- CLI commands → Run pipeline: starts run (evidence: `motion2mixamorig/cli.py`)
- Asset checks → Asset paths: checks locations (evidence: `motion2mixamorig/checks.py`)
- Run pipeline → Asset paths: creates run folder (evidence: `motion2mixamorig/pipeline.py`)
- Run pipeline → Motion extraction: extracts motion (evidence: `motion2mixamorig/pipeline.py`)
- Motion extraction → Keypoint stabilization: uses (evidence: `motion2mixamorig/extract.py`)
- Run pipeline → Human skeleton: loads motion (evidence: `motion2mixamorig/pipeline.py`)
- Run pipeline → Animation assembly: builds animation (evidence: `motion2mixamorig/pipeline.py`)
- Animation assembly → Motion retargeting: retargets motion (evidence: `motion2mixamorig/mixamo/animation.py`)
- Animation assembly → Y Bot retargeting: uses (evidence: `motion2mixamorig/mixamo/animation.py`)
- Animation assembly → Rig kinematics: computes transforms (evidence: `motion2mixamorig/mixamo/animation.py`)
- Rig kinematics → FBX skeleton parser: builds rig (evidence: `motion2mixamorig/mixamo/kinematics.py`)
- Run pipeline → T-pose calibration: calibrates pose (evidence: `motion2mixamorig/pipeline.py`)
- Y Bot retargeting → T-pose calibration: uses (evidence: `motion2mixamorig/mixamo/ybot_retarget.py`)
- Run pipeline → Skinned character: builds character (evidence: `motion2mixamorig/pipeline.py`)
- Run pipeline → GLB export: exports GLB (evidence: `motion2mixamorig/pipeline.py`)
- Run pipeline → Preview outputs: generates previews (evidence: `motion2mixamorig/pipeline.py`)
- Preview outputs → Preview rendering: renders views (evidence: `motion2mixamorig/videos.py`)
- Run pipeline → Run report: writes run metadata (evidence: `motion2mixamorig/pipeline.py`)
- Run pipeline → Progress events: emits progress (evidence: `motion2mixamorig/pipeline.py`)
- Run pipeline → Run artifacts: writes artifacts (evidence: `README.md`)
- Run pipeline → Inference weights: uses weights (evidence: `README.md`)
- Blender user → Add-on panel: uses (evidence: `blender_extension/motion2mixamorig_blender/panels/main_panel.py`)
- Add-on panel → Run operator: dispatches (evidence: `blender_extension/motion2mixamorig_blender/panels/main_panel.py`)
- Add-on panel → Add-on preferences: reads settings (evidence: `blender_extension/motion2mixamorig_blender/panels/main_panel.py`)
- Run operator → Process backend: launches process (evidence: `blender_extension/motion2mixamorig_blender/operators/run_pipeline.py`)
- Process backend → CLI commands: invokes CLI (evidence: `blender_extension/motion2mixamorig_blender/services/backend.py`)
- Run operator → Job monitor: starts monitoring (evidence: `blender_extension/motion2mixamorig_blender/operators/run_pipeline.py`)
- Job monitor → Job status: reads job state (evidence: `blender_extension/motion2mixamorig_blender/operators/runtime.py`)
- Job monitor → Result reader: reads results (evidence: `blender_extension/motion2mixamorig_blender/operators/runtime.py`)
- Import character → Result reader: loads result (evidence: `blender_extension/motion2mixamorig_blender/operators/import_result.py`)
- Import character → Run artifacts: imports artifact (evidence: `README.md`)
