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:
Diffstat (limited to 'source/blender/collada/DocumentImporter.cpp')
-rw-r--r--source/blender/collada/DocumentImporter.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/source/blender/collada/DocumentImporter.cpp b/source/blender/collada/DocumentImporter.cpp
index 586c6ccfe82..366837421e3 100644
--- a/source/blender/collada/DocumentImporter.cpp
+++ b/source/blender/collada/DocumentImporter.cpp
@@ -76,6 +76,7 @@
#include "MEM_guardedalloc.h"
#include "ExtraHandler.h"
+#include "ErrorHandler.h"
#include "DocumentImporter.h"
#include "TransformReader.h"
@@ -113,17 +114,19 @@ DocumentImporter::~DocumentImporter()
bool DocumentImporter::import()
{
- /** TODO Add error handler (implement COLLADASaxFWL::IErrorHandler */
- COLLADASaxFWL::Loader loader;
+ ErrorHandler errorHandler;
+ COLLADASaxFWL::Loader loader(&errorHandler);
COLLADAFW::Root root(&loader, this);
ExtraHandler *ehandler = new ExtraHandler(this, &(this->anim_importer));
loader.registerExtraDataCallbackHandler(ehandler);
-
if (!root.loadDocument(mFilename))
return false;
+ if(errorHandler.hasError())
+ return false;
+
/** TODO set up scene graph and such here */
mImportStage = Controller;