From 93aa26efcf27bedfea713cda4044a5b80bb38a08 Mon Sep 17 00:00:00 2001 From: KillzXGaming Date: Fri, 7 Feb 2020 09:40:43 -0500 Subject: [PATCH] Quick bone index fix. --- .../FileFormats/BFRES/Bfres Structs/SubFiles/FMDL.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/File_Format_Library/FileFormats/BFRES/Bfres Structs/SubFiles/FMDL.cs b/File_Format_Library/FileFormats/BFRES/Bfres Structs/SubFiles/FMDL.cs index bcb43a0d..4030b33a 100644 --- a/File_Format_Library/FileFormats/BFRES/Bfres Structs/SubFiles/FMDL.cs +++ b/File_Format_Library/FileFormats/BFRES/Bfres Structs/SubFiles/FMDL.cs @@ -1195,10 +1195,6 @@ namespace Bfres.Structs shape.ApplyImportSettings(settings, GetMaterial(shape.MaterialIndex)); shape.BoneIndices = shape.GetIndices(Skeleton); - shape.OptmizeAttributeFormats(); - shape.SaveShape(IsWiiU); - shape.SaveVertexBuffer(IsWiiU); - if (shape.VertexSkinCount == 1 && shape.BoneIndices.Count > 0) { int boneIndex = shape.BoneIndices[0]; @@ -1207,6 +1203,10 @@ namespace Bfres.Structs shape.BoneIndex = obj.BoneIndex; + shape.OptmizeAttributeFormats(); + shape.SaveShape(IsWiiU); + shape.SaveVertexBuffer(IsWiiU); + if (IsWiiU) { shape.ShapeU.SubMeshBoundingIndices = new List();