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
path: root/source
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2009-07-13 16:17:07 +0400
committerCampbell Barton <ideasman42@gmail.com>2009-07-13 16:17:07 +0400
commit1227d5d6d3e96362260f3e6eeadc01612cc18898 (patch)
tree2f8491e5420d4354cdac3c4c5de6aac01a288df6 /source
parent030e5bd93ee0aaea3e43b89fb87191d7ec45c3be (diff)
mathutils types didnt work properly in python2x. vec*matrix failed for eg.
Now with KX_Python.h line 35 commented YoFrankie 1.1 should run unmodified in blender2.5
Diffstat (limited to 'source')
-rw-r--r--source/blender/python/generic/Mathutils.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/source/blender/python/generic/Mathutils.c b/source/blender/python/generic/Mathutils.c
index 651c5b8a265..53077659655 100644
--- a/source/blender/python/generic/Mathutils.c
+++ b/source/blender/python/generic/Mathutils.c
@@ -114,6 +114,13 @@ PyObject *Mathutils_Init(const char *from)
//seed the generator for the rand function
BLI_srand((unsigned int) (PIL_check_seconds_timer() * 0x7FFFFFFF));
+
+#if (PY_VERSION_HEX < 0x03000000)
+ vector_Type.tp_flags |= Py_TPFLAGS_CHECKTYPES;
+ matrix_Type.tp_flags |= Py_TPFLAGS_CHECKTYPES;
+ euler_Type.tp_flags |= Py_TPFLAGS_CHECKTYPES;
+ quaternion_Type.tp_flags |= Py_TPFLAGS_CHECKTYPES;
+#endif
if( PyType_Ready( &vector_Type ) < 0 )
return NULL;