Page MenuHome

FBX Export/Import armature child of another armature causes a bug
Closed, DuplicatePublic

Description

System Information
Windows 10 GTX 760

Blender Version
Blender 2.79 Hash: 5bd8ac9

Short description of error
Exporting and Importing through an FBX file a scene with an armature child of another armature causes a bug

Exact steps for others to reproduce the error
Quick version

  1. Open the attached blend file
  2. Export the scene as FBX
  3. Import the FBX in a new scene
  4. The following error appears:
        FBX import: Objects & Armatures...
Traceback (most recent call last):
  File "C:\Program Files\Blender Foundation\Blender\2.79\scripts\addons\io_scene_fbx\__init__.py", line 234, in execute
    return import_fbx.load(self, context, **keywords)
  File "C:\Program Files\Blender Foundation\Blender\2.79\scripts\addons\io_scene_fbx\import_fbx.py", line 2696, in load
    _(); del _
  File "C:\Program Files\Blender Foundation\Blender\2.79\scripts\addons\io_scene_fbx\import_fbx.py", line 2693, in _
    root_helper.link_hierarchy(fbx_tmpl, settings, scene)
  File "C:\Program Files\Blender Foundation\Blender\2.79\scripts\addons\io_scene_fbx\import_fbx.py", line 2190, in link_hierarchy
    child.link_hierarchy(fbx_tmpl, settings, scene)
  File "C:\Program Files\Blender Foundation\Blender\2.79\scripts\addons\io_scene_fbx\import_fbx.py", line 2146, in link_hierarchy
    (mmat, amat) = mesh.armature_setup[self]
KeyError: Armature
location: <unknown location>:-1

Long version

  1. Create a new scene
  2. Create two armatures (single bone for each is enough)
  3. Rig a mesh to each armature (important : without mesh, the bug does not occur)
  4. Make one of the armature child of the other armature
  5. Export to fbx
  6. Import the fbx
  7. The bug occurs

Remark
Importing the fbx file in Unity or 3DS Max doesn't cause any problem but the armatures are merged into one

Please find here the blend file:

Thanks !

Details

Type
Bug

Event Timeline

Sebastian Parborg (zeddb) triaged this task as Confirmed, Medium priority.

In 2.8 I'm getting an assert on export:
BLI_assert failed: blender/source/blender/editors/interface/interface_layout.c:738, ui_item_enum_expand_exec(), at 'but->func == ((void *)0)'

I can reproduce the same error message if I disregard that assert.

Rule of thumb: never do that. the way FBX handles 'armatures' (aka chains of voids used as joints, basically, with some esoteric undocumented ways to distinguish what is actually part of a rig, from other 'empties' just used to create object hierarchies), you are pretty sure to run into issues with current FBX addon in Blender. This is kind of known limitation/unsupported feature (and we already have a report for that kind of issues, will merge).

@Sebastian Parborg (zeddb) that assert happens in UI code, totally unrelated to that issue or FBX addon in general.

@Bastien Montagne (mont29), I know I just mentioned it in case that wasn't supposed to happen when trying to export.