BFRES : Fix shader variables being switched in UI.
This commit is contained in:
parent
dcba003aba
commit
2056fd1fa0
@ -35,7 +35,7 @@ namespace FirstPlugin.Forms
|
|||||||
var inputs = new Dictionary<string, string>();
|
var inputs = new Dictionary<string, string>();
|
||||||
foreach (AtributeInput item in AtributeInputs)
|
foreach (AtributeInput item in AtributeInputs)
|
||||||
{
|
{
|
||||||
inputs.Add(item.ResourceInput, item.ShaderVariable);
|
inputs.Add(item.ShaderVariable, item.ResourceInput);
|
||||||
}
|
}
|
||||||
return inputs;
|
return inputs;
|
||||||
}
|
}
|
||||||
@ -48,8 +48,8 @@ namespace FirstPlugin.Forms
|
|||||||
listViewCustom1.Items.Add($"{item.Key} : {item.Value}");
|
listViewCustom1.Items.Add($"{item.Key} : {item.Value}");
|
||||||
AtributeInputs.Add(new AtributeInput()
|
AtributeInputs.Add(new AtributeInput()
|
||||||
{
|
{
|
||||||
ResourceInput = item.Key,
|
ShaderVariable = item.Key,
|
||||||
ShaderVariable = item.Value,
|
ResourceInput = item.Value,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -128,11 +128,11 @@ namespace FirstPlugin.Forms
|
|||||||
List<string> KeyCheck = new List<string>();
|
List<string> KeyCheck = new List<string>();
|
||||||
foreach (AtributeInput item in AtributeInputs)
|
foreach (AtributeInput item in AtributeInputs)
|
||||||
{
|
{
|
||||||
if (!KeyCheck.Contains(item.ResourceInput))
|
if (!KeyCheck.Contains(item.ShaderVariable))
|
||||||
KeyCheck.Add(item.ResourceInput);
|
KeyCheck.Add(item.ShaderVariable);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
STErrorDialog.Show($"A Resource Input with the same name already exists! {item.ResourceInput}",
|
STErrorDialog.Show($"A Shader Variable with the same name already exists! {item.ShaderVariable}",
|
||||||
this.Text, "");
|
this.Text, "");
|
||||||
DialogResult = DialogResult.None;
|
DialogResult = DialogResult.None;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user