Skip to content

Commit

Permalink
Fix bug when joints are in multiple skins
Browse files Browse the repository at this point in the history
  • Loading branch information
julienduroure committed Sep 25, 2018
1 parent cb8e66c commit c02cd0b
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions addons/io_scene_gltf2/blender/imp/gltf2_blender_skin.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,14 @@ def assign_vertex_groups(gltf, skin_id):
def create_armature_modifiers(gltf, skin_id):

pyskin = gltf.data.skins[skin_id]

if pyskin.blender_armature_name is None:
# TODO seems something is wrong
# For example, some joints are in skin 0, and are in another skin too
# Not sure this is glTF compliant, will check it
return


node = gltf.data.nodes[pyskin.node_id]
obj = bpy.data.objects[node.blender_object]

Expand Down

0 comments on commit c02cd0b

Please sign in to comment.