Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulien Duroure <julien.duroure@gmail.com>2018-12-07 22:48:42 +0300
committerJulien Duroure <julien.duroure@gmail.com>2018-12-07 22:48:42 +0300
commita792af89e9483af2019fe582c82e232be080767a (patch)
tree583afa64cd92b37b882950e5cb01608182a8e490 /io_scene_gltf2/blender
parentc90525d7bd77b8d5a5375dc7a031228dc72f90ba (diff)
glTF importer: fix bug importing empty scene
Diffstat (limited to 'io_scene_gltf2/blender')
-rwxr-xr-xio_scene_gltf2/blender/imp/gltf2_blender_scene.py5
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: