diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2018-08-05 20:13:35 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2018-08-05 20:13:35 +0300 |
commit | bea6ca0c4ef8b838ab6d2bc63136b52eb3ffc63c (patch) | |
tree | 41e06fef82fc1e86767e742bef42f410ddca79cf /io_scene_fbx | |
parent | c87ee4d46f16d60a2e1db7514c8d5ab42c5d93df (diff) |
Fix T55022: [fbx] when enable use tangent space ,it's throw bug.
calculating tangent for some reasons recompute mesh' UV layers, so we
cannot use iterators on those...
Diffstat (limited to 'io_scene_fbx')
-rw-r--r-- | io_scene_fbx/__init__.py | 2 | ||||
-rw-r--r-- | io_scene_fbx/export_fbx_bin.py | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/io_scene_fbx/__init__.py b/io_scene_fbx/__init__.py index 9611cb1f..920ddc4c 100644 --- a/io_scene_fbx/__init__.py +++ b/io_scene_fbx/__init__.py @@ -21,7 +21,7 @@ bl_info = { "name": "FBX format", "author": "Campbell Barton, Bastien Montagne, Jens Restemeier", - "version": (3, 9, 1), + "version": (3, 9, 2), "blender": (2, 79, 1), "location": "File > Import-Export", "description": "FBX IO meshes, UV's, vertex colors, materials, textures, cameras, lamps and actions", diff --git a/io_scene_fbx/export_fbx_bin.py b/io_scene_fbx/export_fbx_bin.py index b75a8977..2df62e3f 100644 --- a/io_scene_fbx/export_fbx_bin.py +++ b/io_scene_fbx/export_fbx_bin.py @@ -1023,9 +1023,11 @@ def fbx_data_mesh_elements(root, me_obj, scene_data, done_meshes): if tspacenumber: t_ln = array.array(data_types.ARRAY_FLOAT64, (0.0,)) * len(me.loops) * 3 # t_lnw = array.array(data_types.ARRAY_FLOAT64, (0.0,)) * len(me.loops) + uv_names = [uvlayer.name for uvlayer in me.uv_layers] + for name in uv_names: + me.calc_tangents(name) for idx, uvlayer in enumerate(me.uv_layers): name = uvlayer.name - me.calc_tangents(name) # Loop bitangents (aka binormals). # NOTE: this is not supported by importer currently. me.loops.foreach_get("bitangent", t_ln) |