mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-08 13:14:33 +00:00
update assimp to 6.0.5
This commit is contained in:
parent
2d2eb57e2e
commit
f5cf21cfeb
941 changed files with 22718 additions and 12240 deletions
|
|
@ -3,7 +3,7 @@
|
|||
Open Asset Import Library (assimp)
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 2006-2024, assimp team
|
||||
Copyright (c) 2006-2026, assimp team
|
||||
|
||||
All rights reserved.
|
||||
|
||||
|
|
@ -101,7 +101,7 @@ MD2Importer::MD2Importer()
|
|||
// Returns whether the class can handle the format of the given file.
|
||||
bool MD2Importer::CanRead( const std::string& pFile, IOSystem* pIOHandler, bool /*checkSig*/) const
|
||||
{
|
||||
static const uint32_t tokens[] = { AI_MD2_MAGIC_NUMBER_LE };
|
||||
static constexpr uint32_t tokens[] = { AI_MD2_MAGIC_NUMBER_LE };
|
||||
return CheckMagicToken(pIOHandler,pFile,tokens,AI_COUNT_OF(tokens));
|
||||
}
|
||||
|
||||
|
|
@ -319,16 +319,22 @@ void MD2Importer::InternReadFile( const std::string& pFile,
|
|||
clr.b = clr.g = clr.r = 0.05f;
|
||||
pcHelper->AddProperty<aiColor3D>(&clr, 1,AI_MATKEY_COLOR_AMBIENT);
|
||||
|
||||
if (pcSkins->name[0])
|
||||
const ai_uint32 MaxNameLength = AI_MAXLEN - 1; // one byte reserved for \0
|
||||
ai_uint32 iLen = static_cast<ai_uint32>(::strlen(pcSkins->name));
|
||||
bool nameTooLong = iLen > MaxNameLength;
|
||||
|
||||
if (pcSkins->name[0] && !nameTooLong)
|
||||
{
|
||||
aiString szString;
|
||||
const ai_uint32 iLen = (ai_uint32) ::strlen(pcSkins->name);
|
||||
::memcpy(szString.data,pcSkins->name,iLen);
|
||||
::memcpy(szString.data, pcSkins->name, iLen);
|
||||
szString.data[iLen] = '\0';
|
||||
szString.length = iLen;
|
||||
|
||||
pcHelper->AddProperty(&szString,AI_MATKEY_TEXTURE_DIFFUSE(0));
|
||||
}
|
||||
else if (nameTooLong) {
|
||||
ASSIMP_LOG_WARN("Texture file name is too long. It will be skipped.");
|
||||
}
|
||||
else{
|
||||
ASSIMP_LOG_WARN("Texture file name has zero length. It will be skipped.");
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue