Fix usage of AI_MATKEY_UVTRANSFORM in LWO loader. The buffer was incorrectly dimensioned, random data got pulled into the material key's data section. This fixes a few failures in the regression testing suite.

git-svn-id: https://assimp.svn.sourceforge.net/svnroot/assimp/trunk@603 67173fc5-114c-0410-ac8e-9d2fd5bffc1f
This commit is contained in:
aramis_acg
2010-03-13 12:59:50 +00:00
parent b56f35c2b8
commit ebc03be3ac

View File

@@ -157,7 +157,8 @@ bool LWOImporter::HandleTextures(MaterialHelper* pcMat, const TextureList& in, a
trafo.mScaling.x = (*it).wrapAmountW;
trafo.mScaling.y = (*it).wrapAmountH;
pcMat->AddProperty((float*)&trafo,sizeof(aiUVTransform),AI_MATKEY_UVTRANSFORM(type,cur));
BOOST_STATIC_ASSERT(sizeof(aiUVTransform)/sizeof(float) == 5);
pcMat->AddProperty((float*)&trafo,5,AI_MATKEY_UVTRANSFORM(type,cur));
}
DefaultLogger::get()->debug("LWO2: Setting up non-UV mapping");
}