1
0
mirror of synced 2024-11-28 01:10:51 +01:00

Fix duplicate name check causing infinite loop

This commit is contained in:
KillzXGaming 2019-05-04 15:15:44 -04:00
parent 7668f9ad4c
commit 686d6f809e
18 changed files with 473 additions and 17 deletions

Binary file not shown.

View File

@ -51,6 +51,21 @@ namespace FirstPlugin
if (File.Exists(node.InnerText))
PluginRuntime.OdysseyGamePath = node.InnerText;
break;
case "SwapRenderInfos":
bool.TryParse(node.InnerText, out PluginRuntime.MaterialReplace.SwapRenderInfos);
break;
case "SwapShaderOptions":
bool.TryParse(node.InnerText, out PluginRuntime.MaterialReplace.SwapShaderOptions);
break;
case "SwapShaderParams":
bool.TryParse(node.InnerText, out PluginRuntime.MaterialReplace.SwapShaderParams);
break;
case "SwapTextures":
bool.TryParse(node.InnerText, out PluginRuntime.MaterialReplace.SwapTextures);
break;
case "SwapUserData":
bool.TryParse(node.InnerText, out PluginRuntime.MaterialReplace.SwapUserData);
break;
}
}
}
@ -67,6 +82,8 @@ namespace FirstPlugin
AppendDOCKSettings(doc, mainNode);
AppendPathSettings(doc, mainNode);
AppendMaterialReplaceSettings(doc, mainNode);
return doc;
}
private static void AppendPathSettings(XmlDocument doc, XmlNode parentNode)
@ -76,6 +93,16 @@ namespace FirstPlugin
pathSettingsNode.AppendChild(createNode(doc, "ExternalFMATPath", PluginRuntime.ExternalFMATPath));
pathSettingsNode.AppendChild(createNode(doc, "MarioOdysseyGamePath", PluginRuntime.OdysseyGamePath));
}
private static void AppendMaterialReplaceSettings(XmlDocument doc, XmlNode parentNode)
{
XmlNode matReplaceSettingsNode = doc.CreateElement("MAT_REPLACE");
parentNode.AppendChild(matReplaceSettingsNode);
matReplaceSettingsNode.AppendChild(createNode(doc, "SwapRenderInfos", PluginRuntime.MaterialReplace.SwapRenderInfos.ToString()));
matReplaceSettingsNode.AppendChild(createNode(doc, "SwapShaderOptions", PluginRuntime.MaterialReplace.SwapShaderOptions.ToString()));
matReplaceSettingsNode.AppendChild(createNode(doc, "SwapShaderParams", PluginRuntime.MaterialReplace.SwapShaderParams.ToString()));
matReplaceSettingsNode.AppendChild(createNode(doc, "SwapTextures", PluginRuntime.MaterialReplace.SwapTextures.ToString()));
matReplaceSettingsNode.AppendChild(createNode(doc, "SwapUserData", PluginRuntime.MaterialReplace.SwapUserData.ToString()));
}
private static void AppendDOCKSettings(XmlDocument doc, XmlNode parentNode)
{
XmlNode renderSettingsNode = doc.CreateElement("DOCKSETTINGS");

View File

@ -982,11 +982,15 @@ namespace Bfres.Structs
SubMeshCount = 1,
});
}
}
progressBar.Task = $"Checking name duplicates. Mesh: {obj.ObjectName}";
progressBar.Refresh();
progressBar.Task = $"Checking name duplicates.";
progressBar.Value = 99;
progressBar.Refresh();
//now rename dupes
foreach (var shape in shapes)
{
List<string> keyList = shapes.Select(o => o.Text).ToList();
shape.Text = Utils.RenameDuplicateString(keyList, shape.Text);
}
@ -1001,6 +1005,8 @@ namespace Bfres.Structs
break;
}
Console.WriteLine("Updating Vertex Data");
if (IsEdited)
UpdateVertexData();
}

View File

