From 54a5088e140432e625047e0953d47b2cff4cb8ee Mon Sep 17 00:00:00 2001 From: ulfjorensen Date: Mon, 24 Sep 2012 08:45:23 +0000 Subject: [PATCH] - added a workaround to load Collada files correctly in case the "texcoord" attribute was missing in a element git-svn-id: https://assimp.svn.sourceforge.net/svnroot/assimp/trunk@1303 67173fc5-114c-0410-ac8e-9d2fd5bffc1f --- code/ColladaParser.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/code/ColladaParser.cpp b/code/ColladaParser.cpp index 3797977ba..49b5eb755 100644 --- a/code/ColladaParser.cpp +++ b/code/ColladaParser.cpp @@ -1370,8 +1370,9 @@ void ColladaParser::ReadEffectColor( aiColor4D& pColor, Sampler& pSampler) pSampler.mName = mReader->getAttributeValue( attrTex); // get name of UV source channel - attrTex = GetAttribute( "texcoord"); - pSampler.mUVChannel = mReader->getAttributeValue( attrTex); + attrTex = TestAttribute( "texcoord"); + if( attrTex >= 0 ) + pSampler.mUVChannel = mReader->getAttributeValue( attrTex); //SkipElement(); } else if( IsElement( "technique"))