“Wait – why is this 3D armature not mirroring properly in Blender?”
This article is also available on Medium.
If you’re like me and you don’t know how to animate a character, chances are you’ve already heard of Adobe’s Mixamo platform, an online collection of free animations:
And then, you might have tried to import one of their FBX animations in your favourite 3D soft, in my case Blender, and found out that the armature’s bone names were… let’s say: not ideal.
For example, in Blender, some armature tools rely on the bones following a specific naming convention but, with a Mixamo rig, bones do not follow this convention. So you simply lose lots of Blender’s armature features.
That’s a shame – but thankfully we can fix this quite easily with a bit of Python scripting! 🙂
“Mixamo Rig Renamer”: a basic Python plugin to fix Mixamo bone names for Blender
I eventually transformed my Python script into a Blender plugin, so if you’re interested and you want to get it for yourself, it’s available for free on my Github 🙂
Note: for now, there isn’t a lot in this repo, but I hope I’ll be able to fill it with other utilities as I stumble across more ideas! Don’t hesitate to send me an email or react to this post if you have ideas of your own you think I could implement 😉
Here is a little demo of the plugin:
To use this plugin, download the Python file somewhere on your computer, then open your Preferences panel, go to the Add-ons section and click on “Install”:
Then, pick the Python file and enable the package:
You’ll then have a new panel in your UI, in the Properties panel (“Misc” tab) to rename all Mixamo rigs in your scene directly:
As you can see, the plugin is easy enough to use: you can (optionally) change the Mixamo prefix that is used at the beginning of all bone names (but it should be
mixamorig for the current Mixamo FBX animations) and click “Rename”.
The lib will automatically:
- rename the bones to follow the
- rename the corresponding animation curve data
- re-assign this animation data to the armature(s) in your scene
Why did I develop this little Blender plugin?
This morning, as I was working on a little game prototype, I thought I’d add a few walk and jump animations to my character just to make it more pleasing to the eye. Since, as I mentioned in another CG article, I’m really not an animation expert… I decided to once again use free animations from Mixamo.
Ok – so I downloaded a “walking” FBX animation and imported it in my scene, all went fine. Then, because my character didn’t fit the skeleton, I thought I’d move the bones a little to have them match.
To do that, I wanted to use a really nice feature from Blender: the “X-Axis mirror” edition. This little toggle allows you to move the bones on one side of the armature and have the matching bones on the other side be moved automatically to get a symmetrical armature:
But the issue is that it works by parsing the bone name and matching it against a specific pattern: Blender’s armature naming convention is to add the
.R suffix – then, the rest of the name is identical on both sides.
And, when you first load a Mixamo rig, you’ll get bone names that don’t follow this convention and therefore don’t work with the X-Axis mirroring tool:
So I decided I would code up a little script using Blender’s Python API to fix this and rename the bones properly 😉
Writing the plugin
The plugin in itself isn’t too complicated. The idea is to go through the name of all of our bones and animation keys and, if any contain Mixamo’s prefix, replace it with a Blender standard equivalent.
For example, the bone
mixamorig:LeftArm will be renamed
Arm.L. Then, the script will also update the animations that used this bone, so all animation curves that had keys on the
mixamorig:LeftArm bone will now have the exact same keys but for the
Something to be careful about though is that, when you modify animation curve data, it should not be linked to any armature; so I decided to store the used animations first, then clear them out temporarily and re-assign them once the data has been updated.
Writing up this little plugin was a nice opportunity to play around with Blender’s Python API once again and to discover more about how to tweak and update rigging/animation data.
Don’t hesitate to check out the plugin on Github if you want to use Mixamo files in Blender and get standardised names 🚀
Also, feel free to tell me if you have ideas of other plugins or features I could make! 🙂