diff --git a/Penumbra/Import/Models/Import/MeshImporter.cs b/Penumbra/Import/Models/Import/MeshImporter.cs index 813ef422..6a46fb9f 100644 --- a/Penumbra/Import/Models/Import/MeshImporter.cs +++ b/Penumbra/Import/Models/Import/MeshImporter.cs @@ -205,17 +205,18 @@ public class MeshImporter(IEnumerable nodes, IoNotifier notifier) // Build a set of joints that are referenced by this mesh. for (var i = 0; i < joints0Accessor.Count; i++) { - var joints = joints0Accessor[i]; - var weights = weights0Accessor[i]; + var joints0 = joints0Accessor[i]; + var weights0 = weights0Accessor[i]; var joints1 = joints1Accessor?[i]; var weights1 = weights1Accessor?[i]; for (var index = 0; index < 4; index++) { // If a joint has absolutely no weight, we omit the bone entirely. - if (weights[index] == 0) - continue; + if (weights0[index] != 0) + { + usedJoints.Add((ushort)joints0[index]); + } - usedJoints.Add((ushort)joints[index]); if (joints1 != null && weights1 != null && weights1.Value[index] != 0) {