From 4a51b140cd61bae73de632e3593a05c536456159 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 23 Apr 2010 11:48:17 +0000 Subject: always print reports immediately when running in background mode. --- source/blender/blenkernel/intern/report.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'source/blender/blenkernel/intern/report.c') diff --git a/source/blender/blenkernel/intern/report.c b/source/blender/blenkernel/intern/report.c index a7800ddc12a..da8b018d3f8 100644 --- a/source/blender/blenkernel/intern/report.c +++ b/source/blender/blenkernel/intern/report.c @@ -31,6 +31,7 @@ #include "BLI_dynstr.h" #include "BKE_report.h" +#include "BKE_global.h" /* G.background only */ #include #include @@ -93,6 +94,10 @@ void BKE_report(ReportList *reports, ReportType type, const char *message) Report *report; int len; + /* exception, print and return in background, no reason to store a list */ + if(G.background) + reports= NULL; + if(!reports || ((reports->flag & RPT_PRINT) && (type >= reports->printlevel))) { printf("%s: %s\n", report_type_str(type), message); fflush(stdout); /* this ensures the message is printed before a crash */ -- cgit v1.2.3