Fbx exporter: Shape keys animation export broken #66272
Operating system: Windows-10-10.0.17134 64 Bits
Graphics card: GeForce GTX 1080/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 430.86
Broken: version: 2.80 (sub 74), branch: master, commit date: 2019-06-29 20:58, hash:
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.
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
NLA Stripsunder the FBX export Animation Settings
- could you check if this works for you?
@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?)
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.
OK, not exactly sure what to do then:
- we have a working "workaround"
- it still seems unclear why shapekey anims wont export if
NLA Stripsare enabled
@mont29: will assign to you [even though this might really not be a bug] for making a decission...
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.animationString2.blend
If you try to export this as a fbx, even if you disable NLA strips and All Actions, the animation won't be exported.
Can confirm as for 3.6 workaround still works.
If someone will attempt to fix this note that there is also proglem that shape key animation is not exported if you don't have any action selected in action editor (example - #104759). Workaround works though.
No due date set.
No dependencies set.
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?