[Bf-extensions-cvs] [5be03a4] master: FBX export: fix a strange bug where 'return a_list and a_bool' could return a_list instead of a bool?!
Bastien Montagne
noreply at git.blender.org
Fri Oct 3 14:51:03 CEST 2014
Commit: 5be03a4071edc59968e2cd58ab241c0e2e79ba52
Author: Bastien Montagne
Date: Fri Oct 3 12:58:10 2014 +0200
Branches: master
https://developer.blender.org/rBA5be03a4071edc59968e2cd58ab241c0e2e79ba52
FBX export: fix a strange bug where 'return a_list and a_bool' could return a_list instead of a bool?!
===================================================================
M io_scene_fbx/fbx_utils.py
M io_scene_fbx_experimental/fbx_utils.py
===================================================================
diff --git a/io_scene_fbx/fbx_utils.py b/io_scene_fbx/fbx_utils.py
index df215f9..6264f90 100644
--- a/io_scene_fbx/fbx_utils.py
+++ b/io_scene_fbx/fbx_utils.py
@@ -671,7 +671,7 @@ class AnimationCurveNodeWrapper:
def __bool__(self):
# We are 'True' if we do have some validated keyframes...
- return self._keys and True in ((True in k[2]) for k in self._keys)
+ return bool(self._keys) and (True in ((True in k[2]) for k in self._keys))
def add_group(self, elem_key, fbx_group, fbx_gname, fbx_props):
"""
diff --git a/io_scene_fbx_experimental/fbx_utils.py b/io_scene_fbx_experimental/fbx_utils.py
index a15b1e1..9cd5503 100644
--- a/io_scene_fbx_experimental/fbx_utils.py
+++ b/io_scene_fbx_experimental/fbx_utils.py
@@ -671,7 +671,7 @@ class AnimationCurveNodeWrapper:
def __bool__(self):
# We are 'True' if we do have some validated keyframes...
- return self._keys and True in ((True in k[2]) for k in self._keys)
+ return bool(self._keys) and (True in ((True in k[2]) for k in self._keys))
def add_group(self, elem_key, fbx_group, fbx_gname, fbx_props):
"""
More information about the Bf-extensions-cvs
mailing list