diff options
author | Nathan Letwory <nathan@letworyinteractive.com> | 2008-12-25 19:02:35 +0300 |
---|---|---|
committer | Nathan Letwory <nathan@letworyinteractive.com> | 2008-12-25 19:02:35 +0300 |
commit | 00fd6c5b007be5c2f012fd3dcb03f0ad949993b0 (patch) | |
tree | 1bd65dd13e523261028d39526e43e08dbd86af47 /source | |
parent | de9437e57ab34b7ef3e1f8777e7ac1fa09efa785 (diff) |
2.5 / SCons
Make sure we can build WITH_BF_PYTHON=False
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/editors/space_script/SConscript | 6 | ||||
-rw-r--r-- | source/blender/editors/space_script/script_edit.c | 5 |
2 files changed, 7 insertions, 4 deletions
diff --git a/source/blender/editors/space_script/SConscript b/source/blender/editors/space_script/SConscript index 8bf0447a6a0..a78f1a66762 100644 --- a/source/blender/editors/space_script/SConscript +++ b/source/blender/editors/space_script/SConscript @@ -8,5 +8,9 @@ incs += ' ../../windowmanager #/intern/guardedalloc #/extern/glew/include' incs += ' ../../makesrna' incs += ' ../../python' +defs = [] -env.BlenderLib ( 'bf_editors_space_script', sources, Split(incs), [], libtype=['core'], priority=[90] ) +if not env['WITH_BF_PYTHON']: + defs.append('DISABLE_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 64220611d4f..5ecf7be615c 100644 --- a/source/blender/editors/space_script/script_edit.c +++ b/source/blender/editors/space_script/script_edit.c @@ -61,14 +61,13 @@ static int run_pyfile_exec(bContext *C, wmOperator *op) { - ScrArea *sa= CTX_wm_area(C); ARegion *ar= CTX_wm_region(C); char filename[512]; RNA_string_get(op->ptr, "filename", filename); - +#ifndef DISABLE_PYTHON BPY_run_python_script(C, filename); - +#endif ED_region_tag_redraw(ar); return OPERATOR_FINISHED; |