workaround for python bug [#24400] If Script is executed with TEXT Editor, it becomes an error.

having the blend file as a part of the __file__ variable is not essential, this is fixed in python 3.2 so add an ifdef and don't use the blend file path for py older then 3.2.
This commit is contained in:
2010-10-27 06:05:22 +00:00
parent 27b527c164
commit 676829ccba
4 changed files with 32 additions and 20 deletions

View File

@@ -36,6 +36,16 @@
#ifndef DISABLE_PYTHON
#ifdef _POSIX_C_SOURCE
#undef _POSIX_C_SOURCE
#endif
#ifdef _XOPEN_SOURCE
#undef _XOPEN_SOURCE
#endif
#include <Python.h>
extern "C" {
#include "bpy_internal_import.h" /* from the blender python api, but we want to import text too! */
#include "py_capi_utils.h"