diff options
author | Campbell Barton <ideasman42@gmail.com> | 2010-10-31 07:11:39 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2010-10-31 07:11:39 +0300 |
commit | 0876fce0094ad3e37be4b197ef8850757eacd37b (patch) | |
tree | bdcd409899a59f1d0239b14d0ec79a7e5f531a06 /source/blender/windowmanager | |
parent | 50dab4fc37d33352c2f1c6181da9d54799e36a12 (diff) |
rename and negate DISABLE_PYTHON --> WITH_PYTHON
Diffstat (limited to 'source/blender/windowmanager')
-rw-r--r-- | source/blender/windowmanager/CMakeLists.txt | 3 | ||||
-rw-r--r-- | source/blender/windowmanager/SConscript | 4 | ||||
-rw-r--r-- | source/blender/windowmanager/intern/wm.c | 4 | ||||
-rw-r--r-- | source/blender/windowmanager/intern/wm_files.c | 6 | ||||
-rw-r--r-- | source/blender/windowmanager/intern/wm_init_exit.c | 10 |
5 files changed, 13 insertions, 14 deletions
diff --git a/source/blender/windowmanager/CMakeLists.txt b/source/blender/windowmanager/CMakeLists.txt index fa3a196d9c5..6c93334fd0a 100644 --- a/source/blender/windowmanager/CMakeLists.txt +++ b/source/blender/windowmanager/CMakeLists.txt @@ -86,8 +86,7 @@ ENDIF(WITH_FFMPEG) IF(WITH_PYTHON) LIST(APPEND INC ../python ${PYTHON_INC}) -ELSE(WITH_PYTHON) - ADD_DEFINITIONS(-DDISABLE_PYTHON) + ADD_DEFINITIONS(-DWITH_PYTHON) ENDIF(WITH_PYTHON) IF(WITH_GAMEENGINE) diff --git a/source/blender/windowmanager/SConscript b/source/blender/windowmanager/SConscript index 51168d7a9d3..cbaf74ddc10 100644 --- a/source/blender/windowmanager/SConscript +++ b/source/blender/windowmanager/SConscript @@ -16,8 +16,8 @@ incs += ' #/intern/elbeem #/extern/glew/include' defs = [ 'GLEW_STATIC' ] -if not env['WITH_BF_PYTHON']: - defs.append('DISABLE_PYTHON') +if env['WITH_BF_PYTHON']: + defs.append('WITH_PYTHON') if env['WITH_BF_COLLADA']: defs.append('WITH_COLLADA') diff --git a/source/blender/windowmanager/intern/wm.c b/source/blender/windowmanager/intern/wm.c index 5c4912d7aee..426069245c3 100644 --- a/source/blender/windowmanager/intern/wm.c +++ b/source/blender/windowmanager/intern/wm.c @@ -58,7 +58,7 @@ #include "ED_screen.h" -#ifndef DISABLE_PYTHON +#ifdef WITH_PYTHON #include "BPY_extern.h" #endif @@ -69,7 +69,7 @@ void WM_operator_free(wmOperator *op) { -#ifndef DISABLE_PYTHON +#ifdef WITH_PYTHON if(op->py_instance) { /* do this first incase there are any __del__ functions or * similar that use properties */ diff --git a/source/blender/windowmanager/intern/wm_files.c b/source/blender/windowmanager/intern/wm_files.c index 6db7f2554c4..aa99e8fcb1c 100644 --- a/source/blender/windowmanager/intern/wm_files.c +++ b/source/blender/windowmanager/intern/wm_files.c @@ -96,7 +96,7 @@ #include "GPU_draw.h" -#ifndef DISABLE_PYTHON +#ifdef WITH_PYTHON #include "BPY_extern.h" #endif @@ -317,7 +317,7 @@ void WM_read_file(bContext *C, char *name, ReportList *reports) ED_editors_init(C); DAG_on_load_update(CTX_data_main(C)); -#ifndef DISABLE_PYTHON +#ifdef WITH_PYTHON /* run any texts that were loaded in and flagged as modules */ BPY_load_user_modules(C); #endif @@ -400,7 +400,7 @@ int WM_read_homefile(bContext *C, wmOperator *op) ED_editors_init(C); DAG_on_load_update(CTX_data_main(C)); -#ifndef DISABLE_PYTHON +#ifdef WITH_PYTHON if(CTX_py_init_get(C)) { /* sync addons, these may have changed from the defaults */ BPY_eval_string(C, "__import__('bpy').utils.addon_reset_all()"); diff --git a/source/blender/windowmanager/intern/wm_init_exit.c b/source/blender/windowmanager/intern/wm_init_exit.c index b8e6cf5424d..d98459a113c 100644 --- a/source/blender/windowmanager/intern/wm_init_exit.c +++ b/source/blender/windowmanager/intern/wm_init_exit.c @@ -61,11 +61,11 @@ #include "RE_pipeline.h" /* RE_ free stuff */ -#ifndef DISABLE_PYTHON +#ifdef WITH_PYTHON #include "BPY_extern.h" #endif -#ifdef WITH_GAME_ENGINE +#ifdef WITH_GAMEENGINE #include "SYS_System.h" #endif @@ -143,7 +143,7 @@ void WM_init(bContext *C, int argc, char **argv) * before WM_read_homefile() or make py-drivers check if python is running. * Will try fix when the crash can be repeated. - campbell. */ -#ifndef DISABLE_PYTHON +#ifdef WITH_PYTHON BPY_set_context(C); /* necessary evil */ BPY_start_python(argc, argv); BPY_load_user_modules(C); @@ -398,7 +398,7 @@ void WM_exit(bContext *C) // free_txt_data(); -#ifndef DISABLE_PYTHON +#ifdef WITH_PYTHON /* XXX - old note */ /* before free_blender so py's gc happens while library still exists */ /* needed at least for a rare sigsegv that can happen in pydrivers */ @@ -434,7 +434,7 @@ void WM_exit(bContext *C) wm_ghost_exit(); CTX_free(C); -#ifdef WITH_GAME_ENGINE +#ifdef WITH_GAMEENGINE SYS_DeleteSystem(SYS_GetSystem()); #endif if(MEM_get_memory_blocks_in_use()!=0) { |