diff options
Diffstat (limited to 'io_scene_gltf2')
-rwxr-xr-x | io_scene_gltf2/__init__.py | 2 | ||||
-rwxr-xr-x | io_scene_gltf2/blender/imp/gltf2_blender_mesh.py | 7 |
2 files changed, 5 insertions, 4 deletions
diff --git a/io_scene_gltf2/__init__.py b/io_scene_gltf2/__init__.py index 2bd3ad67..e9a35a08 100755 --- a/io_scene_gltf2/__init__.py +++ b/io_scene_gltf2/__init__.py @@ -15,7 +15,7 @@ bl_info = { 'name': 'glTF 2.0 format', 'author': 'Julien Duroure, Scurest, Norbert Nopper, Urs Hanselmann, Moritz Becher, Benjamin Schmithüsen, Jim Eckerlein, and many external contributors', - "version": (1, 5, 0), + "version": (1, 5, 1), 'blender': (2, 91, 0), 'location': 'File > Import-Export', 'description': 'Import-Export as glTF 2.0', diff --git a/io_scene_gltf2/blender/imp/gltf2_blender_mesh.py b/io_scene_gltf2/blender/imp/gltf2_blender_mesh.py index 34e979b9..09ec325b 100755 --- a/io_scene_gltf2/blender/imp/gltf2_blender_mesh.py +++ b/io_scene_gltf2/blender/imp/gltf2_blender_mesh.py @@ -91,9 +91,10 @@ def do_primitives(gltf, mesh_idx, skin_idx, mesh, ob): num_cols = max(i, num_cols) num_shapekeys = 0 - for morph_i, _ in enumerate(pymesh.primitives[0].targets or []): - if pymesh.shapekey_names[morph_i] is not None: - num_shapekeys += 1 + if len(pymesh.primitives) > 0: # Empty primitive tab is not allowed, but some invalid files... + for morph_i, _ in enumerate(pymesh.primitives[0].targets or []): + if pymesh.shapekey_names[morph_i] is not None: + num_shapekeys += 1 # ------------- # We'll process all the primitives gathering arrays to feed into the |