2.5 / SCons
authorNathan Letwory <nathan@letworyinteractive.com>
Thu, 25 Dec 2008 16:02:35 +0000 (16:02 +0000)
committerNathan Letwory <nathan@letworyinteractive.com>
Thu, 25 Dec 2008 16:02:35 +0000 (16:02 +0000)
Make sure we can build WITH_BF_PYTHON=False

source/blender/editors/space_script/SConscript
source/blender/editors/space_script/script_edit.c

index 8bf0447a6a0232c87fc87f0965b9fc8a1f06e44e..a78f1a66762b9381028325a4cb31eab4939bde59 100644 (file)
@@ -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] )
index 64220611d4f1ead09dcea15d4f3f0b1a0e420107..5ecf7be615cd9f8813cdcb81f37c5dd3e5dd69ba 100644 (file)
 
 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;