Merge branch 'master' into master

pull/3003/head
Adrian Iusca 2020-02-14 01:04:46 +02:00 committed by GitHub
commit 56a71f22e1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 6 deletions

View File

@ -446,20 +446,19 @@ void ResolveVertexDataArray(std::vector<T>& data_out, const Scope& source,
return;
}
std::vector<T> tempData;
ParseVectorDataArray(tempData, GetRequiredElement(source, dataElementName));
ParseVectorDataArray(tempData, GetRequiredElement(source, dataElementName));
if (tempData.size() != vertex_count) {
if (tempData.size() != mapping_offsets.size()) {
FBXImporter::LogError(Formatter::format("length of input data unexpected for ByVertice mapping: ")
<< tempData.size() << ", expected " << vertex_count);
<< tempData.size() << ", expected " << mapping_offsets.size());
return;
}
data_out.resize(vertex_count);
for (size_t i = 0, e = tempData.size(); i < e; ++i) {
for (size_t i = 0, e = tempData.size(); i < e; ++i) {
const unsigned int istart = mapping_offsets[i], iend = istart + mapping_counts[i];
for (unsigned int j = istart; j < iend; ++j) {
data_out[mappings[j]] = tempData[i];
data_out[mappings[j]] = tempData[i];
}
}
}