1
0
mirror of synced 2024-11-12 02:00:50 +01:00

bflim filename fixes when made in a layout

This commit is contained in:
KillzXGaming 2019-10-14 18:50:24 -04:00
parent 8529b0b818
commit 137cbc2bbb
2 changed files with 4 additions and 2 deletions

View File

@ -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;

View File

@ -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;