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:
authorMatt Ebb <matt@mke3.net>2010-06-03 11:27:55 +0400
committerMatt Ebb <matt@mke3.net>2010-06-03 11:27:55 +0400
commit21d112c36f661f3ce8648f4eadfe1325929e9184 (patch)
tree0f880b11d750b7d5800154faa67e9920012e8b83 /source/blender/blenkernel/intern/report.c
parent3b6aa5b6a588b76e1ed6f25f11ae77dd07ecfa46 (diff)
Reworked the non-blocking reports display in the info header:
* Now it displays the last report from the global list, not just from operators * Rather than disappearing when a new operator is run, it stays until it times out or a new report is added * Fun animated transitions ;) http://mke3.net/blender/devel/2.5/reports_header.mov Now need to investigate report usage with popups. Ideally we can have most reports non-blocking, so they're less intrusive, only popping up for dire errors. Problem is many things in Blender right now are marked as RPT_ERROR when probably RPT_WARNING is more appropriate. Should probably keep RPT_ERROR for things that demand immediate attention.
Diffstat (limited to 'source/blender/blenkernel/intern/report.c')
-rw-r--r--source/blender/blenkernel/intern/report.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/report.c b/source/blender/blenkernel/intern/report.c
index da8b018d3f8..d5990ce81ec 100644
--- a/source/blender/blenkernel/intern/report.c
+++ b/source/blender/blenkernel/intern/report.c
@@ -32,6 +32,7 @@
#include "BKE_report.h"
#include "BKE_global.h" /* G.background only */
+#include "BKE_utildefines.h"
#include <stdarg.h>
#include <stdio.h>
@@ -262,3 +263,14 @@ void BKE_reports_print(ReportList *reports, ReportType level)
MEM_freeN(cstring);
}
+Report *BKE_reports_last_displayable(ReportList *reports)
+{
+ Report *report=NULL;
+
+ for (report= (Report *)reports->list.last; report; report=report->prev) {
+ if (ELEM3(report->type, RPT_ERROR, RPT_WARNING, RPT_INFO))
+ return report;
+ }
+
+ return NULL;
+} \ No newline at end of file