diff options
Diffstat (limited to 'source/blender/editors/space_script')
4 files changed, 9 insertions, 10 deletions
diff --git a/source/blender/editors/space_script/CMakeLists.txt b/source/blender/editors/space_script/CMakeLists.txt index 88c0ea56ab2..17fcf2296e9 100644 --- a/source/blender/editors/space_script/CMakeLists.txt +++ b/source/blender/editors/space_script/CMakeLists.txt @@ -38,8 +38,7 @@ SET(SRC IF(WITH_PYTHON) LIST(APPEND INC ${PYTHON_INC} ../../python) -ELSE(WITH_PYTHON) - ADD_DEFINITIONS(-DDISABLE_PYTHON) + ADD_DEFINITIONS(-DWITH_PYTHON) ENDIF(WITH_PYTHON) BLENDERLIB(bf_editor_space_script "${SRC}" "${INC}") diff --git a/source/blender/editors/space_script/SConscript b/source/blender/editors/space_script/SConscript index f187df19117..8c75b999bc0 100644 --- a/source/blender/editors/space_script/SConscript +++ b/source/blender/editors/space_script/SConscript @@ -10,7 +10,7 @@ incs += ' ../../python' defs = [] -if not env['WITH_BF_PYTHON']: - defs.append('DISABLE_PYTHON') +if env['WITH_BF_PYTHON']: + defs.append('WITH_PYTHON') env.BlenderLib ( 'bf_editors_space_script', sources, Split(incs), defs, libtype=['core'], priority=[90] ) diff --git a/source/blender/editors/space_script/script_edit.c b/source/blender/editors/space_script/script_edit.c index 23bc385c758..b9ece0add2f 100644 --- a/source/blender/editors/space_script/script_edit.c +++ b/source/blender/editors/space_script/script_edit.c @@ -46,7 +46,7 @@ #include "script_intern.h" // own include -#ifndef DISABLE_PYTHON +#ifdef WITH_PYTHON #include "BPY_extern.h" /* BPY_run_python_script */ #endif @@ -54,7 +54,7 @@ static int run_pyfile_exec(bContext *C, wmOperator *op) { char path[512]; RNA_string_get(op->ptr, "filepath", path); -#ifndef DISABLE_PYTHON +#ifdef WITH_PYTHON if(BPY_run_python_script(C, path, NULL, op->reports)) { ARegion *ar= CTX_wm_region(C); ED_region_tag_redraw(ar); @@ -84,7 +84,7 @@ void SCRIPT_OT_python_file_run(wmOperatorType *ot) static int script_reload_exec(bContext *C, wmOperator *UNUSED(op)) { -#ifndef DISABLE_PYTHON +#ifdef WITH_PYTHON /* TODO, this crashes on netrender and keying sets, need to look into why * disable for now unless running in debug mode */ WM_cursor_wait(1); diff --git a/source/blender/editors/space_script/space_script.c b/source/blender/editors/space_script/space_script.c index 2036b0f730a..57d7bba8e3b 100644 --- a/source/blender/editors/space_script/space_script.c +++ b/source/blender/editors/space_script/space_script.c @@ -49,7 +49,7 @@ #include "UI_resources.h" #include "UI_view2d.h" -#ifndef DISABLE_PYTHON +#ifdef WITH_PYTHON #include "BPY_extern.h" #endif @@ -94,7 +94,7 @@ static void script_free(SpaceLink *sl) { SpaceScript *sscript= (SpaceScript*) sl; -#ifndef DISABLE_PYTHON +#ifdef WITH_PYTHON /*free buttons references*/ if (sscript->but_refs) { // XXX BPy_Set_DrawButtonsList(sscript->but_refs); @@ -150,7 +150,7 @@ static void script_main_area_draw(const bContext *C, ARegion *ar) /* data... */ // BPY_run_python_script(C, "/root/blender-svn/blender25/test.py", NULL); -#ifndef DISABLE_PYTHON +#ifdef WITH_PYTHON if (sscript->script) { //BPY_run_python_script_space(scpt->script.filename, NULL); BPY_run_script_space_draw(C, sscript); |