mirror of
https://mirror.ghproxy.com/https://github.com/dexyfex/CodeWalker
synced 2026-05-15 00:54:47 +08:00
Button in model viewer to open embedded texture dict in YTD viewer
This commit is contained in:
+26
-6
@@ -533,12 +533,6 @@ namespace CodeWalker.Forms
|
||||
Renderer.RenderCollisionMesh(Ybn.Bounds, null);
|
||||
}
|
||||
}
|
||||
else if (Ypt != null)
|
||||
{
|
||||
if (Ypt.Loaded)
|
||||
{
|
||||
}
|
||||
}
|
||||
else if (Ynv != null)
|
||||
{
|
||||
if (Ynv.Loaded)
|
||||
@@ -1512,5 +1506,31 @@ namespace CodeWalker.Forms
|
||||
{
|
||||
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.");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user