diff options
author | Nathan Letwory <nathan@letworyinteractive.com> | 2011-09-06 00:41:58 +0400 |
---|---|---|
committer | Nathan Letwory <nathan@letworyinteractive.com> | 2011-09-06 00:41:58 +0400 |
commit | 6e9ff495eb082aeb49e6a1da23a7827d3fcd0fde (patch) | |
tree | 4f3c39b88d524edf516c232c9ee298d738dab87a /source/blender/windowmanager/intern/wm_operators.c | |
parent | 59a823c48aec80a48b39e27f8474302caf2dbf26 (diff) |
Add parser error handler.
OpenCOLLADA is a validating parser, so is pretty strict about document form. The added error handler will print out any errors the parser finds. A pop-up will be shown too, advising the user to check the console for the error log.
Diffstat (limited to 'source/blender/windowmanager/intern/wm_operators.c')
-rw-r--r-- | source/blender/windowmanager/intern/wm_operators.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/windowmanager/intern/wm_operators.c b/source/blender/windowmanager/intern/wm_operators.c index 0e0203543a4..68a4eebf93f 100644 --- a/source/blender/windowmanager/intern/wm_operators.c +++ b/source/blender/windowmanager/intern/wm_operators.c @@ -2082,7 +2082,9 @@ static int wm_collada_import_exec(bContext *C, wmOperator *op) } RNA_string_get(op->ptr, "filepath", filename); - collada_import(C, filename); + if(collada_import(C, filename)) return OPERATOR_FINISHED; + + BKE_report(op->reports, RPT_ERROR, "Errors found during parsing COLLADA document. Please see console for error log."); return OPERATOR_FINISHED; } |