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 095732ec..96246a69 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 @@ -362,9 +362,10 @@ namespace Bfres.Structs //Todo add lod generating CreateNewBoundingBoxes(); - SaveShape(GetResFileU() != null); UpdateVertexData(); + GenerateBoundingNodes(); + Cursor.Current = Cursors.Default; } @@ -383,12 +384,32 @@ namespace Bfres.Structs } CreateNewBoundingBoxes(); - SaveShape(GetResFileU() != null); UpdateVertexData(); + GenerateBoundingNodes(); + Cursor.Current = Cursors.Default; } + private void GenerateBoundingNodes() + { + if (ShapeU != null) + { + ShapeU.SubMeshBoundingIndices = new List(); + ShapeU.SubMeshBoundingIndices.Add(0); + ShapeU.SubMeshBoundingNodes = new List(); + ShapeU.SubMeshBoundingNodes.Add(new ResU.BoundingNode() + { + LeftChildIndex = 0, + NextSibling = 0, + SubMeshIndex = 0, + RightChildIndex = 0, + Unknown = 0, + SubMeshCount = 1, + }); + } + } + private void RecalculateNormals(object sender, EventArgs args) { Cursor.Current = Cursors.WaitCursor;