[Bf-extensions-cvs] [a792af89] blender2.8: glTF importer: fix bug importing empty scene
Julien Duroure
noreply at git.blender.org
Fri Dec 7 20:49:08 CET 2018
Commit: a792af89e9483af2019fe582c82e232be080767a
Author: Julien Duroure
Date: Fri Dec 7 20:48:42 2018 +0100
Branches: blender2.8
https://developer.blender.org/rBAa792af89e9483af2019fe582c82e232be080767a
glTF importer: fix bug importing empty scene
===================================================================
M io_scene_gltf2/blender/imp/gltf2_blender_scene.py
===================================================================
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:
More information about the Bf-extensions-cvs
mailing list