Last updated: October 30, 2016

“The more things change, the more they stay the same.”
–Snake Plissken

Yeah, I know… some dead-French guy said it first, but I remember it from the end of Escape from L.A.
Get over it.

Blenders FBX exported has gotten a lot better… and yet, it still adds the extra root bone.

This tutorial will show you what to change in order to fix this.

Tools used:

Blender 2.78a.
Unreal Engine 4.13.
UE4 Tools Addon

The file we will be going to edit

C:\Program Files\Blender Foundation\Blender\2.78\scripts\addons\io_scene_fbx\export_fbx_bin.py

Before you begin:

  • Create a backup of the file.
  • Get a decent text editor.
    For Windows, I recommend Notepad++.
  • Run your text editor in admin mode.

Instructions:

  1. Find the following:
                elif ob_obj.type == 'EMPTY' or ob_obj.type == 'ARMATURE':
                    empty_key = data_empties[ob_obj]
                    connections.append((b"OO", get_fbx_uuid_from_key(empty_key), ob_obj.fbx_uuid, None))
    

    For me, it was around line 2465.

  2. Comment out these lines:
    #            elif ob_obj.type == 'EMPTY' or ob_obj.type == 'ARMATURE':
    #                empty_key = data_empties[ob_obj]
    #                connections.append((b"OO", get_fbx_uuid_from_key(empty_key), ob_obj.fbx_uuid, None))
    
  3. Save the file.
  4. Restart Blender.
  5. Export as usual.

Example:

I installed the UE4 Tools Addon by Luis Garcia and used the “Append Hero RIG!” button to add a UE4 Mannequin to the scene.

I then extruded two new bones – item_r & item_l – and added them to the EpicExtra bone group.

Result in blender:
ue4fixextraroot_inblender

After this, I selected everything and clicked the “Export Character” button and imported the result into UE4.

Result in editor:
ue4fixextraroot_ineditor

Enjoy!

3 thoughts on “Prevent Blender FBX Exporter adding extra root bone

    1. Sweet fix, except it doesn’t work when it comes to exporting skeleton and animations from Blender. This is what’s happening:

      Any idea how to fix exporter where Armature doesn’t get exported as root of the hierarchy and at the same time scale is maintained when anims are exported too ?

      Thanks beforehand

      1. I’ve had that issue before, but do not remember the exact cause or fix.
        Something to do with not applying the scale correctly.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s