diff --git a/src/MagnumPlugins/UfbxImporter/UfbxImporter.cpp b/src/MagnumPlugins/UfbxImporter/UfbxImporter.cpp index d815e6d32..34c92c0a4 100644 --- a/src/MagnumPlugins/UfbxImporter/UfbxImporter.cpp +++ b/src/MagnumPlugins/UfbxImporter/UfbxImporter.cpp @@ -1039,6 +1039,8 @@ Containers::Optional UfbxImporter::doMesh(UnsignedInt id, UnsignedInt UnsignedInt weightCount = Utility::min(vertex.num_weights, jointWeightCount); Float totalWeight = 0.0f; + /* We can simply take the first N weights from the skin as they + are sorted in descending order by ufbx. */ for(UnsignedInt j = 0; j < weightCount; ++j) { ufbx_skin_weight weight = skin->weights[vertex.weight_begin + j]; jointIds[dstIx][j] = weight.cluster_index;