mirror of
https://mirror.ghproxy.com/https://github.com/dexyfex/CodeWalker
synced 2024-11-22 23:12:59 +08:00
Button in model viewer to open embedded texture dict in YTD viewer
This commit is contained in:
parent
bcfeb4fa30
commit
cda768eb22
17
Forms/ModelForm.Designer.cs
generated
17
Forms/ModelForm.Designer.cs
generated
@ -73,6 +73,7 @@
|
|||||||
this.ToolsPanelHideButton = new System.Windows.Forms.Button();
|
this.ToolsPanelHideButton = new System.Windows.Forms.Button();
|
||||||
this.ToolsDragPanel = new System.Windows.Forms.Panel();
|
this.ToolsDragPanel = new System.Windows.Forms.Panel();
|
||||||
this.ToolsPanelShowButton = new System.Windows.Forms.Button();
|
this.ToolsPanelShowButton = new System.Windows.Forms.Button();
|
||||||
|
this.TextureViewerButton = new System.Windows.Forms.Button();
|
||||||
this.StatusStrip.SuspendLayout();
|
this.StatusStrip.SuspendLayout();
|
||||||
this.ConsolePanel.SuspendLayout();
|
this.ConsolePanel.SuspendLayout();
|
||||||
this.ToolsPanel.SuspendLayout();
|
this.ToolsPanel.SuspendLayout();
|
||||||
@ -207,6 +208,7 @@
|
|||||||
//
|
//
|
||||||
// ToolsTexturesTabPage
|
// ToolsTexturesTabPage
|
||||||
//
|
//
|
||||||
|
this.ToolsTexturesTabPage.Controls.Add(this.TextureViewerButton);
|
||||||
this.ToolsTexturesTabPage.Controls.Add(this.TexturesTreeView);
|
this.ToolsTexturesTabPage.Controls.Add(this.TexturesTreeView);
|
||||||
this.ToolsTexturesTabPage.Location = new System.Drawing.Point(4, 22);
|
this.ToolsTexturesTabPage.Location = new System.Drawing.Point(4, 22);
|
||||||
this.ToolsTexturesTabPage.Name = "ToolsTexturesTabPage";
|
this.ToolsTexturesTabPage.Name = "ToolsTexturesTabPage";
|
||||||
@ -221,10 +223,10 @@
|
|||||||
this.TexturesTreeView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
this.TexturesTreeView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||||
| System.Windows.Forms.AnchorStyles.Left)
|
| System.Windows.Forms.AnchorStyles.Left)
|
||||||
| System.Windows.Forms.AnchorStyles.Right)));
|
| System.Windows.Forms.AnchorStyles.Right)));
|
||||||
this.TexturesTreeView.Location = new System.Drawing.Point(0, 3);
|
this.TexturesTreeView.Location = new System.Drawing.Point(0, 34);
|
||||||
this.TexturesTreeView.Name = "TexturesTreeView";
|
this.TexturesTreeView.Name = "TexturesTreeView";
|
||||||
this.TexturesTreeView.ShowRootLines = false;
|
this.TexturesTreeView.ShowRootLines = false;
|
||||||
this.TexturesTreeView.Size = new System.Drawing.Size(205, 497);
|
this.TexturesTreeView.Size = new System.Drawing.Size(205, 466);
|
||||||
this.TexturesTreeView.TabIndex = 1;
|
this.TexturesTreeView.TabIndex = 1;
|
||||||
//
|
//
|
||||||
// ToolsDetailsTabPage
|
// ToolsDetailsTabPage
|
||||||
@ -600,6 +602,16 @@
|
|||||||
this.ToolsPanelShowButton.UseVisualStyleBackColor = true;
|
this.ToolsPanelShowButton.UseVisualStyleBackColor = true;
|
||||||
this.ToolsPanelShowButton.Click += new System.EventHandler(this.ToolsPanelShowButton_Click);
|
this.ToolsPanelShowButton.Click += new System.EventHandler(this.ToolsPanelShowButton_Click);
|
||||||
//
|
//
|
||||||
|
// TextureViewerButton
|
||||||
|
//
|
||||||
|
this.TextureViewerButton.Location = new System.Drawing.Point(6, 6);
|
||||||
|
this.TextureViewerButton.Name = "TextureViewerButton";
|
||||||
|
this.TextureViewerButton.Size = new System.Drawing.Size(113, 23);
|
||||||
|
this.TextureViewerButton.TabIndex = 2;
|
||||||
|
this.TextureViewerButton.Text = "Open texture viewer";
|
||||||
|
this.TextureViewerButton.UseVisualStyleBackColor = true;
|
||||||
|
this.TextureViewerButton.Click += new System.EventHandler(this.TextureViewerButton_Click);
|
||||||
|
//
|
||||||
// ModelForm
|
// ModelForm
|
||||||
//
|
//
|
||||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||||
@ -683,5 +695,6 @@
|
|||||||
private System.Windows.Forms.Label label19;
|
private System.Windows.Forms.Label label19;
|
||||||
private System.Windows.Forms.TrackBar TimeOfDayTrackBar;
|
private System.Windows.Forms.TrackBar TimeOfDayTrackBar;
|
||||||
private System.Windows.Forms.CheckBox SkeletonsCheckBox;
|
private System.Windows.Forms.CheckBox SkeletonsCheckBox;
|
||||||
|
private System.Windows.Forms.Button TextureViewerButton;
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -533,12 +533,6 @@ namespace CodeWalker.Forms
|
|||||||
Renderer.RenderCollisionMesh(Ybn.Bounds, null);
|
Renderer.RenderCollisionMesh(Ybn.Bounds, null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (Ypt != null)
|
|
||||||
{
|
|
||||||
if (Ypt.Loaded)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (Ynv != null)
|
else if (Ynv != null)
|
||||||
{
|
{
|
||||||
if (Ynv.Loaded)
|
if (Ynv.Loaded)
|
||||||
@ -1512,5 +1506,31 @@ namespace CodeWalker.Forms
|
|||||||
{
|
{
|
||||||
StatusStrip.Visible = StatusBarCheckBox.Checked;
|
StatusStrip.Visible = StatusBarCheckBox.Checked;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void TextureViewerButton_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
TextureDictionary td = null;
|
||||||
|
|
||||||
|
if ((Ydr != null) && (Ydr.Loaded))
|
||||||
|
{
|
||||||
|
td = Ydr.Drawable?.ShaderGroup?.TextureDictionary;
|
||||||
|
}
|
||||||
|
else if ((Yft != null) && (Yft.Loaded))
|
||||||
|
{
|
||||||
|
td = Yft.Fragment?.Drawable?.ShaderGroup?.TextureDictionary;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (td != null)
|
||||||
|
{
|
||||||
|
YtdForm f = new YtdForm();
|
||||||
|
f.Show();
|
||||||
|
f.LoadTexDict(td, fileName);
|
||||||
|
//f.LoadYtd(ytd);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
MessageBox.Show("Couldn't find embedded texture dict.");
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user