FIX: ColladaLoader now skips empty init_from-Tags produced by C4D's heroic Collada exporter.
git-svn-id: https://assimp.svn.sourceforge.net/svnroot/assimp/trunk@496 67173fc5-114c-0410-ac8e-9d2fd5bffc1f
This commit is contained in:
@@ -704,10 +704,16 @@ void ColladaParser::ReadImage( Collada::Image& pImage)
|
||||
{
|
||||
if (mFormat == FV_1_4_n)
|
||||
{
|
||||
// element content is filename - hopefully
|
||||
const char* sz = TestTextContent();
|
||||
if (sz)pImage.mFileName = sz;
|
||||
TestClosing( "init_from");
|
||||
// FIX: C4D exporter writes empty <init_from/> tags
|
||||
if (!mReader->isEmptyElement()) {
|
||||
// element content is filename - hopefully
|
||||
const char* sz = TestTextContent();
|
||||
if (sz)pImage.mFileName = sz;
|
||||
TestClosing( "init_from");
|
||||
}
|
||||
if (!pImage.mFileName.length()) {
|
||||
pImage.mFileName = "unknown_texture";
|
||||
}
|
||||
}
|
||||
else if (mFormat == FV_1_5_n)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user