diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2008-12-29 16:38:08 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2008-12-29 16:38:08 +0300 |
commit | 0a8a00cd1060ee7aa9eae4223fc8c2577533247f (patch) | |
tree | 6dc09a68c1d8e35bd807d784f3507b57c9c1f62f /source/blender/windowmanager/intern/wm.c | |
parent | d51bc24384a70f3cdcd4b72091873c96d542d642 (diff) |
2.5: Error reporting
* Added a report list to operator, to which they can report errors and
warnings. When the operator ends, it will display them with a popup. For
python these should become exceptions when calling operators.
* Added a function to make a popup menu from a report list.
* Also added a utility function to prepend a string before the reports to
indicate what they relates to. Also made the report functions used
BLI_dynstr to simplify the code.
* Made file reading and writing report errors to the user again using this
system, also replacing the left over uncommented bad level error() calls.
Diffstat (limited to 'source/blender/windowmanager/intern/wm.c')
-rw-r--r-- | source/blender/windowmanager/intern/wm.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/source/blender/windowmanager/intern/wm.c b/source/blender/windowmanager/intern/wm.c index 725e9cd989e..a5e11a12c5a 100644 --- a/source/blender/windowmanager/intern/wm.c +++ b/source/blender/windowmanager/intern/wm.c @@ -34,9 +34,10 @@ #include "BKE_blender.h" #include "BKE_context.h" +#include "BKE_idprop.h" #include "BKE_library.h" #include "BKE_main.h" -#include "BKE_idprop.h" +#include "BKE_report.h" #include "WM_api.h" #include "WM_types.h" @@ -65,6 +66,11 @@ void WM_operator_free(wmOperator *op) if(op->ptr) MEM_freeN(op->ptr); + if(op->reports) { + BKE_reports_clear(op->reports); + MEM_freeN(op->reports); + } + MEM_freeN(op); } |