mirror of
https://github.com/KillzXGaming/Switch-Toolbox
synced 2024-11-22 04:23:09 +00:00
Fix lag from hding FMDLs
This commit is contained in:
parent
cda5329779
commit
e2f3afb1a6
10 changed files with 22 additions and 7 deletions
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -609,7 +609,6 @@ namespace Bfres.Structs
|
|||
});
|
||||
}
|
||||
|
||||
|
||||
Nodes["FshpFolder"].Nodes.Add(shape);
|
||||
shapes.Add(shape);
|
||||
}
|
||||
|
@ -878,6 +877,15 @@ namespace Bfres.Structs
|
|||
|
||||
List<string> keyList = shapes.Select(o => o.Text).ToList();
|
||||
shape.Text = Utils.RenameDuplicateString(keyList, shape.Text);
|
||||
|
||||
if (IsWiiU)
|
||||
{
|
||||
BfresWiiU.ReadShapesVertices(shape, shape.ShapeU, shape.VertexBufferU, this);
|
||||
}
|
||||
else
|
||||
{
|
||||
BfresSwitch.ReadShapesVertices(shape, shape.Shape, shape.VertexBuffer, this);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -1039,10 +1039,10 @@ namespace Bfres.Structs
|
|||
{
|
||||
if (VertexSkinCount == 0 || VertexSkinCount == 1)
|
||||
{
|
||||
// Console.WriteLine("Old " + vtx.pos);
|
||||
// vtx.pos = TransformLocal(vtx.pos);
|
||||
// vtx.nrm = TransformLocal(vtx.nrm, false);
|
||||
// Console.WriteLine("New " + vtx.pos);
|
||||
Console.WriteLine("Old " + vtx.pos);
|
||||
vtx.pos = TransformLocal(vtx.pos);
|
||||
vtx.nrm = TransformLocal(vtx.nrm, false);
|
||||
Console.WriteLine("New " + vtx.pos);
|
||||
}
|
||||
//Console.WriteLine($"Weight count {vtx.boneWeights.Count}");
|
||||
//Console.WriteLine($"Index count {vtx.boneIds.Count}");
|
||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -256,7 +256,7 @@ namespace Switch_Toolbox.Library
|
|||
}
|
||||
}
|
||||
|
||||
public const int BoneRotation = 90;
|
||||
public const int BoneRotation = 0;
|
||||
|
||||
private List<Node> tempBoneNodes = new List<Node>();
|
||||
private void CreateByNode(Node node, STSkeleton skeleton, short SmoothIndex, short RigidIndex, bool IsRoot, ref Assimp.Matrix4x4 rootTransform)
|
||||
|
|
|
@ -231,13 +231,18 @@ namespace Switch_Toolbox.Library.Forms
|
|||
}
|
||||
}
|
||||
|
||||
bool UpdateViewport = false;
|
||||
private void treeViewCustom1_AfterCheck(object sender, TreeViewEventArgs e)
|
||||
{
|
||||
UpdateViewport = false;
|
||||
|
||||
if (e.Node is STGenericModel)
|
||||
{
|
||||
CheckChildNodes(e.Node, e.Node.Checked);
|
||||
}
|
||||
LibraryGUI.Instance.UpdateViewport();
|
||||
|
||||
if (UpdateViewport)
|
||||
LibraryGUI.Instance.UpdateViewport();
|
||||
}
|
||||
|
||||
private void CheckChildNodes(TreeNode node, bool IsChecked)
|
||||
|
@ -250,6 +255,8 @@ namespace Switch_Toolbox.Library.Forms
|
|||
CheckChildNodes(n, IsChecked);
|
||||
}
|
||||
}
|
||||
|
||||
UpdateViewport = true; //Update viewport on the last node checked
|
||||
}
|
||||
|
||||
private void treeViewCustom1_DrawNode(object sender, DrawTreeNodeEventArgs e)
|
||||
|
|
Loading…
Reference in a new issue