glTF exporter: fix bug when vertex group index is out of range of existing vertex groups
This commit is contained in:
parent
d52854d420
commit
dc4c83cffc
|
@ -15,7 +15,7 @@
|
|||
bl_info = {
|
||||
'name': 'glTF 2.0 format',
|
||||
'author': 'Julien Duroure, Norbert Nopper, Urs Hanselmann, Moritz Becher, Benjamin Schmithüsen, Jim Eckerlein, and many external contributors',
|
||||
"version": (1, 2, 49),
|
||||
"version": (1, 2, 50),
|
||||
'blender': (2, 82, 7),
|
||||
'location': 'File > Import-Export',
|
||||
'description': 'Import-Export as glTF 2.0',
|
||||
|
|
|
@ -709,6 +709,9 @@ def extract_primitives(glTF, blender_mesh, blender_object, blender_vertex_groups
|
|||
#
|
||||
|
||||
vertex_group_index = group_element.group
|
||||
|
||||
if vertex_group_index < 0 or vertex_group_index >= len(blender_vertex_groups):
|
||||
continue
|
||||
vertex_group_name = blender_vertex_groups[vertex_group_index].name
|
||||
|
||||
joint_index = None
|
||||
|
|
Loading…
Reference in New Issue