diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2014-10-04 18:20:59 +0400 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2014-10-04 18:20:59 +0400 |
commit | 3d5cd1956ef4cc323037d103ca74d10a97ebef78 (patch) | |
tree | fdeb0f54a26a53e06bdf7656ca013362dbfe53e2 /io_scene_fbx_experimental | |
parent | c210f87f12929bbd0884db7bf76baa3f1eed7b02 (diff) |
Fix T41922: FBX exporter causes crashes in other software when smoothing groups are active.
Do not say we have a normal layer when we do not!
Also, warn users about the fact that applying modifiers implies loosing all shape keys.
That later point may be addressed ultimately, but not easily. :/
Diffstat (limited to 'io_scene_fbx_experimental')
-rw-r--r-- | io_scene_fbx_experimental/__init__.py | 3 | ||||
-rw-r--r-- | io_scene_fbx_experimental/export_fbx_bin.py | 9 |
2 files changed, 7 insertions, 5 deletions
diff --git a/io_scene_fbx_experimental/__init__.py b/io_scene_fbx_experimental/__init__.py index db46e8e9..f3bcb596 100644 --- a/io_scene_fbx_experimental/__init__.py +++ b/io_scene_fbx_experimental/__init__.py @@ -285,7 +285,8 @@ class ExportFBX_experimental(bpy.types.Operator, ExportHelper): use_mesh_modifiers = BoolProperty( name="Apply Modifiers", - description="Apply modifiers to mesh objects (except Armature ones!)", + description="Apply modifiers to mesh objects (except Armature ones) - " + "WARNING: prevents exporting shape keys", default=True, ) mesh_smooth_type = EnumProperty( diff --git a/io_scene_fbx_experimental/export_fbx_bin.py b/io_scene_fbx_experimental/export_fbx_bin.py index 5e59fabe..d7bb1dd9 100644 --- a/io_scene_fbx_experimental/export_fbx_bin.py +++ b/io_scene_fbx_experimental/export_fbx_bin.py @@ -946,7 +946,7 @@ def fbx_data_mesh_elements(root, me_obj, scene_data, done_meshes): # Loop normals. tspacenumber = 0 - if (write_normals): + if write_normals: # NOTE: this is not supported by importer currently. # XXX Official docs says normals should use IndexToDirect, # but this does not seem well supported by apps currently... @@ -1116,9 +1116,10 @@ def fbx_data_mesh_elements(root, me_obj, scene_data, done_meshes): layer = elem_data_single_int32(geom, b"Layer", 0) elem_data_single_int32(layer, b"Version", FBX_GEOMETRY_LAYER_VERSION) - lay_nor = elem_empty(layer, b"LayerElement") - elem_data_single_string(lay_nor, b"Type", b"LayerElementNormal") - elem_data_single_int32(lay_nor, b"TypedIndex", 0) + if write_normals: + lay_nor = elem_empty(layer, b"LayerElement") + elem_data_single_string(lay_nor, b"Type", b"LayerElementNormal") + elem_data_single_int32(lay_nor, b"TypedIndex", 0) if tspacenumber: lay_binor = elem_empty(layer, b"LayerElement") elem_data_single_string(lay_binor, b"Type", b"LayerElementBinormal") |