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:
authorGaia Clary <gaia.clary@machinimatrix.org>2018-02-01 02:43:01 +0300
committerGaia Clary <gaia.clary@machinimatrix.org>2018-02-01 02:43:01 +0300
commit4bd72586aa2ef6b0f595790ef4d066e9c18d487b (patch)
treeffa3872304c2c09f6beb13f427029c0faf1df8d0 /source/blender/collada
parent4b5ac3b7688d9ecd74e3ac22f3ec6749f989f8af (diff)
parent22faf66c8b7ebb79405b87a74edfdc78a7f26fb0 (diff)
Merge branch 'master' into blender2.8
Apply Fix T50198 also in blender2.8
Diffstat (limited to 'source/blender/collada')
-rw-r--r--source/blender/collada/ErrorHandler.cpp15
1 files changed, 8 insertions, 7 deletions
diff --git a/source/blender/collada/ErrorHandler.cpp b/source/blender/collada/ErrorHandler.cpp
index 32aa5636e08..7e18328f000 100644
--- a/source/blender/collada/ErrorHandler.cpp
+++ b/source/blender/collada/ErrorHandler.cpp
@@ -49,7 +49,10 @@ ErrorHandler::~ErrorHandler()
//--------------------------------------------------------------------
bool ErrorHandler::handleError(const COLLADASaxFWL::IError *error)
{
- bool isError = false;
+ /* This method must return true when Collada should continue.
+ See https://github.com/KhronosGroup/OpenCOLLADA/issues/442
+ */
+ bool isWarning = false;
if (error->getErrorClass() == COLLADASaxFWL::IError::ERROR_SAXPARSER) {
COLLADASaxFWL::SaxParserError *saxParserError = (COLLADASaxFWL::SaxParserError *) error;
@@ -58,14 +61,14 @@ bool ErrorHandler::handleError(const COLLADASaxFWL::IError *error)
// Workaround to avoid wrong error
if (parserError.getErrorType() == GeneratedSaxParser::ParserError::ERROR_VALIDATION_MIN_OCCURS_UNMATCHED) {
if (STREQ(parserError.getElement(), "effect")) {
- isError = false;
+ isWarning = true;
}
}
if (parserError.getErrorType() == GeneratedSaxParser::ParserError::ERROR_VALIDATION_SEQUENCE_PREVIOUS_SIBLING_NOT_PRESENT) {
if (!(STREQ(parserError.getElement(), "extra") &&
STREQ(parserError.getAdditionalText().c_str(), "sibling: fx_profile_abstract")))
{
- isError = false;
+ isWarning = true;
}
}
@@ -81,14 +84,12 @@ bool ErrorHandler::handleError(const COLLADASaxFWL::IError *error)
* Accept non critical errors as warnings (i.e. texture not found)
* This makes the importer more graceful, so it now imports what makes sense.
*/
- isError = (saxFWLError->getSeverity() != COLLADASaxFWL::IError::SEVERITY_ERROR_NONCRITICAL);
+ isWarning = (saxFWLError->getSeverity() == COLLADASaxFWL::IError::SEVERITY_ERROR_NONCRITICAL);
std::cout << "Sax FWL Error: " << saxFWLError->getErrorMessage() << std::endl;
}
else {
std::cout << "opencollada error: " << error->getFullErrorMessage() << std::endl;
}
- mError |= isError;
-
- return isError; // let OpenCollada decide when to abort
+ return isWarning;
}