Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2011-02-01 15:37:53 +0300
committerCampbell Barton <ideasman42@gmail.com>2011-02-01 15:37:53 +0300
commitffe7bde02c5725993e9c1986bbc8a83174adbbb8 (patch)
tree14ba26e8e892b701a4cfc4daf9c6cfe1baaad285 /source/blender/blenkernel/intern/report.c
parent86f3ba24e4bc5f01b1730d1b48b74b6ce4c659fd (diff)
correct fix for bug #23871, __main__ module was being overwritten in nested functions, so on returning from calling operators the __main__ module could be cleared and imported modules turn into None
calling bpy.ops.wm.read_factory_settings() ... would clear a scripts namespace if running directly, not in a module. Fix by backing up and restoring the __main__ module. Also found BKE_reportf wasnt printing all reports in background mode as BKE_report() was doing.
Diffstat (limited to 'source/blender/blenkernel/intern/report.c')
-rw-r--r--source/blender/blenkernel/intern/report.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/report.c b/source/blender/blenkernel/intern/report.c
index e623c095ac7..044e1350be1 100644
--- a/source/blender/blenkernel/intern/report.c
+++ b/source/blender/blenkernel/intern/report.c
@@ -124,7 +124,7 @@ void BKE_reportf(ReportList *reports, ReportType type, const char *format, ...)
Report *report;
va_list args;
- if(!reports || ((reports->flag & RPT_PRINT) && (type >= reports->printlevel))) {
+ if(G.background || !reports || ((reports->flag & RPT_PRINT) && (type >= reports->printlevel))) {
va_start(args, format);
vprintf(format, args);
va_end(args);