@ -63,7 +63,7 @@ namespace Bfres.Structs
if (((FMDL)Parent).materials.ContainsKey(Name) &&
(file.EndsWith(".bfmat")))
{
((FMDL)Parent).materials[Name].Replace(file);
((FMDL)Parent).materials[Name].Replace(file, false);
}
}
}
@ -260,22 +260,92 @@ namespace Bfres.Structs
if (ofd.ShowDialog() == DialogResult.OK)
{
Replace(ofd.FileName);
Replace(ofd.FileName, false);
}
}
public void Replace(string path)
public void Replace(string path, bool UseReplaceDialog)
{
if (GetResFileU() != null)
{
MaterialU.Import(path, GetResFileU());
MaterialU.Name = Text;
BfresWiiU.ReadMaterial(this, MaterialU);
if (UseReplaceDialog)
{
MaterialReplaceDialog dialog = new MaterialReplaceDialog();
if (dialog.ShowDialog() == DialogResult.OK)
{
var mat = new ResU.Material();
mat.Import(path, GetResFileU());
if (PluginRuntime.MaterialReplace.SwapRenderInfos)
MaterialU.RenderInfos = mat.RenderInfos;
if (PluginRuntime.MaterialReplace.SwapShaderOptions)
MaterialU.ShaderAssign = mat.ShaderAssign;
if (PluginRuntime.MaterialReplace.SwapShaderParams)
{
MaterialU.ShaderParamData = mat.ShaderParamData;
MaterialU.ShaderParams = mat.ShaderParams;
}
if (PluginRuntime.MaterialReplace.SwapTextures)
{
MaterialU.ShaderAssign.SamplerAssigns = mat.ShaderAssign.SamplerAssigns;
MaterialU.TextureRefs = mat.TextureRefs;
MaterialU.Samplers = mat.Samplers;
}
if (PluginRuntime.MaterialReplace.SwapUserData)
MaterialU.UserData = mat.UserData;
}
}
else
{
MaterialU.Import(path, GetResFileU());
MaterialU.Name = Text;
BfresWiiU.ReadMaterial(this, MaterialU);
}
}
else
{
Material.Import(path);
Material.Name = Text;
BfresSwitch.ReadMaterial(this, Material);
if (UseReplaceDialog)
{
MaterialReplaceDialog dialog = new MaterialReplaceDialog();
if (dialog.ShowDialog() == DialogResult.OK)
{
var mat = new Material();
mat.Import(path);
if (PluginRuntime.MaterialReplace.SwapRenderInfos)
{
Material.RenderInfoDict = mat.RenderInfoDict;
Material.RenderInfos = mat.RenderInfos;
}
if (PluginRuntime.MaterialReplace.SwapShaderOptions)
Material.ShaderAssign = mat.ShaderAssign;
if (PluginRuntime.MaterialReplace.SwapShaderParams)
{
Material.ShaderParamData = mat.ShaderParamData;
Material.ShaderParams = mat.ShaderParams;
Material.ShaderParamDict = mat.ShaderParamDict;
}
if (PluginRuntime.MaterialReplace.SwapTextures)
{
Material.ShaderAssign.SamplerAssigns = mat.ShaderAssign.SamplerAssigns;
Material.TextureRefs = mat.TextureRefs;
Material.Samplers = mat.Samplers;
Material.SamplerDict = mat.SamplerDict;
Material.SamplerSlotArray = mat.SamplerSlotArray;
Material.TextureSlotArray = mat.TextureSlotArray;
}
if (PluginRuntime.MaterialReplace.SwapUserData)
{
Material.UserDatas = mat.UserDatas;
Material.UserDataDict = mat.UserDataDict;
}
}
}
else
{
Material.Import(path);
Material.Name = Text;
BfresSwitch.ReadMaterial(this, Material);
}
}
}

View File

