Fix overall MATKEY_UVTRANSFORM usage to use the provided AddProperty specialization for aiTextureTransform.

git-svn-id: https://assimp.svn.sourceforge.net/svnroot/assimp/trunk@673 67173fc5-114c-0410-ac8e-9d2fd5bffc1f
pull/1/head
aramis_acg 2010-04-11 23:03:30 +00:00
parent 84f576c177
commit 1a1d611038
2 changed files with 3 additions and 6 deletions

View File

@ -91,10 +91,7 @@ bool COBImporter::CanRead( const std::string& pFile, IOSystem* pIOHandler, bool
return true;
}
else if (!extension.length() || checkSig) {
if (!pIOHandler) {
return true;
}
else if ((!extension.length() || checkSig) && pIOHandler) {
const char* tokens[] = {"Caligary"};
return SearchFileHeaderForToken(pIOHandler,pFile,tokens,1);
}
@ -215,7 +212,7 @@ void ConvertTexture(boost::shared_ptr< Texture > tex, MaterialHelper* out, aiTex
{
const aiString path( tex->path );
out->AddProperty(&path,AI_MATKEY_TEXTURE(type,0));
out->AddProperty(&tex->transform,sizeof(aiUVTransform)/sizeof(float),AI_MATKEY_UVTRANSFORM(type,0));
out->AddProperty(&tex->transform,1,AI_MATKEY_UVTRANSFORM(type,0));
}
// ------------------------------------------------------------------------------------------------

View File

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