diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-03-04 20:01:33 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-03-04 20:01:33 +0300 |
commit | 9d5c6bbe3dd5ebb7de05db482940b3e7207e8cd4 (patch) | |
tree | 786dc500b2a6681ebec52cd141bda1ecb706f375 /source/blender/editors/space_text | |
parent | 7006038b02c797a5e485518b8137ea2738290528 (diff) |
quiet warnings and fix building without python.
Diffstat (limited to 'source/blender/editors/space_text')
-rw-r--r-- | source/blender/editors/space_text/text_ops.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/source/blender/editors/space_text/text_ops.c b/source/blender/editors/space_text/text_ops.c index e7a2ad6eb57..0065c3317b8 100644 --- a/source/blender/editors/space_text/text_ops.c +++ b/source/blender/editors/space_text/text_ops.c @@ -572,6 +572,7 @@ static int run_script_poll(bContext *C) static int run_script(bContext *C, ReportList *reports) { +#ifdef WITH_PYTHON Text *text= CTX_data_edit_text(C); const short is_live= (reports == NULL); @@ -596,6 +597,10 @@ static int run_script(bContext *C, ReportList *reports) BKE_report(reports, RPT_ERROR, "Python script fail, look in the console for now..."); } +#else + (void)C; + (void)reports; +#endif /* !WITH_PYTHON */ return OPERATOR_CANCELLED; } @@ -792,7 +797,7 @@ static int paste_exec(bContext *C, wmOperator *op) /* run the script while editing, evil but useful */ if(CTX_wm_space_text(C)->live_edit) run_script(C, NULL); - + return OPERATOR_FINISHED; } @@ -863,7 +868,7 @@ static int cut_exec(bContext *C, wmOperator *UNUSED(op)) /* run the script while editing, evil but useful */ if(CTX_wm_space_text(C)->live_edit) run_script(C, NULL); - + return OPERATOR_FINISHED; } |