@ -0,0 +1,173 @@
namespace FirstPlugin.Forms
{
partial class MaterialReplaceDialog
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.textureChkBox = new Switch_Toolbox.Library.Forms.STCheckBox();
this.stLabel1 = new Switch_Toolbox.Library.Forms.STLabel();
this.paramChkBox = new Switch_Toolbox.Library.Forms.STCheckBox();
this.renderInfosChkBox = new Switch_Toolbox.Library.Forms.STCheckBox();
this.optionsChkBox = new Switch_Toolbox.Library.Forms.STCheckBox();
this.UserDataChkBox = new Switch_Toolbox.Library.Forms.STCheckBox();
this.stButton1 = new Switch_Toolbox.Library.Forms.STButton();
this.stButton2 = new Switch_Toolbox.Library.Forms.STButton();
this.contentContainer.SuspendLayout();
this.SuspendLayout();
//
// contentContainer
//
this.contentContainer.Controls.Add(this.stButton2);
this.contentContainer.Controls.Add(this.stButton1);
this.contentContainer.Controls.Add(this.UserDataChkBox);
this.contentContainer.Controls.Add(this.optionsChkBox);
this.contentContainer.Controls.Add(this.renderInfosChkBox);
this.contentContainer.Controls.Add(this.paramChkBox);
this.contentContainer.Controls.Add(this.stLabel1);
this.contentContainer.Controls.Add(this.textureChkBox);
this.contentContainer.Size = new System.Drawing.Size(208, 243);
this.contentContainer.Controls.SetChildIndex(this.textureChkBox, 0);
this.contentContainer.Controls.SetChildIndex(this.stLabel1, 0);
this.contentContainer.Controls.SetChildIndex(this.paramChkBox, 0);
this.contentContainer.Controls.SetChildIndex(this.renderInfosChkBox, 0);
this.contentContainer.Controls.SetChildIndex(this.optionsChkBox, 0);
this.contentContainer.Controls.SetChildIndex(this.UserDataChkBox, 0);
this.contentContainer.Controls.SetChildIndex(this.stButton1, 0);
this.contentContainer.Controls.SetChildIndex(this.stButton2, 0);
//
// textureChkBox
//
this.textureChkBox.AutoSize = true;
this.textureChkBox.Location = new System.Drawing.Point(12, 73);
this.textureChkBox.Name = "textureChkBox";
this.textureChkBox.Size = new System.Drawing.Size(91, 17);
this.textureChkBox.TabIndex = 11;
this.textureChkBox.Text = "Texture Maps";
this.textureChkBox.UseVisualStyleBackColor = true;
this.textureChkBox.CheckedChanged += new System.EventHandler(this.ChkBox_CheckedChanged);
//
// stLabel1
//
this.stLabel1.AutoSize = true;
this.stLabel1.Location = new System.Drawing.Point(9, 41);
this.stLabel1.Name = "stLabel1";
this.stLabel1.Size = new System.Drawing.Size(192, 13);
this.stLabel1.TabIndex = 12;
this.stLabel1.Text = "Select the sectiions you want replaced:";
//
// paramChkBox
//
this.paramChkBox.AutoSize = true;
this.paramChkBox.Location = new System.Drawing.Point(12, 96);
this.paramChkBox.Name = "paramChkBox";
this.paramChkBox.Size = new System.Drawing.Size(98, 17);
this.paramChkBox.TabIndex = 13;
this.paramChkBox.Text = "Shader Params";
this.paramChkBox.UseVisualStyleBackColor = true;
this.paramChkBox.CheckedChanged += new System.EventHandler(this.ChkBox_CheckedChanged);
//
// renderInfosChkBox
//
this.renderInfosChkBox.AutoSize = true;
this.renderInfosChkBox.Location = new System.Drawing.Point(12, 142);
this.renderInfosChkBox.Name = "renderInfosChkBox";
this.renderInfosChkBox.Size = new System.Drawing.Size(82, 17);
this.renderInfosChkBox.TabIndex = 14;
this.renderInfosChkBox.Text = "Render Info";
this.renderInfosChkBox.UseVisualStyleBackColor = true;
this.renderInfosChkBox.CheckedChanged += new System.EventHandler(this.ChkBox_CheckedChanged);
//
// optionsChkBox
//
this.optionsChkBox.AutoSize = true;
this.optionsChkBox.Location = new System.Drawing.Point(12, 119);
this.optionsChkBox.Name = "optionsChkBox";
this.optionsChkBox.Size = new System.Drawing.Size(99, 17);
this.optionsChkBox.TabIndex = 15;
this.optionsChkBox.Text = "Shader Options";
this.optionsChkBox.UseVisualStyleBackColor = true;
this.optionsChkBox.CheckedChanged += new System.EventHandler(this.ChkBox_CheckedChanged);
//
// UserDataChkBox
//
this.UserDataChkBox.AutoSize = true;
this.UserDataChkBox.Location = new System.Drawing.Point(12, 165);
this.UserDataChkBox.Name = "UserDataChkBox";
this.UserDataChkBox.Size = new System.Drawing.Size(74, 17);
this.UserDataChkBox.TabIndex = 16;
this.UserDataChkBox.Text = "User Data";
this.UserDataChkBox.UseVisualStyleBackColor = true;
this.UserDataChkBox.CheckedChanged += new System.EventHandler(this.ChkBox_CheckedChanged);
//
// stButton1
//
this.stButton1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.stButton1.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.stButton1.Location = new System.Drawing.Point(124, 211);
this.stButton1.Name = "stButton1";
this.stButton1.Size = new System.Drawing.Size(75, 23);
this.stButton1.TabIndex = 17;
this.stButton1.Text = "Cancel";
this.stButton1.UseVisualStyleBackColor = false;
//
// stButton2
//
this.stButton2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.stButton2.DialogResult = System.Windows.Forms.DialogResult.OK;
this.stButton2.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.stButton2.Location = new System.Drawing.Point(43, 211);
this.stButton2.Name = "stButton2";
this.stButton2.Size = new System.Drawing.Size(75, 23);
this.stButton2.TabIndex = 18;
this.stButton2.Text = "Ok";
this.stButton2.UseVisualStyleBackColor = false;
//
// MaterialReplaceDialog
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(214, 248);
this.Name = "MaterialReplaceDialog";
this.Text = "Material Replace";
this.contentContainer.ResumeLayout(false);
this.contentContainer.PerformLayout();
this.ResumeLayout(false);
}
#endregion
private Switch_Toolbox.Library.Forms.STCheckBox textureChkBox;
private Switch_Toolbox.Library.Forms.STButton stButton2;
private Switch_Toolbox.Library.Forms.STButton stButton1;
private Switch_Toolbox.Library.Forms.STCheckBox UserDataChkBox;
private Switch_Toolbox.Library.Forms.STCheckBox optionsChkBox;
private Switch_Toolbox.Library.Forms.STCheckBox renderInfosChkBox;
private Switch_Toolbox.Library.Forms.STCheckBox paramChkBox;
private Switch_Toolbox.Library.Forms.STLabel stLabel1;
}
}

