1
0
mirror of synced 2024-12-04 20:08:00 +01:00
Switch-Toolbox/Switch_FileFormatsMain/GUI/BFRES/Skeleton/BoneInfoPanel.cs
KillzXGaming 5081e39414 More format additions and fixes.
Fixed MKAGPDX models a bit so they aren't all missing mesh data. Skinned ones are still buggy!
 BMD wip support using SuperBMDLib.
 Adjusted gui loading a little bit.
2019-07-11 17:22:59 -04:00

51 lines
1.1 KiB
C#

using System;
using System.Windows.Forms;
using Bfres.Structs;
using Syroot.NintenTools.NSW.Bfres;
using ResU = Syroot.NintenTools.Bfres;
using Switch_Toolbox.Library;
namespace FirstPlugin
{
public partial class BoneInfoPanel : UserControl
{
public BoneInfoPanel()
{
InitializeComponent();
}
BfresBone activeBone;
bool Loaded = false;
public void LoadBone(BfresBone bn)
{
Loaded = false;
activeBone = bn;
parentTB.Text = "";
if (bn.parentIndex != -1)
parentTB.Text = bn.Parent.Text;
nameIndexUD.Value = bn.GetIndex();
nameTB.Text = bn.BoneName;
parentIndexUD.Bind(bn, "parentIndex");
visibleChk.Bind(bn, "Visible");
Loaded = true;
}
private void nameTB_TextChanged(object sender, EventArgs e)
{
if (Loaded)
activeBone.RenameBone(nameTB.Text);
}
private void visibleChk_CheckedChanged(object sender, EventArgs e) {
LibraryGUI.UpdateViewport();
}
}
}