Fix invalid index mesh name

This commit is contained in:
Julien Duroure 2022-01-20 18:41:30 +01:00
parent ec45566f05
commit c8445b67fc
2 changed files with 2 additions and 2 deletions

View File

@ -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, 8, 10),
"version": (1, 8, 11),
'blender': (3, 0, 0),
'location': 'File > Import-Export',
'description': 'Import-Export as glTF 2.0',

View File

@ -200,7 +200,7 @@ class BlenderNode():
if not (0 <= pynode.mesh < len(gltf.data.meshes)):
# Avoid traceback for invalid gltf file: invalid reference to meshes array
# So return an empty blender object)
return bpy.data.objects.new(vnode.name or mesh.name, None)
return bpy.data.objects.new(vnode.name or "Invalid Mesh Index", None)
pymesh = gltf.data.meshes[pynode.mesh]
# Key to cache the Blender mesh by.