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/import_fbx.py | |
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/import_fbx.py')
-rw-r--r-- | io_scene_fbx/import_fbx.py | 5 |
1 files changed, 5 insertions, 0 deletions
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 |