diff --git a/.vs/Switch_Toolbox/v15/.suo b/.vs/Switch_Toolbox/v15/.suo index d7e5607d..29b11781 100644 Binary files a/.vs/Switch_Toolbox/v15/.suo and b/.vs/Switch_Toolbox/v15/.suo differ diff --git a/.vs/Switch_Toolbox/v15/Server/sqlite3/storage.ide b/.vs/Switch_Toolbox/v15/Server/sqlite3/storage.ide index 2abe3d57..0326f8ba 100644 Binary files a/.vs/Switch_Toolbox/v15/Server/sqlite3/storage.ide and b/.vs/Switch_Toolbox/v15/Server/sqlite3/storage.ide differ diff --git a/.vs/Switch_Toolbox/v15/Server/sqlite3/storage.ide-shm b/.vs/Switch_Toolbox/v15/Server/sqlite3/storage.ide-shm index 3f1ef43d..6ed7ea29 100644 Binary files a/.vs/Switch_Toolbox/v15/Server/sqlite3/storage.ide-shm and b/.vs/Switch_Toolbox/v15/Server/sqlite3/storage.ide-shm differ diff --git a/.vs/Switch_Toolbox/v15/Server/sqlite3/storage.ide-wal b/.vs/Switch_Toolbox/v15/Server/sqlite3/storage.ide-wal index 050bde1c..bc7c2eb0 100644 Binary files a/.vs/Switch_Toolbox/v15/Server/sqlite3/storage.ide-wal and b/.vs/Switch_Toolbox/v15/Server/sqlite3/storage.ide-wal differ diff --git a/Switch_FileFormatsMain/GUI/BFRES/Materials/ShaderParams/ShaderParamEditor.Designer.cs b/Switch_FileFormatsMain/GUI/BFRES/Materials/ShaderParams/ShaderParamEditor.Designer.cs index a722d0f7..c96d8cc0 100644 --- a/Switch_FileFormatsMain/GUI/BFRES/Materials/ShaderParams/ShaderParamEditor.Designer.cs +++ b/Switch_FileFormatsMain/GUI/BFRES/Materials/ShaderParams/ShaderParamEditor.Designer.cs @@ -31,6 +31,8 @@ this.stFlowLayoutPanel1 = new Switch_Toolbox.Library.Forms.STFlowLayoutPanel(); this.stButton1 = 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(); // // stFlowLayoutPanel1 @@ -39,6 +41,8 @@ | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.stFlowLayoutPanel1.AutoScroll = true; + this.stFlowLayoutPanel1.FixedHeight = false; + this.stFlowLayoutPanel1.FixedWidth = true; this.stFlowLayoutPanel1.FlowDirection = System.Windows.Forms.FlowDirection.TopDown; this.stFlowLayoutPanel1.Location = new System.Drawing.Point(3, 29); this.stFlowLayoutPanel1.Margin = new System.Windows.Forms.Padding(0); @@ -67,10 +71,34 @@ this.stButton2.Text = "Remove"; 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 // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 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.stButton1); this.Controls.Add(this.stFlowLayoutPanel1); @@ -85,5 +113,7 @@ private Switch_Toolbox.Library.Forms.STFlowLayoutPanel stFlowLayoutPanel1; private Switch_Toolbox.Library.Forms.STButton stButton1; private Switch_Toolbox.Library.Forms.STButton stButton2; + private Switch_Toolbox.Library.Forms.STButton btnExport; + private Switch_Toolbox.Library.Forms.STButton btnImport; } } diff --git a/Switch_FileFormatsMain/GUI/BFRES/Materials/ShaderParams/ShaderParamEditor.cs b/Switch_FileFormatsMain/GUI/BFRES/Materials/ShaderParams/ShaderParamEditor.cs index 84e1360c..8c2f3311 100644 --- a/Switch_FileFormatsMain/GUI/BFRES/Materials/ShaderParams/ShaderParamEditor.cs +++ b/Switch_FileFormatsMain/GUI/BFRES/Materials/ShaderParams/ShaderParamEditor.cs @@ -194,5 +194,31 @@ namespace FirstPlugin.Forms private float RoundParam(float Value) { 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); + } + } } } diff --git a/Switch_FileFormatsMain/obj/Release/DesignTimeResolveAssemblyReferences.cache b/Switch_FileFormatsMain/obj/Release/DesignTimeResolveAssemblyReferences.cache index 8b1c2e6d..73dce5e3 100644 Binary files a/Switch_FileFormatsMain/obj/Release/DesignTimeResolveAssemblyReferences.cache and b/Switch_FileFormatsMain/obj/Release/DesignTimeResolveAssemblyReferences.cache differ