diff options
author | Campbell Barton <ideasman42@gmail.com> | 2010-04-23 15:48:17 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2010-04-23 15:48:17 +0400 |
commit | 4a51b140cd61bae73de632e3593a05c536456159 (patch) | |
tree | d76e55cc0fcaa03fd3d678412eda31dd208508fd /source/blender/blenkernel/intern/report.c | |
parent | 08775e8f145a863938c982d18191d1d55a517f98 (diff) |
always print reports immediately when running in background mode.
Diffstat (limited to 'source/blender/blenkernel/intern/report.c')
-rw-r--r-- | source/blender/blenkernel/intern/report.c | 5 |
1 files changed, 5 insertions, 0 deletions
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 <stdarg.h> #include <stdio.h> @@ -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 */ |