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:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2008-12-29 16:38:08 +0300
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2008-12-29 16:38:08 +0300
commit0a8a00cd1060ee7aa9eae4223fc8c2577533247f (patch)
tree6dc09a68c1d8e35bd807d784f3507b57c9c1f62f /source/creator
parentd51bc24384a70f3cdcd4b72091873c96d542d642 (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/creator')
-rw-r--r--source/creator/creator.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/source/creator/creator.c b/source/creator/creator.c
index 0d0f4f7bb01..6e62fe10d40 100644
--- a/source/creator/creator.c
+++ b/source/creator/creator.c
@@ -61,6 +61,7 @@
#include "BKE_packedFile.h"
#include "BKE_scene.h"
#include "BKE_node.h"
+#include "BKE_report.h"
#include "IMB_imbuf.h" // for quicktime_init
@@ -71,9 +72,8 @@
#include "RE_pipeline.h"
//XXX #include "playanim_ext.h"
-#include "wm_event_types.h"
#include "ED_datafiles.h"
-//XXX #include "datatoc.h"
+#include "UI_interface.h"
#include "WM_api.h"
@@ -784,7 +784,7 @@ int main(int argc, char **argv)
BLI_convertstringcwd(filename);
if (G.background) {
- int retval = BKE_read_file(C, argv[a], NULL);
+ int retval = BKE_read_file(C, argv[a], NULL, NULL);
// XXX sound_initialize_sounds();
/*we successfully loaded a blend file, get sure that
@@ -797,7 +797,7 @@ int main(int argc, char **argv)
} else {
/* we are not running in background mode here, but start blender in UI mode with
a file - this should do everything a 'load file' does */
- WM_read_file(C, filename);
+ WM_read_file(C, filename, NULL);
}
}
}
@@ -827,7 +827,7 @@ static void error_cb(char *err)
static void mem_error_cb(char *errorStr)
{
- fprintf(stderr, errorStr);
+ fprintf(stderr, "%s", errorStr);
fflush(stderr);
}