glTF exporter: fix to generate valid file when zero-weight verts

A better fix will come later
This commit is contained in:
Julien Duroure 2020-08-08 16:07:50 +02:00
parent 9fd05ef466
commit 386bb5eaa4
2 changed files with 2 additions and 1 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, 3, 46),
"version": (1, 3, 47),
'blender': (2, 90, 0),
'location': 'File > Import-Export',
'description': 'Import-Export as glTF 2.0',

View File

@ -286,6 +286,7 @@ def extract_primitives(glTF, blender_mesh, library, blender_object, blender_vert
bones.append((joint, weight))
bones.sort(key=lambda x: x[1], reverse=True)
bones = tuple(bones)
if not bones: bones = ((0, 1.0),) # HACK for verts with zero weight (#308)
vert += (bones,)
for shape_key in shape_keys: