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>2008-11-25 00:57:58 +0300
committerCampbell Barton <ideasman42@gmail.com>2008-11-25 00:57:58 +0300
commitbd08d9e1a20c14eded3e1fc9bd512794cd7f4cba (patch)
tree4c477d490ea231fdc4825a64e7fafa41ef4f9be9 /source
parentf7de8cee28ed1f26971728d18eb399fe85b86197 (diff)
allow building without python
Diffstat (limited to 'source')
-rw-r--r--source/blender/blenkernel/intern/screen.c5
-rw-r--r--source/blender/editors/screen/SConscript7
-rw-r--r--source/blender/editors/screen/area.c5
3 files changed, 14 insertions, 3 deletions
diff --git a/source/blender/blenkernel/intern/screen.c b/source/blender/blenkernel/intern/screen.c
index bf2ed2c658e..7975e357938 100644
--- a/source/blender/blenkernel/intern/screen.c
+++ b/source/blender/blenkernel/intern/screen.c
@@ -37,7 +37,9 @@
#include "BKE_screen.h"
+#ifndef DISABLE_PYTHON
#include "BPY_extern.h"
+#endif
/* keep global; this has to be accessible outside of windowmanager */
static ListBase spacetypes= {NULL, NULL};
@@ -116,8 +118,9 @@ void BKE_screen_area_free(ScrArea *sa)
// uiFreeBlocks(&sa->uiblocks);
// uiFreePanels(&sa->panels);
+#ifndef DISABLE_PYTHON
BPY_free_scriptlink(&sa->scriptlink);
-
+#endif
}
/* don't free screen itself */
diff --git a/source/blender/editors/screen/SConscript b/source/blender/editors/screen/SConscript
index 5193306df0a..57a8e1ac931 100644
--- a/source/blender/editors/screen/SConscript
+++ b/source/blender/editors/screen/SConscript
@@ -7,4 +7,9 @@ incs = '../include ../../blenlib ../../blenkernel ../../makesdna ../../imbuf'
incs += ' ../../blenloader ../../windowmanager ../../python ../../makesrna'
incs += ' #/intern/guardedalloc #/extern/glew/include'
-env.BlenderLib ( 'bf_editors_screen', sources, Split(incs), [], libtype=['core','intern'], priority=[30, 35] )
+defs = ''
+
+if not env['WITH_BF_PYTHON']:
+ defs += 'DISABLE_PYTHON'
+
+env.BlenderLib ( 'bf_editors_screen', sources, Split(incs), Split(defs), libtype=['core','intern'], priority=[30, 35] )
diff --git a/source/blender/editors/screen/area.c b/source/blender/editors/screen/area.c
index 7822ada7a09..58be3b9b334 100644
--- a/source/blender/editors/screen/area.c
+++ b/source/blender/editors/screen/area.c
@@ -52,7 +52,9 @@
#include "UI_resources.h"
+#ifndef DISABLE_PYTHON
#include "BPY_extern.h"
+#endif
#include "screen_intern.h"
@@ -420,11 +422,12 @@ void area_copy_data(ScrArea *sa1, ScrArea *sa2, int swap_space)
ar->swinid= 0;
}
+#ifndef DISABLE_PYTHON
/* scripts */
BPY_free_scriptlink(&sa1->scriptlink);
sa1->scriptlink= sa2->scriptlink;
BPY_copy_scriptlink(&sa1->scriptlink); /* copies internal pointers */
-
+#endif
}