colladaloader: fix <extra> handling.

git-svn-id: https://assimp.svn.sourceforge.net/svnroot/assimp/trunk@730 67173fc5-114c-0410-ac8e-9d2fd5bffc1f
pull/1/head
aramis_acg 2010-05-20 13:41:03 +00:00
parent b9b4ea177b
commit 367a452ed9
1 changed files with 6 additions and 15 deletions

View File

@ -1113,7 +1113,7 @@ void ColladaParser::ReadEffectProfileCommon( Collada::Effect& pEffect)
pEffect.mParams[sid] = EffectParam(); pEffect.mParams[sid] = EffectParam();
ReadEffectParam( pEffect.mParams[sid]); ReadEffectParam( pEffect.mParams[sid]);
} }
else if( IsElement( "technique")) else if( IsElement( "technique") || IsElement( "extra"))
{ {
// just syntactic sugar // just syntactic sugar
} }
@ -1182,19 +1182,10 @@ void ColladaParser::ReadEffectProfileCommon( Collada::Effect& pEffect)
SkipElement(); SkipElement();
} }
} }
else if( mReader->getNodeType() == irr::io::EXN_ELEMENT_END) else if( mReader->getNodeType() == irr::io::EXN_ELEMENT_END) {
{ if( strcmp( mReader->getNodeName(), "profile_COMMON") == 0)
if( strcmp( mReader->getNodeName(), "technique") == 0)
{
// ignore silently - just syntactic sugar
}
else if( strcmp( mReader->getNodeName(), "profile_COMMON") == 0)
{ {
break; break;
} else
{
// might also be the end of "phong", "blinn", "constant" or "lambert"
// ThrowException( "Expected end of \"profile_COMMON\" element.");
} }
} }
} }
@ -1221,7 +1212,7 @@ void ColladaParser::ReadSamplerProperties( Sampler& out )
out.mWrapU = ReadBoolFromTextContent(); out.mWrapU = ReadBoolFromTextContent();
TestClosing( "wrapV"); TestClosing( "wrapV");
} }
if( IsElement( "mirrorU")) { else if( IsElement( "mirrorU")) {
out.mMirrorU = ReadBoolFromTextContent(); out.mMirrorU = ReadBoolFromTextContent();
TestClosing( "mirrorU"); TestClosing( "mirrorU");
} }
@ -1348,7 +1339,7 @@ void ColladaParser::ReadEffectColor( aiColor4D& pColor, Sampler& pSampler)
} }
else SkipElement(); else SkipElement();
} }
else else if( !IsElement( "extra"))
{ {
// ignore the rest // ignore the rest
SkipElement(); SkipElement();