Removed unnecessary checks that may result in false positives rejecting valid models
parent
9e46fca9a9
commit
cb55e2658d
|
@ -448,11 +448,11 @@ 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() != vertex_count) {
|
||||||
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 " << vertex_count);
|
||||||
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) {
|
||||||
|
@ -467,22 +467,16 @@ 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) {
|
|
||||||
FBXImporter::LogError(Formatter::format("length of input data unexpected for ByVertice mapping: ")
|
|
||||||
<< tempData.size() << ", expected " << vertex_count);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
std::vector<int> uvIndices;
|
std::vector<int> uvIndices;
|
||||||
ParseVectorDataArray(uvIndices,GetRequiredElement(source,indexDataElementName));
|
ParseVectorDataArray(uvIndices,GetRequiredElement(source,indexDataElementName));
|
||||||
|
|
||||||
if (uvIndices.size() != vertex_count) {
|
if (uvIndices.size() != vertex_count) {
|
||||||
FBXImporter::LogError(Formatter::format("length of input data unexpected for ByVertice mapping: ")
|
FBXImporter::LogError(Formatter::format("length of input data unexpected for ByVertice mapping: ")
|
||||||
<< uvIndices.size() << ", expected " << vertex_count);
|
<< uvIndices.size() << ", expected " << vertex_count);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
data_out.resize(vertex_count);
|
data_out.resize(vertex_count);
|
||||||
|
|
||||||
for (size_t i = 0, e = uvIndices.size(); i < e; ++i) {
|
for (size_t i = 0, e = uvIndices.size(); i < e; ++i) {
|
||||||
|
|
||||||
|
@ -512,22 +506,16 @@ 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) {
|
|
||||||
FBXImporter::LogError(Formatter::format("length of input data unexpected for ByPolygonVertex mapping: ")
|
|
||||||
<< tempData.size() << ", expected " << vertex_count);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
std::vector<int> uvIndices;
|
std::vector<int> uvIndices;
|
||||||
ParseVectorDataArray(uvIndices,GetRequiredElement(source,indexDataElementName));
|
ParseVectorDataArray(uvIndices,GetRequiredElement(source,indexDataElementName));
|
||||||
|
|
||||||
if (uvIndices.size() != vertex_count) {
|
if (uvIndices.size() != vertex_count) {
|
||||||
FBXImporter::LogError(Formatter::format("length of input data unexpected for ByPolygonVertex mapping: ")
|
FBXImporter::LogError(Formatter::format("length of input data unexpected for ByPolygonVertex mapping: ")
|
||||||
<< uvIndices.size() << ", expected " << vertex_count);
|
<< uvIndices.size() << ", expected " << vertex_count);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
data_out.resize(vertex_count);
|
data_out.resize(vertex_count);
|
||||||
|
|
||||||
const T empty;
|
const T empty;
|
||||||
unsigned int next = 0;
|
unsigned int next = 0;
|
||||||
|
|
Loading…
Reference in New Issue