Merge pull request #2985 from ms-maxvollmer/FBXMeshGeometry_checksizes_fix
Fixed size check to use correct valuepull/3008/head^2
commit
a4868a9530
|
@ -448,15 +448,14 @@ void ResolveVertexDataArray(std::vector<T>& data_out, const Scope& source,
|
||||||
std::vector<T> tempData;
|
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: ")
|
FBXImporter::LogError(Formatter::format("length of input data unexpected for ByVertice mapping: ")
|
||||||
<< tempData.size() << ", expected " << vertex_count);
|
<< tempData.size() << ", expected " << mapping_offsets.size());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
data_out.resize(vertex_count);
|
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];
|
const unsigned int istart = mapping_offsets[i], iend = istart + mapping_counts[i];
|
||||||
for (unsigned int j = istart; j < iend; ++j) {
|
for (unsigned int j = istart; j < iend; ++j) {
|
||||||
data_out[mappings[j]] = tempData[i];
|
data_out[mappings[j]] = tempData[i];
|
||||||
|
|
Loading…
Reference in New Issue