Don't weight blendshapes by default blendshape values

This commit is contained in:
David Rowe 2020-08-29 14:17:54 +12:00
parent f946791791
commit a819b140dc

View file

@ -1567,7 +1567,6 @@ bool GLTFSerializer::buildGeometry(HFMModel& hfmModel, const hifi::VariantHash&
auto keys = blendshapeIndices.keys();
auto values = blendshapeIndices.values();
auto names = _file.meshes[node.mesh].extras.targetNames;
QVector<double> weights = _file.meshes[node.mesh].weights;
for (int weightedIndex = 0; weightedIndex < keys.size(); ++weightedIndex) {
float weight = 1.0f;
@ -1587,13 +1586,6 @@ bool GLTFSerializer::buildGeometry(HFMModel& hfmModel, const hifi::VariantHash&
QVector<glm::vec3> normals;
QVector<glm::vec3> vertices;
if (weights.size() == primitive.targets.size()) {
int targetWeight = weights[targetIndex];
if (targetWeight != 0) {
weight = weight * targetWeight;
}
}
if (target.values.contains((QString) "NORMAL")) {
generateTargetData(target.values.value((QString) "NORMAL"), weight, normals);
}