Readd param XML swapping from 0.8
This commit is contained in:
parent
c4e343b07d
commit
1487422c38
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -31,6 +31,8 @@
|
|||||||
this.stFlowLayoutPanel1 = new Switch_Toolbox.Library.Forms.STFlowLayoutPanel();
|
this.stFlowLayoutPanel1 = new Switch_Toolbox.Library.Forms.STFlowLayoutPanel();
|
||||||
this.stButton1 = new Switch_Toolbox.Library.Forms.STButton();
|
this.stButton1 = new Switch_Toolbox.Library.Forms.STButton();
|
||||||
this.stButton2 = new Switch_Toolbox.Library.Forms.STButton();
|
this.stButton2 = new Switch_Toolbox.Library.Forms.STButton();
|
||||||
|
this.btnExport = new Switch_Toolbox.Library.Forms.STButton();
|
||||||
|
this.btnImport = new Switch_Toolbox.Library.Forms.STButton();
|
||||||
this.SuspendLayout();
|
this.SuspendLayout();
|
||||||
//
|
//
|
||||||
// stFlowLayoutPanel1
|
// stFlowLayoutPanel1
|
||||||
@ -39,6 +41,8 @@
|
|||||||
| System.Windows.Forms.AnchorStyles.Left)
|
| System.Windows.Forms.AnchorStyles.Left)
|
||||||
| System.Windows.Forms.AnchorStyles.Right)));
|
| System.Windows.Forms.AnchorStyles.Right)));
|
||||||
this.stFlowLayoutPanel1.AutoScroll = true;
|
this.stFlowLayoutPanel1.AutoScroll = true;
|
||||||
|
this.stFlowLayoutPanel1.FixedHeight = false;
|
||||||
|
this.stFlowLayoutPanel1.FixedWidth = true;
|
||||||
this.stFlowLayoutPanel1.FlowDirection = System.Windows.Forms.FlowDirection.TopDown;
|
this.stFlowLayoutPanel1.FlowDirection = System.Windows.Forms.FlowDirection.TopDown;
|
||||||
this.stFlowLayoutPanel1.Location = new System.Drawing.Point(3, 29);
|
this.stFlowLayoutPanel1.Location = new System.Drawing.Point(3, 29);
|
||||||
this.stFlowLayoutPanel1.Margin = new System.Windows.Forms.Padding(0);
|
this.stFlowLayoutPanel1.Margin = new System.Windows.Forms.Padding(0);
|
||||||
@ -67,10 +71,34 @@
|
|||||||
this.stButton2.Text = "Remove";
|
this.stButton2.Text = "Remove";
|
||||||
this.stButton2.UseVisualStyleBackColor = false;
|
this.stButton2.UseVisualStyleBackColor = false;
|
||||||
//
|
//
|
||||||
|
// btnExport
|
||||||
|
//
|
||||||
|
this.btnExport.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||||
|
this.btnExport.Location = new System.Drawing.Point(183, 3);
|
||||||
|
this.btnExport.Name = "btnExport";
|
||||||
|
this.btnExport.Size = new System.Drawing.Size(75, 23);
|
||||||
|
this.btnExport.TabIndex = 3;
|
||||||
|
this.btnExport.Text = "Export";
|
||||||
|
this.btnExport.UseVisualStyleBackColor = false;
|
||||||
|
this.btnExport.Click += new System.EventHandler(this.btnExport_Click);
|
||||||
|
//
|
||||||
|
// btnImport
|
||||||
|
//
|
||||||
|
this.btnImport.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||||
|
this.btnImport.Location = new System.Drawing.Point(264, 3);
|
||||||
|
this.btnImport.Name = "btnImport";
|
||||||
|
this.btnImport.Size = new System.Drawing.Size(75, 23);
|
||||||
|
this.btnImport.TabIndex = 4;
|
||||||
|
this.btnImport.Text = "Import";
|
||||||
|
this.btnImport.UseVisualStyleBackColor = false;
|
||||||
|
this.btnImport.Click += new System.EventHandler(this.btnImport_Click);
|
||||||
|
//
|
||||||
// ShaderParamEditor
|
// ShaderParamEditor
|
||||||
//
|
//
|
||||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
|
this.Controls.Add(this.btnImport);
|
||||||
|
this.Controls.Add(this.btnExport);
|
||||||
this.Controls.Add(this.stButton2);
|
this.Controls.Add(this.stButton2);
|
||||||
this.Controls.Add(this.stButton1);
|
this.Controls.Add(this.stButton1);
|
||||||
this.Controls.Add(this.stFlowLayoutPanel1);
|
this.Controls.Add(this.stFlowLayoutPanel1);
|
||||||
@ -85,5 +113,7 @@
|
|||||||
private Switch_Toolbox.Library.Forms.STFlowLayoutPanel stFlowLayoutPanel1;
|
private Switch_Toolbox.Library.Forms.STFlowLayoutPanel stFlowLayoutPanel1;
|
||||||
private Switch_Toolbox.Library.Forms.STButton stButton1;
|
private Switch_Toolbox.Library.Forms.STButton stButton1;
|
||||||
private Switch_Toolbox.Library.Forms.STButton stButton2;
|
private Switch_Toolbox.Library.Forms.STButton stButton2;
|
||||||
|
private Switch_Toolbox.Library.Forms.STButton btnExport;
|
||||||
|
private Switch_Toolbox.Library.Forms.STButton btnImport;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -194,5 +194,31 @@ namespace FirstPlugin.Forms
|
|||||||
private float RoundParam(float Value) {
|
private float RoundParam(float Value) {
|
||||||
return (float)Math.Round(Value, 2);
|
return (float)Math.Round(Value, 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void btnExport_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
SaveFileDialog sfd = new SaveFileDialog();
|
||||||
|
sfd.Filter = "Material Params|*.xml;";
|
||||||
|
sfd.DefaultExt = ".xml";
|
||||||
|
sfd.FileName = material.Text + ".MatParams";
|
||||||
|
|
||||||
|
if (sfd.ShowDialog() == DialogResult.OK)
|
||||||
|
{
|
||||||
|
FMAT2XML.Save(material, sfd.FileName, true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void btnImport_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
OpenFileDialog ofd = new OpenFileDialog();
|
||||||
|
ofd.Filter = "Material Params|*.xml;";
|
||||||
|
ofd.DefaultExt = ".xml";
|
||||||
|
ofd.FileName = material.Text + ".MatParams";
|
||||||
|
|
||||||
|
if (ofd.ShowDialog() == DialogResult.OK)
|
||||||
|
{
|
||||||
|
FMAT2XML.Read(material, ofd.FileName, true);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Binary file not shown.
Loading…
Reference in New Issue
Block a user