mirror of
https://thingvellir.net/git/overte
synced 2025-03-27 23:52:03 +01:00
Pull out the weight access.
This commit is contained in:
parent
12374c2cc4
commit
4a011e0624
1 changed files with 2 additions and 1 deletions
|
@ -1198,6 +1198,7 @@ FBXGeometry extractFBXGeometry(const FBXNode& node, const QVariantHash& mapping)
|
|||
|
||||
for (int j = 0; j < cluster.indices.size(); j++) {
|
||||
int oldIndex = cluster.indices.at(j);
|
||||
float weight = cluster.weights.at(j);
|
||||
for (QMultiHash<int, int>::const_iterator it = extracted.newIndices.constFind(oldIndex);
|
||||
it != extracted.newIndices.end() && it.key() == oldIndex; it++) {
|
||||
glm::vec4& weights = extracted.mesh.clusterWeights[it.value()];
|
||||
|
@ -1206,7 +1207,7 @@ FBXGeometry extractFBXGeometry(const FBXNode& node, const QVariantHash& mapping)
|
|||
for (int k = 0; k < 4; k++) {
|
||||
if (weights[k] == 0.0f) {
|
||||
extracted.mesh.clusterIndices[it.value()][k] = i;
|
||||
weights[k] = cluster.weights.at(j);
|
||||
weights[k] = weight;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue