Page MenuHome

Fbx exporter: Shape keys animation export broken
Confirmed, NormalPublicKNOWN ISSUE

Description

System Information
Operating system: Windows-10-10.0.17134 64 Bits
Graphics card: GeForce GTX 1080/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 430.86

Blender Version
Broken: version: 2.80 (sub 74), branch: master, commit date: 2019-06-29 20:58, hash: rBbe060c3990ad
Worked: 2.79b

Short description of error
Exporting animated shape keys with the Fbx exporter is broken.
After investigation, it seems this line is the cause in the export_fbx_bin.py file:

tmp_me = bpy.data.meshes.new_from_object(
                            ob_to_convert, preserve_all_data_layers=True, depsgraph=depsgraph)

ob_to_convert.data.shape keys is not None, but tmp_me.shape_keys is None.
So shape keys are lost here, and are not registered in the data_meshes dict.

Exact steps for others to reproduce the error

  • Open the blend file and export the Cube to Fbx:

  • Import it back in Blender or Unity, the shape key is not animated.

Event Timeline

lucas veber (lucky3) updated the task description. (Show Details)
lucas veber (lucky3) updated the task description. (Show Details)
Philipp Oeser (lichtwerk) lowered the priority of this task from 90 to 30.Jul 1 2019, 2:37 PM

ob_to_convert.data.shape keys is not None, but tmp_me.shape_keys is None

Not sure this is is actually the reason...

  • for me here, shapekeys key_blocks are actually coming over correctly [just the animation is missing with default settings]
  • I can get the shapekey animation to export/import fine if I disable All Actions and NLA Strips under the FBX export Animation Settings
  • could you check if this works for you?

@Bastien Montagne (mont29): I am a bit confused why the shapekey animation seems nowhere to be found after reimporting if All Actions and NLA Strips are enabledon export? (shouldnt these at least be selectable from the Dopesheet ShapeKey Editor Action dropdown?)

lucas veber (lucky3) added a comment.EditedJul 2 2019, 9:20 AM

for me here, shapekeys key_blocks are actually coming over correctly [just the animation is missing with default settings]

I can't say i'm 100% sure of course, but i'm pretty sure the data_meshes dict should be filled with the shape keys data, while it's no more the case in the latest version.

To expose it better, a few lines below:

for me_key, me, _free in data_meshes.values():
        if not (me.shape_keys and len(me.shape_keys.key_blocks) > 1):
             continue

me.shape_keys being None, shape keys are skipped.
But this is a different case, in the given example the Cube object is "use_org_data". Sorry for the confusion.

I can get the shapekey animation to export/import fine if I disable All Actions and NLA Strips under the FBX export Animation Settings

Not working here (tested with the same blend file).

Sorry, I inverted "All Actions" and "Baked Animations" buttons!
When disabling these two options, shape keys animation exports here as well, yes.

Philipp Oeser (lichtwerk) raised the priority of this task from 30 to Normal.

OK, not exactly sure what to do then:

  • we have a working "workaround"
  • it still seems unclear why shapekey anims wont export if All Actions and NLA Strips are enabled

@Bastien Montagne (mont29): will assign to you [even though this might really not be a bug] for making a decission...

Bastien Montagne (mont29) changed the subtype of this task from "Report" to "Known Issue".Feb 17 2020, 5:02 PM
Bastien Montagne (mont29) edited projects, added Python API; removed Tracker Curfew.

This still seems to be an issue, I exported a cloth simulation to Unity with the newest official version and it only appeared when all actions and nla-tracks were disabled.

The work-around works with the provided blend file, but I have one here that still doesn't work.

If you try to export this as a fbx, even if you disable NLA strips and All Actions, the animation won't be exported.