[Bf-extensions-cvs] [06c6202d] master: glTF importer: fix bad check of parenting for node id 0

Julien Duroure noreply at git.blender.org
Tue Mar 12 17:40:05 CET 2019


Commit: 06c6202dcb5d73efe0597ff3d6673caec8ea930d
Author: Julien Duroure
Date:   Tue Mar 12 17:39:34 2019 +0100
Branches: master
https://developer.blender.org/rBA06c6202dcb5d73efe0597ff3d6673caec8ea930d

glTF importer: fix bad check of parenting for node id 0

===================================================================

M	io_scene_gltf2/blender/imp/gltf2_blender_animation_bone.py

===================================================================

diff --git a/io_scene_gltf2/blender/imp/gltf2_blender_animation_bone.py b/io_scene_gltf2/blender/imp/gltf2_blender_animation_bone.py
index 65f68c4f..c568db22 100755
--- a/io_scene_gltf2/blender/imp/gltf2_blender_animation_bone.py
+++ b/io_scene_gltf2/blender/imp/gltf2_blender_animation_bone.py
@@ -101,7 +101,7 @@ class BlenderBoneAnim():
             quat_keyframes = [quaternion_gltf_to_blender(vals) for vals in values]
 
 
-        if not node.parent:
+        if node.parent is None:
             final_rots = [
                 bind_rotation.inverted() @ quat_keyframe
                 for quat_keyframe in quat_keyframes
@@ -157,7 +157,7 @@ class BlenderBoneAnim():
             )
         else:
             scale_mats = (scale_to_matrix(loc_gltf_to_blender(vals)) for vals in values)
-        if not node.parent:
+        if node.parent is None:
             final_scales = [
                 (bind_scale.inverted() @ scale_mat).to_scale()
                 for scale_mat in scale_mats



More information about the Bf-extensions-cvs mailing list