- Bugfix: ColladaParser now properly tunnels XML reading through the Assimp IO System
- Bugfix: IrrXML-IOWrapper now properly inherits the irr interface - moved some "using namespace" directives out of the header git-svn-id: https://assimp.svn.sourceforge.net/svnroot/assimp/trunk@351 67173fc5-114c-0410-ac8e-9d2fd5bffc1f
This commit is contained in:
@@ -55,7 +55,7 @@ using namespace Assimp::Collada;
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
// Constructor to be privately used by Importer
|
||||
ColladaParser::ColladaParser( const std::string& pFile)
|
||||
ColladaParser::ColladaParser( IOSystem* pIOHandler, const std::string& pFile)
|
||||
: mFileName( pFile)
|
||||
{
|
||||
mRootNode = NULL;
|
||||
@@ -65,8 +65,14 @@ ColladaParser::ColladaParser( const std::string& pFile)
|
||||
// We assume the newest file format by default
|
||||
mFormat = FV_1_5_n;
|
||||
|
||||
// open the file
|
||||
boost::scoped_ptr<IOStream> file( pIOHandler->Open( pFile));
|
||||
if( file.get() == NULL)
|
||||
throw new ImportErrorException( "Failed to open file " + pFile + ".");
|
||||
|
||||
// generate a XML reader for it
|
||||
mReader = irr::io::createIrrXMLReader( pFile.c_str());
|
||||
boost::scoped_ptr<CIrrXML_IOStreamReader> mIOWrapper( new CIrrXML_IOStreamReader( file.get()));
|
||||
mReader = irr::io::createIrrXMLReader( mIOWrapper.get());
|
||||
if( !mReader)
|
||||
ThrowException( "Collada: Unable to open file.");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user