diff options
author | Julien Duroure <julien.duroure@gmail.com> | 2019-06-05 20:05:23 +0300 |
---|---|---|
committer | Julien Duroure <julien.duroure@gmail.com> | 2019-06-05 20:05:23 +0300 |
commit | 2d691e2e0c46b3d91b491cfeda94523c1517a085 (patch) | |
tree | 51ac1e360738a31c3f998751eace8fb54ef4a079 /io_scene_gltf2/blender/imp/gltf2_blender_gltf.py | |
parent | a84dac69bc9d0b78b1cadd12a39cacc16a4eabe3 (diff) |
glTF importer: Ignore animation import if target has no node
Diffstat (limited to 'io_scene_gltf2/blender/imp/gltf2_blender_gltf.py')
-rwxr-xr-x | io_scene_gltf2/blender/imp/gltf2_blender_gltf.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/io_scene_gltf2/blender/imp/gltf2_blender_gltf.py b/io_scene_gltf2/blender/imp/gltf2_blender_gltf.py index b03b56bd..53b200b2 100755 --- a/io_scene_gltf2/blender/imp/gltf2_blender_gltf.py +++ b/io_scene_gltf2/blender/imp/gltf2_blender_gltf.py @@ -258,6 +258,9 @@ class BlenderGlTF(): for anim_idx, anim in enumerate(gltf.data.animations): for channel_idx, channel in enumerate(anim.channels): + if channel.target.node is None: + continue + if anim_idx not in gltf.data.nodes[channel.target.node].animations.keys(): gltf.data.nodes[channel.target.node].animations[anim_idx] = [] gltf.data.nodes[channel.target.node].animations[anim_idx].append(channel_idx) |