Skip to content

Commit

Permalink
Merge pull request #1150 from scurest/iss-308-stopgap
Browse files Browse the repository at this point in the history
Export: stopgap for zero-weight verts producing invalid files (#308)
  • Loading branch information
julienduroure authored Aug 8, 2020
2 parents 7f521ce + 4b13ef9 commit abc0842
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions addons/io_scene_gltf2/blender/exp/gltf2_blender_extract.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit abc0842

Please sign in to comment.