FBX Export/Import armature child of another armature causes a bug #61011

Closed
opened 2019-01-30 11:38:14 +01:00 by Morgan Fraslin · 6 comments

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

  • Open the attached blend file
  • Export the scene as FBX
  • Import the FBX in a new scene
  • 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

  • Create a new scene
  • Create two armatures (single bone for each is enough)
  • Rig a mesh to each armature (important : without mesh, the bug does not occur)
  • Make one of the armature child of the other armature
  • Export to fbx
  • Import the fbx

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:
Scene.blend

Thanks !

**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** - Open the attached blend file - Export the scene as FBX - Import the FBX in a new scene - 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** - Create a new scene - Create two armatures (single bone for each is enough) - Rig a mesh to each armature (important : without mesh, the bug does not occur) - Make one of the armature child of the other armature - Export to fbx - Import the fbx # 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: [Scene.blend](https://archive.blender.org/developer/F6452446/Scene.blend) Thanks !
Author

Added subscriber: @MorganFraslin

Added subscriber: @MorganFraslin

Added subscriber: @ZedDB

Added subscriber: @ZedDB
Bastien Montagne was assigned by Sebastian Parborg 2019-02-01 13:25:51 +01:00

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.

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).

@ZedDB that assert happens in UI code, totally unrelated to that issue or FBX addon in general.

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). @ZedDB that assert happens in UI code, totally unrelated to that issue or FBX addon in general.

Closed as duplicate of #54071

Closed as duplicate of #54071

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

@mont29, I know I just mentioned it in case that wasn't supposed to happen when trying to export.
Sign in to join this conversation.
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender-addons#61011
No description provided.