diff --git a/File_Format_Library/FileFormats/Texture/GTXFile.cs b/File_Format_Library/FileFormats/Texture/GTXFile.cs index 6fccacd8..be126b13 100644 --- a/File_Format_Library/FileFormats/Texture/GTXFile.cs +++ b/File_Format_Library/FileFormats/Texture/GTXFile.cs @@ -110,6 +110,14 @@ namespace FirstPlugin Text = FileName; ReadGx2(new FileReader(stream)); + + string name = System.IO.Path.GetFileNameWithoutExtension(Text); + foreach (var image in textures) { + if (Nodes.Count == 1) + image.Text = $"{name}"; + else + image.Text = $"{name}_{textures.IndexOf(image)}"; + } } public ToolStripItem[] GetContextMenuItems() diff --git a/File_Format_Library/FileFormats/Texture/NUT.cs b/File_Format_Library/FileFormats/Texture/NUT.cs index c570d45a..6115cf41 100644 --- a/File_Format_Library/FileFormats/Texture/NUT.cs +++ b/File_Format_Library/FileFormats/Texture/NUT.cs @@ -70,12 +70,13 @@ namespace FirstPlugin NutHeader = new Header(); NutHeader.Read(new FileReader(stream)); + string name = System.IO.Path.GetFileNameWithoutExtension(Text); foreach (var image in NutHeader.Images) { if (NutHeader.Images.Count == 1) - image.Text = $"{Text}"; + image.Text = $"{name}"; else - image.Text = $"{Text}_{Nodes.Count}"; + image.Text = $"{name}_{Nodes.Count}"; Nodes.Add(image); } }