Option to reset to T pose, and fix wii u bones
This commit is contained in:
parent
f0c757259d
commit
0a53c287b3
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -93,14 +93,14 @@ namespace Bfres.Structs
|
||||
ResU.Bone bone = new ResU.Bone();
|
||||
bone.Import(FileName, GetResFileU());
|
||||
|
||||
BfresWiiU.ReadBone(bn, bone);
|
||||
BfresWiiU.ReadBone(bn, bone, false);
|
||||
}
|
||||
else
|
||||
{
|
||||
Bone bone = new Bone();
|
||||
bone.Import(FileName);
|
||||
|
||||
BfresSwitch.ReadBone(bn, bone);
|
||||
BfresSwitch.ReadBone(bn, bone, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -246,7 +246,7 @@ namespace Bfres.Structs
|
||||
BoneU = new ResU.Bone();
|
||||
BoneU.Name = CheckDuplicateBoneNames("NewBone");
|
||||
|
||||
BfresWiiU.ReadBone(bn, BoneU);
|
||||
BfresWiiU.ReadBone(bn, BoneU, false);
|
||||
Nodes.Add(bn);
|
||||
}
|
||||
else
|
||||
@ -254,7 +254,7 @@ namespace Bfres.Structs
|
||||
Bone = new Bone();
|
||||
Bone.Name = CheckDuplicateBoneNames("NewBone");
|
||||
|
||||
BfresSwitch.ReadBone(bn, Bone);
|
||||
BfresSwitch.ReadBone(bn, Bone, false);
|
||||
Nodes.Add(bn);
|
||||
}
|
||||
}
|
||||
@ -275,7 +275,7 @@ namespace Bfres.Structs
|
||||
BoneU.Import(ofd.FileName, GetResFileU());
|
||||
BoneU.Name = CheckDuplicateBoneNames(BoneU.Name);
|
||||
|
||||
BfresWiiU.ReadBone(bn, BoneU);
|
||||
BfresWiiU.ReadBone(bn, BoneU, false);
|
||||
Nodes.Add(bn);
|
||||
}
|
||||
else
|
||||
@ -284,7 +284,7 @@ namespace Bfres.Structs
|
||||
Bone.Import(ofd.FileName);
|
||||
Bone.Name = CheckDuplicateBoneNames(Bone.Name);
|
||||
|
||||
BfresSwitch.ReadBone(bn, Bone);
|
||||
BfresSwitch.ReadBone(bn, Bone, false);
|
||||
Nodes.Add(bn);
|
||||
}
|
||||
}
|
||||
|
@ -536,7 +536,7 @@ namespace FirstPlugin
|
||||
|
||||
|
||||
}
|
||||
public static void ReadBone(this BfresBone bone, Bone bn, bool SetParent = false)
|
||||
public static void ReadBone(this BfresBone bone, Bone bn, bool SetParent = true)
|
||||
{
|
||||
bone.Bone = bn;
|
||||
bone.FlagVisible = bn.Flags.HasFlag(BoneFlags.Visible);
|
||||
@ -544,7 +544,7 @@ namespace FirstPlugin
|
||||
bone.RigidMatrixIndex = bn.RigidMatrixIndex;
|
||||
bone.SmoothMatrixIndex = bn.SmoothMatrixIndex;
|
||||
bone.BillboardIndex = bn.BillboardIndex;
|
||||
if (!SetParent)
|
||||
if (SetParent)
|
||||
bone.parentIndex = bn.ParentIndex;
|
||||
|
||||
bone.scale = new float[3];
|
||||
|
@ -342,7 +342,7 @@ namespace FirstPlugin
|
||||
bone.SmoothMatrixIndex = bn.SmoothMatrixIndex;
|
||||
bone.BillboardIndex = bn.BillboardIndex;
|
||||
|
||||
if (!SetParent)
|
||||
if (SetParent)
|
||||
bone.parentIndex = bn.ParentIndex;
|
||||
bone.scale = new float[3];
|
||||
bone.rotation = new float[4];
|
||||
|
@ -212,9 +212,18 @@ namespace FirstPlugin.Forms
|
||||
stPropertyGrid1.LoadProperty(anim.TexPatternAnim, OnPropertyChanged);
|
||||
userDataEditor1.LoadUserData(anim.TexPatternAnim.UserData);
|
||||
|
||||
BfresTexturePatternEditor editor = new BfresTexturePatternEditor();
|
||||
BfresTexturePatternEditor editor = (BfresTexturePatternEditor)GetActiveControl(typeof(BfresTexturePatternEditor));
|
||||
if (editor == null)
|
||||
{
|
||||
stPanel2.Controls.Clear();
|
||||
|
||||
editor = new BfresTexturePatternEditor();
|
||||
editor.Dock = DockStyle.Fill;
|
||||
stPanel2.Controls.Add(editor);
|
||||
}
|
||||
|
||||
editor.LoadAnim(anim);
|
||||
stPanel1.Controls.Add(editor);
|
||||
editor.Refresh();
|
||||
}
|
||||
|
||||
public void OnPropertyChanged()
|
||||
|
Binary file not shown.
Binary file not shown.
48
Switch_Toolbox_Library/Forms/Viewport.Designer.cs
generated
48
Switch_Toolbox_Library/Forms/Viewport.Designer.cs
generated
@ -28,33 +28,21 @@
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.animationPanel1 = new Switch_Toolbox.Library.AnimationPanel();
|
||||
this.normalsShadingToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.panelViewport = new Switch_Toolbox.Library.Forms.STPanel();
|
||||
this.stContextMenuStrip1 = new Switch_Toolbox.Library.Forms.STMenuStrip();
|
||||
this.viewToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.vewportToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.modelToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.bonesToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.animationToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.animationPanelToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.shadingToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.resetCameraToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.optionsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.reloadShadersToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.resetPoseToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.stContextMenuStrip1.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// animationPanel1
|
||||
//
|
||||
this.animationPanel1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(33)))), ((int)(((byte)(33)))), ((int)(((byte)(33)))));
|
||||
this.animationPanel1.CurrentAnimation = null;
|
||||
this.animationPanel1.Dock = System.Windows.Forms.DockStyle.Bottom;
|
||||
this.animationPanel1.Location = new System.Drawing.Point(0, 422);
|
||||
this.animationPanel1.Name = "animationPanel1";
|
||||
this.animationPanel1.Size = new System.Drawing.Size(781, 100);
|
||||
this.animationPanel1.TabIndex = 1;
|
||||
//
|
||||
// normalsShadingToolStripMenuItem
|
||||
//
|
||||
this.normalsShadingToolStripMenuItem.ForeColor = System.Drawing.Color.White;
|
||||
@ -79,6 +67,7 @@
|
||||
this.viewToolStripMenuItem,
|
||||
this.shadingToolStripMenuItem,
|
||||
this.resetCameraToolStripMenuItem,
|
||||
this.resetPoseToolStripMenuItem,
|
||||
this.optionsToolStripMenuItem});
|
||||
this.stContextMenuStrip1.Location = new System.Drawing.Point(0, 0);
|
||||
this.stContextMenuStrip1.Name = "stContextMenuStrip1";
|
||||
@ -104,36 +93,16 @@
|
||||
//
|
||||
// modelToolStripMenuItem
|
||||
//
|
||||
this.modelToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.bonesToolStripMenuItem});
|
||||
this.modelToolStripMenuItem.Name = "modelToolStripMenuItem";
|
||||
this.modelToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
|
||||
this.modelToolStripMenuItem.Text = "Model";
|
||||
//
|
||||
// bonesToolStripMenuItem
|
||||
//
|
||||
this.bonesToolStripMenuItem.Name = "bonesToolStripMenuItem";
|
||||
this.bonesToolStripMenuItem.Size = new System.Drawing.Size(106, 22);
|
||||
this.bonesToolStripMenuItem.Text = "Bones";
|
||||
//
|
||||
// animationToolStripMenuItem
|
||||
//
|
||||
this.animationToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.animationPanelToolStripMenuItem});
|
||||
this.animationToolStripMenuItem.Name = "animationToolStripMenuItem";
|
||||
this.animationToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
|
||||
this.animationToolStripMenuItem.Text = "Animation";
|
||||
//
|
||||
// animationPanelToolStripMenuItem
|
||||
//
|
||||
this.animationPanelToolStripMenuItem.Checked = true;
|
||||
this.animationPanelToolStripMenuItem.CheckOnClick = true;
|
||||
this.animationPanelToolStripMenuItem.CheckState = System.Windows.Forms.CheckState.Checked;
|
||||
this.animationPanelToolStripMenuItem.Name = "animationPanelToolStripMenuItem";
|
||||
this.animationPanelToolStripMenuItem.Size = new System.Drawing.Size(120, 22);
|
||||
this.animationPanelToolStripMenuItem.Text = "Timeline";
|
||||
this.animationPanelToolStripMenuItem.Click += new System.EventHandler(this.animationPanelToolStripMenuItem_Click);
|
||||
//
|
||||
// shadingToolStripMenuItem
|
||||
//
|
||||
this.shadingToolStripMenuItem.Name = "shadingToolStripMenuItem";
|
||||
@ -159,10 +128,17 @@
|
||||
// reloadShadersToolStripMenuItem
|
||||
//
|
||||
this.reloadShadersToolStripMenuItem.Name = "reloadShadersToolStripMenuItem";
|
||||
this.reloadShadersToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
|
||||
this.reloadShadersToolStripMenuItem.Size = new System.Drawing.Size(154, 22);
|
||||
this.reloadShadersToolStripMenuItem.Text = "Reload Shaders";
|
||||
this.reloadShadersToolStripMenuItem.Click += new System.EventHandler(this.reloadShadersToolStripMenuItem_Click);
|
||||
//
|
||||
// resetPoseToolStripMenuItem
|
||||
//
|
||||
this.resetPoseToolStripMenuItem.Name = "resetPoseToolStripMenuItem";
|
||||
this.resetPoseToolStripMenuItem.Size = new System.Drawing.Size(75, 20);
|
||||
this.resetPoseToolStripMenuItem.Text = "Reset Pose";
|
||||
this.resetPoseToolStripMenuItem.Click += new System.EventHandler(this.resetPoseToolStripMenuItem_Click);
|
||||
//
|
||||
// Viewport
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
@ -180,19 +156,17 @@
|
||||
}
|
||||
|
||||
#endregion
|
||||
public AnimationPanel animationPanel1;
|
||||
private System.Windows.Forms.ToolStripMenuItem normalsShadingToolStripMenuItem;
|
||||
private Forms.STPanel panelViewport;
|
||||
private Forms.STMenuStrip stContextMenuStrip1;
|
||||
private System.Windows.Forms.ToolStripMenuItem viewToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem vewportToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem modelToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem bonesToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem animationToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem animationPanelToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem resetCameraToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem shadingToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem optionsToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem reloadShadersToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem resetPoseToolStripMenuItem;
|
||||
}
|
||||
}
|
@ -269,15 +269,7 @@ namespace Switch_Toolbox.Library
|
||||
|
||||
private void contextMenuStripDark1_ItemClicked(object sender, ToolStripItemClickedEventArgs e)
|
||||
{
|
||||
if (animationPanelToolStripMenuItem.Checked)
|
||||
{
|
||||
animationPanelToolStripMenuItem.Checked = false;
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
animationPanelToolStripMenuItem.Checked = true;
|
||||
}
|
||||
}
|
||||
|
||||
public void FormClosing()
|
||||
@ -318,5 +310,16 @@ namespace Switch_Toolbox.Library
|
||||
if (GL_ControlModern != null)
|
||||
GL_ControlModern.ReloadShaders();
|
||||
}
|
||||
|
||||
private void resetPoseToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
var animationPanel1 = LibraryGUI.Instance.GetAnimationPanel();
|
||||
|
||||
if (animationPanel1 != null)
|
||||
{
|
||||
if (animationPanel1.CurrentAnimation != null)
|
||||
animationPanel1.ResetModels();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -373,10 +373,10 @@
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="Projects\Recent\DUMMY.txt" />
|
||||
<Content Include="x64\DirectXTexNetImpl.dll">
|
||||
<Content Include="Lib\x64\DirectXTexNetImpl.dll">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="x86\DirectXTexNetImpl.dll">
|
||||
<Content Include="Lib\x86\DirectXTexNetImpl.dll">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<None Include="Resources\Save.png" />
|
||||
|
Loading…
x
Reference in New Issue
Block a user