diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2019-02-01 17:50:31 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2019-02-01 17:51:13 +0300 |
commit | d5a570ddb9d5c67ceec6fbd5bc684d1dd89f54e4 (patch) | |
tree | 4bcbe2b105832f9e45c7a21d2c90b3b25865df0b /io_scene_fbx | |
parent | 7e77c6ef6052d627bbc02b62bc10ae8b25f37f12 (diff) |
Fix T61096: fbx import crashes on file from mixamo.
Blender only supports 8 UVMaps per mesh, avoid crashing addon when
trying to import more.
Diffstat (limited to 'io_scene_fbx')
-rw-r--r-- | io_scene_fbx/__init__.py | 2 | ||||
-rw-r--r-- | io_scene_fbx/import_fbx.py | 5 |
2 files changed, 6 insertions, 1 deletions
diff --git a/io_scene_fbx/__init__.py b/io_scene_fbx/__init__.py index 77596c8a..6487bf01 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": (4, 14, 2), + "version": (4, 14, 3), "blender": (2, 80, 0), "location": "File > Import-Export", "description": "FBX IO meshes, UV's, vertex colors, materials, textures, cameras, lamps and actions", diff --git a/io_scene_fbx/import_fbx.py b/io_scene_fbx/import_fbx.py index 5a3287a2..b3f78660 100644 --- a/io_scene_fbx/import_fbx.py +++ b/io_scene_fbx/import_fbx.py @@ -1007,6 +1007,11 @@ def blen_read_geom_layer_uv(fbx_obj, mesh): fbx_layer_index = elem_prop_first(elem_find_first(fbx_layer, b'UVIndex')) uv_lay = mesh.uv_layers.new(name=fbx_layer_name) + if uv_lay is None: + print("Failed to add {%r %r} UVLayer to %r (probably too many of them?)" + "" % (layer_id, fbx_layer_name, mesh.name)) + continue + blen_data = uv_lay.data # some valid files omit this data |