Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Montagne <montagne29@wanadoo.fr>2014-10-04 18:20:59 +0400
committerBastien Montagne <montagne29@wanadoo.fr>2014-10-04 18:20:59 +0400
commit3d5cd1956ef4cc323037d103ca74d10a97ebef78 (patch)
treefdeb0f54a26a53e06bdf7656ca013362dbfe53e2 /io_scene_fbx/export_fbx_bin.py
parentc210f87f12929bbd0884db7bf76baa3f1eed7b02 (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/export_fbx_bin.py')
-rw-r--r--io_scene_fbx/export_fbx_bin.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/io_scene_fbx/export_fbx_bin.py b/io_scene_fbx/export_fbx_bin.py
index 4f50fa0b..ff223fa8 100644
--- a/io_scene_fbx/export_fbx_bin.py
+++ b/io_scene_fbx/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")