Page MenuHome

Fbx exporter: Shape keys animation export broken
Open, NormalPublic

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.

Details

Type
Bug

Event Timeline

lucas veber (lucky3) updated the task description. (Show Details)
lucas veber (lucky3) updated the task description. (Show Details)
Philipp Oeser (lichtwerk) triaged this task as Needs Information from User priority.

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 Needs Information from User 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...