allow building without python

This commit is contained in:
Campbell Barton
2008-11-24 21:57:58 +00:00
parent f7de8cee28
commit bd08d9e1a2
3 changed files with 14 additions and 3 deletions

View File

@@ -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 */

View File

@@ -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] )

View File

@@ -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
}