obj loader: added multiline support
collada loaded: bug fixed when importing several files, whith one containing animationpull/297/head
parent
e09d88fa59
commit
16ae05eeeb
|
@ -133,6 +133,7 @@ void ColladaLoader::InternReadFile( const std::string& pFile, aiScene* pScene, I
|
|||
mLights.clear();
|
||||
mCameras.clear();
|
||||
mTextures.clear();
|
||||
mAnims.clear();
|
||||
|
||||
// parse the input file
|
||||
ColladaParser parser( pIOHandler, pFile);
|
||||
|
@ -904,6 +905,8 @@ void ColladaLoader::StoreAnimations( aiScene* pScene, const ColladaParser& pPars
|
|||
pScene->mAnimations = new aiAnimation*[mAnims.size()];
|
||||
std::copy( mAnims.begin(), mAnims.end(), pScene->mAnimations);
|
||||
}
|
||||
|
||||
mAnims.clear();
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
|
|
|
@ -139,7 +139,23 @@ void ObjFileImporter::InternReadFile( const std::string& pFile, aiScene* pScene,
|
|||
{
|
||||
strModelName = pFile;
|
||||
}
|
||||
|
||||
|
||||
// process all '\'
|
||||
std::vector<char> ::iterator iter = m_Buffer.begin();
|
||||
while (iter != m_Buffer.end())
|
||||
{
|
||||
if (*iter == '\\')
|
||||
{
|
||||
// remove '\'
|
||||
iter = m_Buffer.erase(iter);
|
||||
// remove next character
|
||||
while (*iter == '\r' || *iter == '\n')
|
||||
iter = m_Buffer.erase(iter);
|
||||
}
|
||||
else
|
||||
++iter;
|
||||
}
|
||||
|
||||
// parse the file into a temporary representation
|
||||
ObjFileParser parser(m_Buffer, strModelName, pIOHandler);
|
||||
|
||||
|
|
Loading…
Reference in New Issue