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/blender/blenkernel/intern/script.c')
-rw-r--r--source/blender/blenkernel/intern/script.c18
1 files changed, 8 insertions, 10 deletions
diff --git a/source/blender/blenkernel/intern/script.c b/source/blender/blenkernel/intern/script.c
index ab7ae0e09fe..e34b1d0a1dd 100644
--- a/source/blender/blenkernel/intern/script.c
+++ b/source/blender/blenkernel/intern/script.c
@@ -32,18 +32,21 @@
*/
#include "BKE_script.h"
-//XXX #include "BPI_script.h"
+#include "DNA_space_types.h"
#include "MEM_guardedalloc.h"
-
+/*
#include "BLI_blenlib.h"
#include "BKE_utildefines.h"
#include "BKE_library.h"
#include "BKE_global.h"
#include "BKE_main.h"
+#ifndef DISABLE_PYTHON
#include "BPY_extern.h" // Blender Python library
+#endif
+*/
/* XXX this function and so also the file should not be needed anymore,
* since we have to force clearing all Python related data before freeing
@@ -54,13 +57,8 @@
void free_script (Script *script)
{
if (!script) return;
-
- if (script->py_globaldict || script->py_button ||
- script->py_event || script->py_draw)
- {
- BPY_clear_script(script);
- }
-
- return;
+#ifndef DISABLE_PYTHON
+ BPY_clear_script(script);
+#endif
}
#endif