mirror of
https://github.com/KillzXGaming/Switch-Toolbox
synced 2024-11-23 04:53:09 +00:00
bflim filename fixes when made in a layout
This commit is contained in:
parent
8529b0b818
commit
137cbc2bbb
2 changed files with 4 additions and 2 deletions
|
@ -79,6 +79,7 @@ namespace LayoutBXLYT
|
|||
if (ofd.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
((BFLIM)fileFormat).Replace(ofd.FileName);
|
||||
((BFLIM)fileFormat).Text = name;
|
||||
return (BFLIM)fileFormat;
|
||||
}
|
||||
}
|
||||
|
@ -102,6 +103,7 @@ namespace LayoutBXLYT
|
|||
if (archive == null) return null;
|
||||
|
||||
var bflim = BFLIM.CreateNewFromImage();
|
||||
|
||||
if (bflim == null)
|
||||
return textures;
|
||||
|
||||
|
@ -112,7 +114,7 @@ namespace LayoutBXLYT
|
|||
archive.AddFile(new ArchiveFileInfo()
|
||||
{
|
||||
FileData = mem.ToArray(),
|
||||
FileName = bflim.FileName,
|
||||
FileName = bflim.Text,
|
||||
});
|
||||
}
|
||||
break;
|
||||
|
|
|
@ -270,7 +270,7 @@ namespace FirstPlugin
|
|||
ftex.ReplaceTexture(ofd.FileName, TEX_FORMAT.BC3_UNORM_SRGB, 1, 0, bflim.SupportedFormats, false, true, false);
|
||||
if (ftex.texture != null)
|
||||
{
|
||||
bflim.Text = ftex.texture.Name;
|
||||
bflim.Text = $"{Path.GetFileNameWithoutExtension(ofd.FileName)}.bflim";
|
||||
bflim.image = new Image();
|
||||
bflim.image.Swizzle = (byte)ftex.texture.Swizzle;
|
||||
bflim.image.BflimFormat = FormatsWiiU.FirstOrDefault(x => x.Value == ftex.Format).Key;
|
||||
|
|
Loading…
Reference in a new issue