diff options
author | Julien Duroure <julien.duroure@gmail.com> | 2018-12-07 22:48:42 +0300 |
---|---|---|
committer | Julien Duroure <julien.duroure@gmail.com> | 2018-12-07 22:48:42 +0300 |
commit | a792af89e9483af2019fe582c82e232be080767a (patch) | |
tree | 583afa64cd92b37b882950e5cb01608182a8e490 /io_scene_gltf2/blender | |
parent | c90525d7bd77b8d5a5375dc7a031228dc72f90ba (diff) |
glTF importer: fix bug importing empty scene
Diffstat (limited to 'io_scene_gltf2/blender')
-rwxr-xr-x | io_scene_gltf2/blender/imp/gltf2_blender_scene.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/io_scene_gltf2/blender/imp/gltf2_blender_scene.py b/io_scene_gltf2/blender/imp/gltf2_blender_scene.py index f3d3de7c..6c2f14cb 100755 --- a/io_scene_gltf2/blender/imp/gltf2_blender_scene.py +++ b/io_scene_gltf2/blender/imp/gltf2_blender_scene.py @@ -72,8 +72,9 @@ class BlenderScene(): if gltf.data.animations: for anim_idx, anim in enumerate(gltf.data.animations): - for node_idx in pyscene.nodes: - BlenderAnimation.anim(gltf, anim_idx, node_idx) + if pyscene.nodes is not None: + for node_idx in pyscene.nodes: + BlenderAnimation.anim(gltf, anim_idx, node_idx) # Parent root node to rotation object if pyscene.nodes is not None: |