From 1978197afb0f8f6a713e9c170b6335072f65bbf3 Mon Sep 17 00:00:00 2001 From: KillzXGaming Date: Tue, 16 Jul 2019 18:41:05 -0400 Subject: [PATCH] Fix assimp error for bones with indices and no weights --- .../FileFormats/BFRES/Bfres Structs/SubFiles/FMDL/FSHP.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/File_Format_Library/FileFormats/BFRES/Bfres Structs/SubFiles/FMDL/FSHP.cs b/File_Format_Library/FileFormats/BFRES/Bfres Structs/SubFiles/FMDL/FSHP.cs index ee21303a..63d1a123 100644 --- a/File_Format_Library/FileFormats/BFRES/Bfres Structs/SubFiles/FMDL/FSHP.cs +++ b/File_Format_Library/FileFormats/BFRES/Bfres Structs/SubFiles/FMDL/FSHP.cs @@ -975,7 +975,7 @@ namespace Bfres.Structs //Check weights. If they are all 1. If they are then they aren't necessary if (ob.VertexSkinCount == 1 || ForceSkinCount && ForcedSkinAmount == 1) { - bool UseWeights = ob.vertices.Any(o => o.boneWeights[0] != 1); + bool UseWeights = ob.vertices.Any(o => o.boneWeights.Count > 0); if (!UseWeights) { for (int v = 0; v < ob.vertices.Count; v++)