mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 09:17:29 +02:00
fix reference to part index
This commit is contained in:
parent
5d9ed78369
commit
bb7cd58e9a
1 changed files with 4 additions and 4 deletions
|
@ -421,15 +421,15 @@ ExtractedMesh FBXReader::extractMesh(const FBXNode& object, unsigned int& meshIn
|
||||||
QPair<int, int> materialTexture(matTexValue[0], matTexValue[1]);
|
QPair<int, int> materialTexture(matTexValue[0], matTexValue[1]);
|
||||||
|
|
||||||
// grab or setup the FBXMeshPart for the part this face belongs to
|
// grab or setup the FBXMeshPart for the part this face belongs to
|
||||||
int& partIndex = materialTextureParts[materialTexture];
|
int& partIndexPlusOne = materialTextureParts[materialTexture];
|
||||||
if (partIndex == 0) {
|
if (partIndexPlusOne == 0) {
|
||||||
data.extracted.partMaterialTextures.append(materialTexture);
|
data.extracted.partMaterialTextures.append(materialTexture);
|
||||||
data.extracted.mesh.parts.resize(data.extracted.mesh.parts.size() + 1);
|
data.extracted.mesh.parts.resize(data.extracted.mesh.parts.size() + 1);
|
||||||
partIndex = data.extracted.mesh.parts.size() - 1;
|
partIndexPlusOne = data.extracted.mesh.parts.size();
|
||||||
}
|
}
|
||||||
|
|
||||||
// give the mesh part this index
|
// give the mesh part this index
|
||||||
FBXMeshPart& part = data.extracted.mesh.parts[partIndex];
|
FBXMeshPart& part = data.extracted.mesh.parts[partIndexPlusOne - 1];
|
||||||
part.triangleIndices.append(i);
|
part.triangleIndices.append(i);
|
||||||
|
|
||||||
data.extracted.newIndices.insert(i, i);
|
data.extracted.newIndices.insert(i, i);
|
||||||
|
|
Loading…
Reference in a new issue