Merge pull request #3708 from urschanselmann/master

Fix import of FBX files with last UV duplicated (caused by bug in FBX SDK 2019.0+)
pull/3755/head
Kim Kulling 2021-04-12 11:50:12 +02:00 committed by GitHub
commit c9ba616eb6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 0 deletions

View File

@ -508,6 +508,12 @@ void ResolveVertexDataArray(std::vector<T>& data_out, const Scope& source,
std::vector<int> uvIndices;
ParseVectorDataArray(uvIndices,GetRequiredElement(source,indexDataElementName));
if (uvIndices.size() > vertex_count) {
FBXImporter::LogWarn(Formatter::format("trimming length of input array for ByPolygonVertex mapping: ")
<< uvIndices.size() << ", expected " << vertex_count);
uvIndices.resize(vertex_count);
}
if (uvIndices.size() != vertex_count) {
FBXImporter::LogError(Formatter::format("length of input data unexpected for ByPolygonVertex mapping: ")
<< uvIndices.size() << ", expected " << vertex_count);