X3D importer: Fixed handling of inlined files
parent
840ed9dd34
commit
6118f77d3b
|
@ -1666,8 +1666,10 @@ const aiImporterDesc* X3DImporter::GetInfo () const
|
|||
|
||||
void X3DImporter::InternReadFile(const std::string& pFile, aiScene* pScene, IOSystem* pIOHandler)
|
||||
{
|
||||
mpIOHandler = pIOHandler;
|
||||
|
||||
Clear();// delete old graph.
|
||||
mFileDir = DefaultIOSystem::absolutePath(pFile);
|
||||
pIOHandler->PushDirectory(DefaultIOSystem::absolutePath(pFile));
|
||||
ParseFile(pFile, pIOHandler);
|
||||
//
|
||||
// Assimp use static arrays of objects for fast speed of rendering. That's good, but need some additional operations/
|
||||
|
|
|
@ -833,7 +833,7 @@ private:
|
|||
/***********************************************/
|
||||
CX3DImporter_NodeElement* NodeElement_Cur;///< Current element.
|
||||
irr::io::IrrXMLReader* mReader;///< Pointer to XML-reader object
|
||||
std::string mFileDir;
|
||||
IOSystem *mpIOHandler;
|
||||
};// class X3DImporter
|
||||
|
||||
}// namespace Assimp
|
||||
|
|
|
@ -89,12 +89,13 @@ void X3DImporter::ParseNode_Networking_Inline()
|
|||
|
||||
if(load && (url.size() > 0))
|
||||
{
|
||||
DefaultIOSystem io_handler;
|
||||
std::string full_path;
|
||||
|
||||
full_path = mFileDir + "/" + url.front();
|
||||
full_path = mpIOHandler->CurrentDirectory() + "/" + url.front();
|
||||
// Attribute "url" can contain list of strings. But we need only one - first.
|
||||
ParseFile(full_path, &io_handler);
|
||||
mpIOHandler->PushDirectory(DefaultIOSystem::absolutePath(full_path));
|
||||
ParseFile(full_path, mpIOHandler);
|
||||
mpIOHandler->PopDirectory();
|
||||
}
|
||||
|
||||
// check for X3DMetadataObject childs.
|
||||
|
|
Loading…
Reference in New Issue