View File

@ -0,0 +1,45 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using Switch_Toolbox.Library.Forms;
namespace FirstPlugin.Forms
{
public partial class MaterialReplaceDialog : STForm
{
bool IsLoaded = false;
public MaterialReplaceDialog()
{
InitializeComponent();
stButton2.Select();
paramChkBox.Checked = PluginRuntime.MaterialReplace.SwapShaderParams;
optionsChkBox.Checked = PluginRuntime.MaterialReplace.SwapShaderOptions;
renderInfosChkBox.Checked = PluginRuntime.MaterialReplace.SwapRenderInfos;
textureChkBox.Checked = PluginRuntime.MaterialReplace.SwapTextures;
UserDataChkBox.Checked = PluginRuntime.MaterialReplace.SwapUserData;
IsLoaded = true;
}
private void ChkBox_CheckedChanged(object sender, EventArgs e)
{
if (!IsLoaded)
return;
PluginRuntime.MaterialReplace.SwapShaderParams = paramChkBox.Checked;
PluginRuntime.MaterialReplace.SwapShaderOptions = optionsChkBox.Checked;
PluginRuntime.MaterialReplace.SwapRenderInfos = renderInfosChkBox.Checked;
PluginRuntime.MaterialReplace.SwapTextures = textureChkBox.Checked;
PluginRuntime.MaterialReplace.SwapUserData = UserDataChkBox.Checked;
}
}
}

