FBX export: Binary FBX does not export shape keys #40305

Closed
opened 2014-05-22 00:11:20 +02:00 by Mitchell Stokes · 11 comments

The ASCII exporter can export shape keys (although, not bone-less shape key animations), which Unity imports as BlendShapes. The binary FBX exporter does not appear to export shape keys.

shape_key_export.blend

The ASCII exporter can export shape keys (although, not bone-less shape key animations), which Unity imports as BlendShapes. The binary FBX exporter does not appear to export shape keys. [shape_key_export.blend](https://archive.blender.org/developer/F89631/shape_key_export.blend)
Author
Member

Changed status to: 'Open'

Changed status to: 'Open'
Bastien Montagne was assigned by Mitchell Stokes 2014-05-22 00:11:20 +02:00
Author
Member

Added subscriber: @Moguri

Added subscriber: @Moguri

This is TODO, not bug - and for sure not a 2.71 target…

This is TODO, not bug - and for sure not a 2.71 target…

@Moguri I would need a simple FBX file from max or so with one or two shapekeys in it… I suspect shapekeys are no more embedded in mesh as they were in 6.1 (at least, they have their own class in FBX SDK).

@Moguri I would need a simple FBX file from max or so with one or two shapekeys in it… I suspect shapekeys are no more embedded in mesh as they were in 6.1 (at least, they have their own class in FBX SDK).
Author
Member

I do not currently have access to Max or Maya, so maybe we'll need to see if we can get a sample from the community?

I do not currently have access to Max or Maya, so maybe we'll need to see if we can get a sample from the community?

@Moguri ah, forgot to followup here, using FBX converter I was able to get an 7.3 with shape keys, so now I know how they are layout, no more need for that.

Just need time to code this (it’s nearly as complex as armatures/skinning :/ ).

@Moguri ah, forgot to followup here, using FBX converter I was able to get an 7.3 with shape keys, so now I know how they are layout, no more need for that. Just need time to code this (it’s nearly as complex as armatures/skinning :/ ).

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'

Code is in master now (relative shape keys only, for now!, 0abd36f1ec and 59ff66fa7a).

Code is in master now (relative shape keys only, for now!, 0abd36f1ec and 59ff66fa7a).

Added subscriber: @ThomasWright

Added subscriber: @ThomasWright

I just tried to use this on a character and get the following error...

Traceback (most recent call last):

File "C:\Program Files\Blender Foundation\Blender\2.72\scripts\addons\io_scene_fbx\__init__.py", line 437, in execute
  return export_fbx_bin.save(self, context, **keywords)
File "C:\Program Files\Blender Foundation\Blender\2.72\scripts\addons\io_scene_fbx\export_fbx_bin.py", line 2730, in save
  ret = save_single(operator, context.scene, filepath, **kwargs_mod)
File "C:\Program Files\Blender Foundation\Blender\2.72\scripts\addons\io_scene_fbx\export_fbx_bin.py", line 2643, in save_single
  fbx_objects_elements(root, scene_data)
File "C:\Program Files\Blender Foundation\Blender\2.72\scripts\addons\io_scene_fbx\export_fbx_bin.py", line 2494, in fbx_objects_elements
  fbx_data_mesh_elements(objects, me_obj, scene_data, done_meshes)
File "C:\Program Files\Blender Foundation\Blender\2.72\scripts\addons\io_scene_fbx\export_fbx_bin.py", line 1095, in fbx_data_mesh_elements
  blmats_to_fbxmats_idxs = [me_fbxmats_idx[m] for m in me_blmats]
File "C:\Program Files\Blender Foundation\Blender\2.72\scripts\addons\io_scene_fbx\export_fbx_bin.py", line 1095, in <listcomp>
  blmats_to_fbxmats_idxs = [me_fbxmats_idx[m] for m in me_blmats]

KeyError: bpy.data.materials['Eyes']

location: :-1

When I tried to export just the character (no eyes) i get this...

Traceback (most recent call last):

File "C:\Program Files\Blender Foundation\Blender\2.72\scripts\addons\io_scene_fbx\__init__.py", line 437, in execute
  return export_fbx_bin.save(self, context, **keywords)
File "C:\Program Files\Blender Foundation\Blender\2.72\scripts\addons\io_scene_fbx\export_fbx_bin.py", line 2730, in save
  ret = save_single(operator, context.scene, filepath, **kwargs_mod)
File "C:\Program Files\Blender Foundation\Blender\2.72\scripts\addons\io_scene_fbx\export_fbx_bin.py", line 2643, in save_single
  fbx_objects_elements(root, scene_data)
File "C:\Program Files\Blender Foundation\Blender\2.72\scripts\addons\io_scene_fbx\export_fbx_bin.py", line 2494, in fbx_objects_elements
  fbx_data_mesh_elements(objects, me_obj, scene_data, done_meshes)
File "C:\Program Files\Blender Foundation\Blender\2.72\scripts\addons\io_scene_fbx\export_fbx_bin.py", line 1095, in fbx_data_mesh_elements
  blmats_to_fbxmats_idxs = [me_fbxmats_idx[m] for m in me_blmats]
File "C:\Program Files\Blender Foundation\Blender\2.72\scripts\addons\io_scene_fbx\export_fbx_bin.py", line 1095, in <listcomp>
  blmats_to_fbxmats_idxs = [me_fbxmats_idx[m] for m in me_blmats]

KeyError: bpy.data.materials['Eyes']

location: :-1

bpy.context.object.location- [x] = 0
bpy.ops.object.transform_apply(location=True, rotation=False, scale=False)
bpy.ops.object.transform_apply(location=True, rotation=False, scale=False)
bpy.ops.object.transform_apply(location=True, rotation=False, scale=False)
bpy.ops.object.select_all(action='TOGGLE')
Traceback (most recent call last):

File "C:\Program Files\Blender Foundation\Blender\2.72\scripts\addons\io_scene_fbx\__init__.py", line 437, in execute
  return export_fbx_bin.save(self, context, **keywords)
File "C:\Program Files\Blender Foundation\Blender\2.72\scripts\addons\io_scene_fbx\export_fbx_bin.py", line 2730, in save
  ret = save_single(operator, context.scene, filepath, **kwargs_mod)
File "C:\Program Files\Blender Foundation\Blender\2.72\scripts\addons\io_scene_fbx\export_fbx_bin.py", line 2643, in save_single
  fbx_objects_elements(root, scene_data)
File "C:\Program Files\Blender Foundation\Blender\2.72\scripts\addons\io_scene_fbx\export_fbx_bin.py", line 2494, in fbx_objects_elements
  fbx_data_mesh_elements(objects, me_obj, scene_data, done_meshes)
File "C:\Program Files\Blender Foundation\Blender\2.72\scripts\addons\io_scene_fbx\export_fbx_bin.py", line 1095, in fbx_data_mesh_elements
  blmats_to_fbxmats_idxs = [me_fbxmats_idx[m] for m in me_blmats]
File "C:\Program Files\Blender Foundation\Blender\2.72\scripts\addons\io_scene_fbx\export_fbx_bin.py", line 1095, in <listcomp>
  blmats_to_fbxmats_idxs = [me_fbxmats_idx[m] for m in me_blmats]

KeyError: bpy.data.materials['Eyes']

location: :-1

Traceback (most recent call last):

File "C:\Program Files\Blender Foundation\Blender\2.72\scripts\addons\io_scene_fbx\__init__.py", line 437, in execute
  return export_fbx_bin.save(self, context, **keywords)
File "C:\Program Files\Blender Foundation\Blender\2.72\scripts\addons\io_scene_fbx\export_fbx_bin.py", line 2730, in save
  ret = save_single(operator, context.scene, filepath, **kwargs_mod)
File "C:\Program Files\Blender Foundation\Blender\2.72\scripts\addons\io_scene_fbx\export_fbx_bin.py", line 2643, in save_single
  fbx_objects_elements(root, scene_data)
File "C:\Program Files\Blender Foundation\Blender\2.72\scripts\addons\io_scene_fbx\export_fbx_bin.py", line 2494, in fbx_objects_elements
  fbx_data_mesh_elements(objects, me_obj, scene_data, done_meshes)
File "C:\Program Files\Blender Foundation\Blender\2.72\scripts\addons\io_scene_fbx\export_fbx_bin.py", line 1095, in fbx_data_mesh_elements
  blmats_to_fbxmats_idxs = [me_fbxmats_idx[m] for m in me_blmats]
File "C:\Program Files\Blender Foundation\Blender\2.72\scripts\addons\io_scene_fbx\export_fbx_bin.py", line 1095, in <listcomp>
  blmats_to_fbxmats_idxs = [me_fbxmats_idx[m] for m in me_blmats]

KeyError: bpy.data.materials['Shirt']

location: :-1

I just tried to use this on a character and get the following error... Traceback (most recent call last): ``` File "C:\Program Files\Blender Foundation\Blender\2.72\scripts\addons\io_scene_fbx\__init__.py", line 437, in execute return export_fbx_bin.save(self, context, **keywords) File "C:\Program Files\Blender Foundation\Blender\2.72\scripts\addons\io_scene_fbx\export_fbx_bin.py", line 2730, in save ret = save_single(operator, context.scene, filepath, **kwargs_mod) File "C:\Program Files\Blender Foundation\Blender\2.72\scripts\addons\io_scene_fbx\export_fbx_bin.py", line 2643, in save_single fbx_objects_elements(root, scene_data) File "C:\Program Files\Blender Foundation\Blender\2.72\scripts\addons\io_scene_fbx\export_fbx_bin.py", line 2494, in fbx_objects_elements fbx_data_mesh_elements(objects, me_obj, scene_data, done_meshes) File "C:\Program Files\Blender Foundation\Blender\2.72\scripts\addons\io_scene_fbx\export_fbx_bin.py", line 1095, in fbx_data_mesh_elements blmats_to_fbxmats_idxs = [me_fbxmats_idx[m] for m in me_blmats] File "C:\Program Files\Blender Foundation\Blender\2.72\scripts\addons\io_scene_fbx\export_fbx_bin.py", line 1095, in <listcomp> blmats_to_fbxmats_idxs = [me_fbxmats_idx[m] for m in me_blmats] ``` KeyError: bpy.data.materials['Eyes'] location: <unknown location>:-1 When I tried to export just the character (no eyes) i get this... Traceback (most recent call last): ``` File "C:\Program Files\Blender Foundation\Blender\2.72\scripts\addons\io_scene_fbx\__init__.py", line 437, in execute return export_fbx_bin.save(self, context, **keywords) File "C:\Program Files\Blender Foundation\Blender\2.72\scripts\addons\io_scene_fbx\export_fbx_bin.py", line 2730, in save ret = save_single(operator, context.scene, filepath, **kwargs_mod) File "C:\Program Files\Blender Foundation\Blender\2.72\scripts\addons\io_scene_fbx\export_fbx_bin.py", line 2643, in save_single fbx_objects_elements(root, scene_data) File "C:\Program Files\Blender Foundation\Blender\2.72\scripts\addons\io_scene_fbx\export_fbx_bin.py", line 2494, in fbx_objects_elements fbx_data_mesh_elements(objects, me_obj, scene_data, done_meshes) File "C:\Program Files\Blender Foundation\Blender\2.72\scripts\addons\io_scene_fbx\export_fbx_bin.py", line 1095, in fbx_data_mesh_elements blmats_to_fbxmats_idxs = [me_fbxmats_idx[m] for m in me_blmats] File "C:\Program Files\Blender Foundation\Blender\2.72\scripts\addons\io_scene_fbx\export_fbx_bin.py", line 1095, in <listcomp> blmats_to_fbxmats_idxs = [me_fbxmats_idx[m] for m in me_blmats] ``` KeyError: bpy.data.materials['Eyes'] location: <unknown location>:-1 bpy.context.object.location- [x] = 0 bpy.ops.object.transform_apply(location=True, rotation=False, scale=False) bpy.ops.object.transform_apply(location=True, rotation=False, scale=False) bpy.ops.object.transform_apply(location=True, rotation=False, scale=False) bpy.ops.object.select_all(action='TOGGLE') Traceback (most recent call last): ``` File "C:\Program Files\Blender Foundation\Blender\2.72\scripts\addons\io_scene_fbx\__init__.py", line 437, in execute return export_fbx_bin.save(self, context, **keywords) File "C:\Program Files\Blender Foundation\Blender\2.72\scripts\addons\io_scene_fbx\export_fbx_bin.py", line 2730, in save ret = save_single(operator, context.scene, filepath, **kwargs_mod) File "C:\Program Files\Blender Foundation\Blender\2.72\scripts\addons\io_scene_fbx\export_fbx_bin.py", line 2643, in save_single fbx_objects_elements(root, scene_data) File "C:\Program Files\Blender Foundation\Blender\2.72\scripts\addons\io_scene_fbx\export_fbx_bin.py", line 2494, in fbx_objects_elements fbx_data_mesh_elements(objects, me_obj, scene_data, done_meshes) File "C:\Program Files\Blender Foundation\Blender\2.72\scripts\addons\io_scene_fbx\export_fbx_bin.py", line 1095, in fbx_data_mesh_elements blmats_to_fbxmats_idxs = [me_fbxmats_idx[m] for m in me_blmats] File "C:\Program Files\Blender Foundation\Blender\2.72\scripts\addons\io_scene_fbx\export_fbx_bin.py", line 1095, in <listcomp> blmats_to_fbxmats_idxs = [me_fbxmats_idx[m] for m in me_blmats] ``` KeyError: bpy.data.materials['Eyes'] location: <unknown location>:-1 Traceback (most recent call last): ``` File "C:\Program Files\Blender Foundation\Blender\2.72\scripts\addons\io_scene_fbx\__init__.py", line 437, in execute return export_fbx_bin.save(self, context, **keywords) File "C:\Program Files\Blender Foundation\Blender\2.72\scripts\addons\io_scene_fbx\export_fbx_bin.py", line 2730, in save ret = save_single(operator, context.scene, filepath, **kwargs_mod) File "C:\Program Files\Blender Foundation\Blender\2.72\scripts\addons\io_scene_fbx\export_fbx_bin.py", line 2643, in save_single fbx_objects_elements(root, scene_data) File "C:\Program Files\Blender Foundation\Blender\2.72\scripts\addons\io_scene_fbx\export_fbx_bin.py", line 2494, in fbx_objects_elements fbx_data_mesh_elements(objects, me_obj, scene_data, done_meshes) File "C:\Program Files\Blender Foundation\Blender\2.72\scripts\addons\io_scene_fbx\export_fbx_bin.py", line 1095, in fbx_data_mesh_elements blmats_to_fbxmats_idxs = [me_fbxmats_idx[m] for m in me_blmats] File "C:\Program Files\Blender Foundation\Blender\2.72\scripts\addons\io_scene_fbx\export_fbx_bin.py", line 1095, in <listcomp> blmats_to_fbxmats_idxs = [me_fbxmats_idx[m] for m in me_blmats] ``` KeyError: bpy.data.materials['Shirt'] location: <unknown location>:-1

Please make a new report, and attach your .blend file!

Please make a new report, and attach your .blend file!
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#40305
No description provided.