Fixed requested indentation issues.

# Conflicts:
#	libraries/fbx/src/GLTFSerializer.cpp
This commit is contained in:
Saracen 2019-04-22 21:10:12 +01:00
parent b00e0640c5
commit a1279fa0b1

View file

@ -872,7 +872,7 @@ bool GLTFSerializer::buildGeometry(HFMModel& hfmModel, const hifi::VariantHash&
// collect transforms for a node's parents, grandparents, etc. // collect transforms for a node's parents, grandparents, etc.
_file.nodes[nodecount].transforms.push_back(getModelTransform(parentNode)); _file.nodes[nodecount].transforms.push_back(getModelTransform(parentNode));
parentIndex = parents[parentIndex]; parentIndex = parents[parentIndex];
} }
nodecount++; nodecount++;
} }
@ -900,10 +900,10 @@ bool GLTFSerializer::buildGeometry(HFMModel& hfmModel, const hifi::VariantHash&
sortedNodes[j] = currentNode; sortedNodes[j] = currentNode;
i++; i++;
currentNode = sortedNodes[i]; currentNode = sortedNodes[i];
} }
j++; j++;
} }
} }
} }
@ -931,7 +931,7 @@ bool GLTFSerializer::buildGeometry(HFMModel& hfmModel, const hifi::VariantHash&
joint.translation = extractTranslation(joint.transform); joint.translation = extractTranslation(joint.transform);
joint.rotation = glmExtractRotation(joint.transform); joint.rotation = glmExtractRotation(joint.transform);
glm::vec3 scale = extractScale(joint.transform); glm::vec3 scale = extractScale(joint.transform);
joint.postTransform = glm::scale(glm::mat4(), scale); joint.postTransform = glm::scale(glm::mat4(), scale);
joint.name = node.name; joint.name = node.name;
joint.isSkeletonJoint = false; joint.isSkeletonJoint = false;
@ -982,7 +982,7 @@ bool GLTFSerializer::buildGeometry(HFMModel& hfmModel, const hifi::VariantHash&
QString unknown = "Default"; QString unknown = "Default";
int ukcount = 0; int ukcount = 0;
foreach(auto material, _file.materials) { foreach(auto material, _file.materials) {
if (!(material.defined["name"])) { if (!material.defined["name"]) {
QString name = unknown + QString::number(ukcount++); QString name = unknown + QString::number(ukcount++);
material.name = name; material.name = name;
material.defined.insert("name", true); material.defined.insert("name", true);
@ -1017,8 +1017,8 @@ bool GLTFSerializer::buildGeometry(HFMModel& hfmModel, const hifi::VariantHash&
cluster.inverseBindMatrix = glm::mat4(); cluster.inverseBindMatrix = glm::mat4();
cluster.inverseBindTransform = Transform(cluster.inverseBindMatrix); cluster.inverseBindTransform = Transform(cluster.inverseBindMatrix);
mesh.clusters.append(cluster); mesh.clusters.append(cluster);
} else { // skinned model } else { // skinned model
for (int j = 0; j < numNodes; j++) { for (int j = 0; j < numNodes; j++) {
HFMCluster cluster; HFMCluster cluster;
cluster.jointIndex = j; cluster.jointIndex = j;
cluster.inverseBindMatrix = jointInverseBindTransforms[j]; cluster.inverseBindMatrix = jointInverseBindTransforms[j];
@ -1026,7 +1026,7 @@ bool GLTFSerializer::buildGeometry(HFMModel& hfmModel, const hifi::VariantHash&
mesh.clusters.append(cluster); mesh.clusters.append(cluster);
} }
} }
HFMCluster root; HFMCluster root;
root.jointIndex = 0; root.jointIndex = 0;
root.inverseBindMatrix = jointInverseBindTransforms[root.jointIndex]; root.inverseBindMatrix = jointInverseBindTransforms[root.jointIndex];
root.inverseBindTransform = Transform(root.inverseBindMatrix); root.inverseBindTransform = Transform(root.inverseBindMatrix);