View File

@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View File

@ -9,6 +9,15 @@ namespace FirstPlugin
{
public class PluginRuntime
{
public class MaterialReplace
{
public static bool SwapShaderParams = true;
public static bool SwapTextures = false;
public static bool SwapShaderOptions = true;
public static bool SwapRenderInfos = true;
public static bool SwapUserData = true;
}
public static bool UseSimpleBfresEditor = false;
public static Dictionary<string, BFLIM> bflimTextures = new Dictionary<string, BFLIM>();

View File

@ -265,6 +265,12 @@
<Compile Include="GUI\BFRES\BoneVisualAnims\VisObjectAddDialog.Designer.cs">
<DependentUpon>VisObjectAddDialog.cs</DependentUpon>
</Compile>
<Compile Include="GUI\BFRES\Materials\MaterialReplaceDialog.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="GUI\BFRES\Materials\MaterialReplaceDialog.Designer.cs">
<DependentUpon>MaterialReplaceDialog.cs</DependentUpon>
</Compile>
<Compile Include="GUI\BFRES\Materials\ShaderAssign\VertexAttributeInputListEdit.cs">
<SubType>Form</SubType>
</Compile>
@ -871,6 +877,9 @@
<EmbeddedResource Include="GUI\BFRES\BoneVisualAnims\VisObjectAddDialog.resx">
<DependentUpon>VisObjectAddDialog.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="GUI\BFRES\Materials\MaterialReplaceDialog.resx">
<DependentUpon>MaterialReplaceDialog.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="GUI\BFRES\Materials\ShaderAssign\VertexAttributeInputListEdit.resx">
<DependentUpon>VertexAttributeInputListEdit.cs</DependentUpon>
</EmbeddedResource>

View File

@ -1 +1 @@
fa60e761d9f1c6e0b70e45d0b2afad8de06fe3e0
64ec8d8fe44431f43fef55c1aec06c512e5e1c8b

View File

@ -325,3 +325,4 @@ C:\Users\Nathan\Documents\GitHub\SwitchToolboxV1\Switch_FileFormatsMain\obj\Rele
C:\Users\Nathan\Documents\GitHub\SwitchToolboxV1\Switch_FileFormatsMain\obj\Release\FirstPlugin.Forms.EffectTableEditor.resources
C:\Users\Nathan\Documents\GitHub\SwitchToolboxV1\Switch_FileFormatsMain\obj\Release\FirstPlugin.Forms.ParamValueDialog.resources
C:\Users\Nathan\Documents\GitHub\SwitchToolboxV1\Switch_FileFormatsMain\obj\Release\FirstPlugin.Forms.AampEditorBase.resources
C:\Users\Nathan\Documents\GitHub\SwitchToolboxV1\Switch_FileFormatsMain\obj\Release\FirstPlugin.Forms.MaterialReplaceDialog.resources

View File

@ -367,9 +367,6 @@ namespace Switch_Toolbox.Library.Forms
else
BitmapExtension.SetChannel(image, STChannelType.Red, STChannelType.Green, STChannelType.Blue, STChannelType.One);
}
if (ShowChannelEditor)
LoadChannelEditor(image);
}
DecodeProcessFinished = true;

View File

@ -131,7 +131,6 @@ namespace Switch_Toolbox.Library
static int i = 0;
public static string RenameDuplicateString(List<string> strings, string oldString)
{
i = 0;
foreach (string s in strings)
{
if (strings.Contains(oldString))