BlenderTools - FBX Rename to SMPL
Give a rig the bone names every motion tool expects
- mesh_output_file
Renaming bones is the unglamorous half of a rigging pipeline
Generated 3D characters arrive with an armature and no convention. Hunyuan3D, TRELLIS, MakeHuman, some sketchy FBX from an asset store - the hierarchy might be roughly humanoid, but the bones are called whatever the exporter felt like. The moment you want to drive that character with motion data, the naming is the interface: SMPL's twenty-two joint names (Pelvis, Spine1, L_Hip, L_Knee, Neck, Head, …) are what a large slice of the open motion and pose ecosystem speaks, and the same naming shows up on the 2D side in things like DensePose's body-surface mapping. This node does one job: import a rig, walk it, rename the bones to SMPL names, export it back out. You do not open Blender.
How it works
Despite living in ComfyUI, this node is a Blender launcher. It takes a path to an FBX/GLB, a Blender executable path, an output path, and an output format, then shells out to Blender in background mode:
blender -b --python scripts/RenameToSMPL.py
The script gets your paths through environment variables, wipes Blender's default scene, imports the file, and looks for the first armature it finds. From the root bone it recurses down the hierarchy against a hard-coded SMPL joint tree, walking the skeleton structure rather than reading bone names - which is the honest way to do this, and also the reason it can't be trusted blindly. Where a joint has several children (the pelvis, the chest), it sorts them by their tail position on the X axis to decide left from right before assigning the L/R names. At each wrist it does the same trick on the Z axis to guess Thumb/Index/Middle/Ring/Pinky, then labels three phalanges per finger.
The result is written back to the armature, and it exports just the armature plus any meshes parented to it or carrying an armature modifier. FBX export embeds textures and copies file paths; GLB export includes skins and animations with leaf bones disabled. The node returns the output path as a STRING, and it's flagged as an output node, so it's a legit end-of-graph step.
Inputs and outputs
- fbx_file - full path to the source
.fbx/.glb/.gltf. Read straight off disk, not from ComfyUI's input folder. - mesh_output_path - where the renamed rig goes. Type just a filename and it lands in
ComfyUI/output/. Include a directory and it's resolved as a path; missing folders are created for you. Quote stripping is handled here, so surrounding quotes are fine (only here - see below). - output_file_type -
fbxorglb. - blender_exec_path - the Blender binary, e.g.
/usr/bin/blenderorC:\Program Files\Blender Foundation\Blender 4.2\blender.exe.
One output: mesh_output_file, the path string. Wire it into a text/Show node if you want to see it, or use it as a filename source downstream.
Install
cd ComfyUI/custom_nodes
git clone https://github.com/visualbruno/ComfyUI-Tools
Or ComfyUI Manager, searching "ComfyUI-Tools". Blender is not bundled - install it separately and point blender_exec_path at it. The pack's requirements.txt only pulls trimesh and rembg; this node needs neither.
Where people get burned
Quotes break blender_exec_path. It's passed straight into the subprocess argv, with no stripping, so "C:\Program Files\...\blender.exe" with the quote characters included will fail to launch. Paste the path bare. This is inconsistent with mesh_output_path, which does strip them - that inconsistency is the trap.
A failed export still reports success. The node runs Blender without checking the exit code and returns your output path regardless. If Blender isn't found, or the file has no armature (the script just returns silently), or the importer chokes, you get a plausible-looking path to a file that was never written. Check the file exists and read the ComfyUI console for Blender's actual error.
It renames, it does not retarget. Nothing here fits the mesh to a body model, adds missing joints, or touches skin weights. A rig missing fingers gets no fingers. A rig with extra spine bones keeps those bones under their original names, so you can end up with a half-SMPL skeleton - which is worse than it sounds if the consumer expects a strict joint list.
The L/R and finger guesses are geometric. Sorting children by tail position works on a sane humanoid and produces nonsense on a rig where the legs cross, the armature is mirrored oddly, or the rest pose is a T-pose with an unusual roll. Eyeball the result once in Blender before you build a pipeline on it.
Only the armature and its meshes survive. Extra objects in the source file - cameras, props, empties on their own - are dropped by the selection logic. If you needed something else from that FBX, export it separately.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| fbx_file | STRING | — | |
| mesh_output_path | STRING | — | |
| output_file_type | COMBO | fbx | 2 options: fbx, glb |
| blender_exec_path | STRING | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| mesh_output_file | STRING | — |