mirror of
https://github.com/godotengine/godot.git
synced 2025-11-07 17:11:30 +00:00
Revert "assimp: Sync with upstream 0201fc5"
This reverts commit78b22393a8. It caused a regression in FBX import leading to crashes. Fixes #36908. (cherry picked from commitda1f80c1f2)
This commit is contained in:
parent
398de05dd6
commit
10012f9d49
224 changed files with 1515 additions and 1928 deletions
|
|
@ -3,7 +3,7 @@
|
|||
Open Asset Import Library (assimp)
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 2006-2020, assimp team
|
||||
Copyright (c) 2006-2019, assimp team
|
||||
|
||||
|
||||
|
||||
|
|
@ -603,18 +603,15 @@ void ValidateDSProcess::SearchForInvalidTextures(const aiMaterial* pMaterial,
|
|||
ReportError("%s #%i is set, but there are only %i %s textures",
|
||||
szType,iIndex,iNumIndices,szType);
|
||||
}
|
||||
if (!iNumIndices) {
|
||||
return;
|
||||
}
|
||||
if (!iNumIndices)return;
|
||||
std::vector<aiTextureMapping> mappings(iNumIndices);
|
||||
|
||||
// Now check whether all UV indices are valid ...
|
||||
bool bNoSpecified = true;
|
||||
for (unsigned int i = 0; i < pMaterial->mNumProperties;++i) {
|
||||
for (unsigned int i = 0; i < pMaterial->mNumProperties;++i)
|
||||
{
|
||||
aiMaterialProperty* prop = pMaterial->mProperties[i];
|
||||
if (prop->mSemantic != type) {
|
||||
continue;
|
||||
}
|
||||
if (prop->mSemantic != type)continue;
|
||||
|
||||
if ((int)prop->mIndex >= iNumIndices)
|
||||
{
|
||||
|
|
@ -637,7 +634,7 @@ void ValidateDSProcess::SearchForInvalidTextures(const aiMaterial* pMaterial,
|
|||
ReportError("Material property %s%i is expected to be 5 floats large (size is %i)",
|
||||
prop->mKey.data,prop->mIndex, prop->mDataLength);
|
||||
}
|
||||
//mappings[prop->mIndex] = ((aiUVTransform*)prop->mData);
|
||||
mappings[prop->mIndex] = *((aiTextureMapping*)prop->mData);
|
||||
}
|
||||
else if (!::strcmp(prop->mKey.data,"$tex.uvwsrc")) {
|
||||
if (aiPTI_Integer != prop->mType || sizeof(int) > prop->mDataLength)
|
||||
|
|
@ -777,12 +774,6 @@ void ValidateDSProcess::Validate( const aiMaterial* pMaterial)
|
|||
SearchForInvalidTextures(pMaterial,aiTextureType_DISPLACEMENT);
|
||||
SearchForInvalidTextures(pMaterial,aiTextureType_LIGHTMAP);
|
||||
SearchForInvalidTextures(pMaterial,aiTextureType_REFLECTION);
|
||||
SearchForInvalidTextures(pMaterial,aiTextureType_BASE_COLOR);
|
||||
SearchForInvalidTextures(pMaterial,aiTextureType_NORMAL_CAMERA);
|
||||
SearchForInvalidTextures(pMaterial,aiTextureType_EMISSION_COLOR);
|
||||
SearchForInvalidTextures(pMaterial,aiTextureType_METALNESS);
|
||||
SearchForInvalidTextures(pMaterial,aiTextureType_DIFFUSE_ROUGHNESS);
|
||||
SearchForInvalidTextures(pMaterial,aiTextureType_AMBIENT_OCCLUSION);
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
|
|
@ -804,7 +795,7 @@ void ValidateDSProcess::Validate( const aiTexture* pTexture)
|
|||
if (!pTexture->mWidth) {
|
||||
ReportError("aiTexture::mWidth is zero (compressed texture)");
|
||||
}
|
||||
if ('\0' != pTexture->achFormatHint[HINTMAXTEXTURELEN - 1]) {
|
||||
if ('\0' != pTexture->achFormatHint[3]) {
|
||||
ReportWarning("aiTexture::achFormatHint must be zero-terminated");
|
||||
}
|
||||
else if ('.' == pTexture->achFormatHint[0]) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue