diff --git a/libraries/fbx/src/GLTFSerializer.cpp b/libraries/fbx/src/GLTFSerializer.cpp index 4f6ec2d1b2..d4e2833784 100755 --- a/libraries/fbx/src/GLTFSerializer.cpp +++ b/libraries/fbx/src/GLTFSerializer.cpp @@ -1586,12 +1586,16 @@ bool GLTFSerializer::buildGeometry(HFMModel& hfmModel, const hifi::VariantHash& int targetIndex = weightedIndex; hfmModel.blendshapeChannelNames.push_back("target_" + QString::number(weightedIndex)); - if (!names.isEmpty() && names.contains(keys[weightedIndex])) { + if (!names.isEmpty()) { targetIndex = names.indexOf(keys[weightedIndex]); + if (targetIndex == -1) { + continue; // Ignore blendshape targets not present in glTF file. + } indexFromMapping = values[weightedIndex].first; weight = values[weightedIndex].second; hfmModel.blendshapeChannelNames[weightedIndex] = keys[weightedIndex]; } + HFMBlendshape& blendshape = mesh.blendshapes[indexFromMapping]; auto target = primitive.targets[targetIndex];