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

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/gameengine/Expressions/Value.cpp')
-rw-r--r--source/gameengine/Expressions/Value.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/source/gameengine/Expressions/Value.cpp b/source/gameengine/Expressions/Value.cpp
index bcfb7e92d71..706cfc13ca3 100644
--- a/source/gameengine/Expressions/Value.cpp
+++ b/source/gameengine/Expressions/Value.cpp
@@ -18,6 +18,7 @@
*
*/
#include "Value.h"
+#include "BoolValue.h"
#include "FloatValue.h"
#include "IntValue.h"
#include "VectorValue.h"
@@ -573,6 +574,11 @@ CValue* CValue::ConvertPythonToValue(PyObject *pyobj, const char *error_prefix)
} else
#endif
+ /* note: Boolean check should go before Int check [#34677] */
+ if (PyBool_Check(pyobj))
+ {
+ vallie = new CBoolValue( (bool)PyLong_AsLongLong(pyobj) );
+ } else
if (PyFloat_Check(pyobj))
{
vallie = new CFloatValue( (float)PyFloat_AsDouble(pyobj) );