Quick fix with animation editor

Fixed a bug that did not display the "Edit Texture Animation" button on textures in the "textures/blocks" and "textures/items" folders that were missing an ANIM tag
This commit is contained in:
MattNL
2022-04-19 18:32:56 -04:00
parent 9e31eb847c
commit 93720cfd6f

View File

@@ -292,17 +292,6 @@ namespace PckStudio
meta.Tag = entry;
treeMeta.Nodes.Add(meta);
//Check for Animated Texture
if ((mf.name.StartsWith("res/textures/blocks/") || mf.name.StartsWith("res/textures/items/")) && (!mf.name.EndsWith("clock.png") && (!mf.name.EndsWith("compass.png"))))
{
buttonEdit.Text = "EDIT TEXTURE ANIMATION";
buttonEdit.Visible = true;
}
else
{
buttonEdit.Visible = false;
}
//Check for if file contains model data
if (entry[0].ToString()=="BOX")
{
@@ -330,6 +319,17 @@ namespace PckStudio
}
}
//Check for Animated Texture
if ((mf.name.StartsWith("res/textures/blocks/") || mf.name.StartsWith("res/textures/items/")) && (!mf.name.EndsWith("clock.png") && (!mf.name.EndsWith("compass.png"))))
{
buttonEdit.Text = "EDIT TEXTURE ANIMATION";
buttonEdit.Visible = true;
}
else
{
buttonEdit.Visible = false;
}
//If selected item is a image, its displayed with proper dimensions in image box
if (Path.GetExtension(mf.name) == ".png")
{