A ComfyUI extension that integrates Mesh2Motion for 3D character rigging and animation directly within ComfyUI.
- Full Mesh2Motion Editor: Access the complete Mesh2Motion rigging tool with all its features
- 3D Model Loading: Load models from ComfyUI 3D nodes (Load3D, Preview3D, SaveGLB)
- Character Rigging: Automatic skeleton fitting and weight painting for humanoid, quadruped, bird, and dragon models
- Animation Library: Apply pre-built animations to your rigged characters
- Export to GLB: Save rigged and animated models back to ComfyUI workflow
- Context Menu Integration: Right-click on any 3D model node to open in Mesh2Motion
- Top Menu Button: Quick access via the Mesh2Motion button in the top menu
-
Clone this repository with submodules into your
ComfyUI/custom_nodesdirectory:cd ComfyUI/custom_nodes git clone this repo -
Restart ComfyUI
Method 1: Top Menu Button
- Click the "Mesh2Motion" button in the top menu to open a new editor
Method 2: Context Menu
- Right-click on any 3D model node (Load3D, Preview3D, SaveGLB)
- Select "Open in Mesh2Motion"
- The model will be loaded into the editor
- Load Model: Import your 3D model (GLB, GLTF, FBX)
- Select Skeleton: Choose the appropriate skeleton type (Human, Quadruped, Bird, Dragon)
- Position Skeleton: Adjust the skeleton to fit your model
- Edit Skeleton: Fine-tune bone positions for accurate rigging
- Apply Animations: Select and preview animations from the library
- Export: Save the rigged model back to ComfyUI
- Human: Bipedal characters with standard humanoid skeleton
- Quadruped: Four-legged animals (fox, dog, cat, etc.)
- Bird: Flying creatures with wing bones
- Dragon: Fantasy creatures with wings and tail
- Node.js 18+
- npm or pnpm
# Build the ComfyUI plugin
npm install
npm run build
# Build mesh2motion-app
cd mesh2motion-app
npm install
npm run build:comfyui# Watch mode for ComfyUI plugin
npm run dev
# In another terminal, for mesh2motion-app
cd mesh2motion-app
npm run dev:comfyuiThis project uses git submodules to manage the mesh2motion-app dependency:
ComfyUI-mesh2motion/ # Main repository (https://github.com/jtydhr88/ComfyUI-mesh2motion)
├── src/ # ComfyUI plugin source code
├── js/ # Built JavaScript files
├── locales/ # i18n translations
├── mesh2motion-app/ # Submodule (https://github.com/jtydhr88/mesh2motion-app)
│ └── (comfyui-support branch)
└── ...
The mesh2motion-app directory is a git submodule pointing to a fork of the original mesh2motion-app.
- Repository: https://github.com/jtydhr88/mesh2motion-app
- Branch:
comfyui-support(contains ComfyUI integration changes) - Upstream: https://github.com/scottpetrovic/mesh2motion-app
The main branch of the fork stays in sync with the upstream repository. The comfyui-support branch contains additional code for ComfyUI integration:
- Base path resolution for iframe embedding
- PostMessage communication with ComfyUI parent window
- ComfyUI-specific HTML entry points and Vite build configuration
# Clone with submodules
git clone --recurse-submodules https://github.com/jtydhr88/ComfyUI-mesh2motion.git
# If already cloned without submodules
git submodule update --init --recursive
# Update submodule to latest commit on comfyui-support branch
cd mesh2motion-app
git pull origin comfyui-support
cd ..
git add mesh2motion-app
git commit -m "Update mesh2motion-app submodule"- Mesh2Motion - 3D rigging tool
- Vue 3 - UI framework
- PrimeVue - UI components
- Three.js - 3D rendering
MIT
- Mesh2Motion by Scott Petrovic - The amazing 3D rigging tool
- ComfyUI - The workflow platform
- ComfyUI-PolotnoCanvasEditor - Plugin structure reference