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

@@ -23,13 +23,12 @@
* ***** END GPL LICENSE BLOCK *****
*/
/* grr, python redefines */
#ifdef _POSIX_C_SOURCE
#undef _POSIX_C_SOURCE
#endif
#include <Python.h>
#include "bpy.h"
#include "bpy_rna.h"