diff --git a/code/ColladaLoader.cpp b/code/ColladaLoader.cpp index 0cd6cb104..195ddf5ff 100644 --- a/code/ColladaLoader.cpp +++ b/code/ColladaLoader.cpp @@ -504,7 +504,8 @@ void ColladaLoader::BuildMeshesForNode( const ColladaParser& pParser, const Coll // assign the material index dstMesh->mMaterialIndex = matIdx; - } + dstMesh->mName = mid.mMeshOrController; + } } } diff --git a/code/ColladaParser.cpp b/code/ColladaParser.cpp index 78b66bd62..3797977ba 100644 --- a/code/ColladaParser.cpp +++ b/code/ColladaParser.cpp @@ -1795,14 +1795,13 @@ void ColladaParser::ReadAccessor( const std::string& pID) SkipElement(); } else { - ThrowException( "Unexpected sub element in tag \"accessor\"."); + ThrowException( boost::str( boost::format( "Unexpected sub element <%s> in tag ") % mReader->getNodeName())); } } else if( mReader->getNodeType() == irr::io::EXN_ELEMENT_END) { if( strcmp( mReader->getNodeName(), "accessor") != 0) - ThrowException( "Expected end of \"accessor\" element."); - + ThrowException( "Expected end of element."); break; } } @@ -1826,13 +1825,13 @@ void ColladaParser::ReadVertexData( Mesh* pMesh) ReadInputChannel( pMesh->mPerVertexData); } else { - ThrowException( "Unexpected sub element in tag \"vertices\"."); + ThrowException( boost::str( boost::format( "Unexpected sub element <%s> in tag ") % mReader->getNodeName())); } } else if( mReader->getNodeType() == irr::io::EXN_ELEMENT_END) { if( strcmp( mReader->getNodeName(), "vertices") != 0) - ThrowException( "Expected end of \"vertices\" element."); + ThrowException( "Expected end of element."); break; } @@ -1919,13 +1918,13 @@ void ColladaParser::ReadIndexData( Mesh* pMesh) } } else { - ThrowException( "Unexpected sub element in tag \"vertices\"."); + ThrowException( boost::str( boost::format( "Unexpected sub element <%s> in tag <%s>") % mReader->getNodeName() % elementName)); } } else if( mReader->getNodeType() == irr::io::EXN_ELEMENT_END) { if( mReader->getNodeName() != elementName) - ThrowException( boost::str( boost::format( "Expected end of \"%s\" element.") % elementName)); + ThrowException( boost::str( boost::format( "Expected end of <%s> element.") % elementName)); break; } @@ -2063,7 +2062,7 @@ void ColladaParser::ReadPrimitives( Mesh* pMesh, std::vector& pPer { // warn if the vertex channel does not refer to the element in the same mesh if( input.mAccessor != pMesh->mVertexID) - ThrowException( "Unsupported vertex referencing scheme. I fucking hate Collada."); + ThrowException( "Unsupported vertex referencing scheme."); continue; }