Add bmd settings
This commit is contained in:
parent
d9db8c3b09
commit
58406d6d44
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -313,10 +313,17 @@ namespace FirstPlugin
|
||||
ofd.Filter = "Collada DAE |*.dae;";
|
||||
if (ofd.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
Arguments arguments = new Arguments();
|
||||
arguments.input_path = ofd.FileName;
|
||||
var model = Model.Load(arguments);
|
||||
LoadBMD(model);
|
||||
BMDModelImportSettings settings = new BMDModelImportSettings();
|
||||
if (settings.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
Arguments arguments = new Arguments();
|
||||
arguments.input_path = ofd.FileName;
|
||||
arguments.texheaders_path = settings.TexturePath;
|
||||
arguments.materials_path = settings.MaterialPath;
|
||||
|
||||
var model = Model.Load(arguments);
|
||||
LoadBMD(model);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
153
Switch_FileFormatsMain/GUI/BMD/BMDModelImportSettings.Designer.cs
generated
Normal file
153
Switch_FileFormatsMain/GUI/BMD/BMDModelImportSettings.Designer.cs
generated
Normal file
@ -0,0 +1,153 @@
|
||||
namespace FirstPlugin
|
||||
{
|
||||
partial class BMDModelImportSettings
|
||||
{
|
||||
/// <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.texturePathTB = new Switch_Toolbox.Library.Forms.STTextBox();
|
||||
this.stLabel1 = new Switch_Toolbox.Library.Forms.STLabel();
|
||||
this.stLabel2 = new Switch_Toolbox.Library.Forms.STLabel();
|
||||
this.materalPathTB = new Switch_Toolbox.Library.Forms.STTextBox();
|
||||
this.stLabel3 = new Switch_Toolbox.Library.Forms.STLabel();
|
||||
this.stComboBox1 = new Switch_Toolbox.Library.Forms.STComboBox();
|
||||
this.stButton1 = new Switch_Toolbox.Library.Forms.STButton();
|
||||
this.contentContainer.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// contentContainer
|
||||
//
|
||||
this.contentContainer.Controls.Add(this.stButton1);
|
||||
this.contentContainer.Controls.Add(this.stComboBox1);
|
||||
this.contentContainer.Controls.Add(this.stLabel3);
|
||||
this.contentContainer.Controls.Add(this.stLabel2);
|
||||
this.contentContainer.Controls.Add(this.materalPathTB);
|
||||
this.contentContainer.Controls.Add(this.stLabel1);
|
||||
this.contentContainer.Controls.Add(this.texturePathTB);
|
||||
this.contentContainer.Size = new System.Drawing.Size(164, 231);
|
||||
this.contentContainer.Controls.SetChildIndex(this.texturePathTB, 0);
|
||||
this.contentContainer.Controls.SetChildIndex(this.stLabel1, 0);
|
||||
this.contentContainer.Controls.SetChildIndex(this.materalPathTB, 0);
|
||||
this.contentContainer.Controls.SetChildIndex(this.stLabel2, 0);
|
||||
this.contentContainer.Controls.SetChildIndex(this.stLabel3, 0);
|
||||
this.contentContainer.Controls.SetChildIndex(this.stComboBox1, 0);
|
||||
this.contentContainer.Controls.SetChildIndex(this.stButton1, 0);
|
||||
//
|
||||
// texturePathTB
|
||||
//
|
||||
this.texturePathTB.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||
this.texturePathTB.Location = new System.Drawing.Point(22, 111);
|
||||
this.texturePathTB.Name = "texturePathTB";
|
||||
this.texturePathTB.ReadOnly = true;
|
||||
this.texturePathTB.Size = new System.Drawing.Size(121, 20);
|
||||
this.texturePathTB.TabIndex = 11;
|
||||
this.texturePathTB.TextChanged += new System.EventHandler(this.texturePathTB_TextChanged);
|
||||
//
|
||||
// stLabel1
|
||||
//
|
||||
this.stLabel1.AutoSize = true;
|
||||
this.stLabel1.Location = new System.Drawing.Point(19, 95);
|
||||
this.stLabel1.Name = "stLabel1";
|
||||
this.stLabel1.Size = new System.Drawing.Size(73, 13);
|
||||
this.stLabel1.TabIndex = 12;
|
||||
this.stLabel1.Text = "Textures Path";
|
||||
//
|
||||
// stLabel2
|
||||
//
|
||||
this.stLabel2.AutoSize = true;
|
||||
this.stLabel2.Location = new System.Drawing.Point(19, 141);
|
||||
this.stLabel2.Name = "stLabel2";
|
||||
this.stLabel2.Size = new System.Drawing.Size(74, 13);
|
||||
this.stLabel2.TabIndex = 14;
|
||||
this.stLabel2.Text = "Materials Path";
|
||||
//
|
||||
// materalPathTB
|
||||
//
|
||||
this.materalPathTB.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||
this.materalPathTB.Location = new System.Drawing.Point(22, 157);
|
||||
this.materalPathTB.Name = "materalPathTB";
|
||||
this.materalPathTB.ReadOnly = true;
|
||||
this.materalPathTB.Size = new System.Drawing.Size(121, 20);
|
||||
this.materalPathTB.TabIndex = 13;
|
||||
this.materalPathTB.TextChanged += new System.EventHandler(this.materalPathTB_TextChanged);
|
||||
//
|
||||
// stLabel3
|
||||
//
|
||||
this.stLabel3.AutoSize = true;
|
||||
this.stLabel3.Location = new System.Drawing.Point(20, 40);
|
||||
this.stLabel3.Name = "stLabel3";
|
||||
this.stLabel3.Size = new System.Drawing.Size(73, 13);
|
||||
this.stLabel3.TabIndex = 16;
|
||||
this.stLabel3.Text = "Tri Strip Mode";
|
||||
//
|
||||
// stComboBox1
|
||||
//
|
||||
this.stComboBox1.BorderColor = System.Drawing.Color.Empty;
|
||||
this.stComboBox1.BorderStyle = System.Windows.Forms.ButtonBorderStyle.Solid;
|
||||
this.stComboBox1.ButtonColor = System.Drawing.Color.Empty;
|
||||
this.stComboBox1.FormattingEnabled = true;
|
||||
this.stComboBox1.Items.AddRange(new object[] {
|
||||
"static"});
|
||||
this.stComboBox1.Location = new System.Drawing.Point(22, 56);
|
||||
this.stComboBox1.Name = "stComboBox1";
|
||||
this.stComboBox1.ReadOnly = true;
|
||||
this.stComboBox1.Size = new System.Drawing.Size(121, 21);
|
||||
this.stComboBox1.TabIndex = 17;
|
||||
//
|
||||
// stButton1
|
||||
//
|
||||
this.stButton1.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.stButton1.Location = new System.Drawing.Point(73, 202);
|
||||
this.stButton1.Name = "stButton1";
|
||||
this.stButton1.Size = new System.Drawing.Size(75, 23);
|
||||
this.stButton1.TabIndex = 18;
|
||||
this.stButton1.Text = "Ok";
|
||||
this.stButton1.UseVisualStyleBackColor = false;
|
||||
//
|
||||
// BMDModelImportSettings
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(170, 236);
|
||||
this.Name = "BMDModelImportSettings";
|
||||
this.Text = "J3D Import Settings";
|
||||
this.contentContainer.ResumeLayout(false);
|
||||
this.contentContainer.PerformLayout();
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private Switch_Toolbox.Library.Forms.STTextBox texturePathTB;
|
||||
private Switch_Toolbox.Library.Forms.STLabel stLabel1;
|
||||
private Switch_Toolbox.Library.Forms.STLabel stLabel2;
|
||||
private Switch_Toolbox.Library.Forms.STTextBox materalPathTB;
|
||||
private Switch_Toolbox.Library.Forms.STButton stButton1;
|
||||
private Switch_Toolbox.Library.Forms.STComboBox stComboBox1;
|
||||
private Switch_Toolbox.Library.Forms.STLabel stLabel3;
|
||||
}
|
||||
}
|
39
Switch_FileFormatsMain/GUI/BMD/BMDModelImportSettings.cs
Normal file
39
Switch_FileFormatsMain/GUI/BMD/BMDModelImportSettings.cs
Normal file
@ -0,0 +1,39 @@
|
||||
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
|
||||
{
|
||||
public partial class BMDModelImportSettings : STForm
|
||||
{
|
||||
public string TexturePath => texturePathTB.Text;
|
||||
public string MaterialPath => materalPathTB.Text;
|
||||
|
||||
public BMDModelImportSettings()
|
||||
{
|
||||
InitializeComponent();
|
||||
stComboBox1.SelectedIndex = 0;
|
||||
}
|
||||
|
||||
private void texturePathTB_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
FolderSelectDialog ofd = new FolderSelectDialog();
|
||||
if (ofd.ShowDialog() == DialogResult.OK)
|
||||
texturePathTB.Text = ofd.SelectedPath;
|
||||
}
|
||||
|
||||
private void materalPathTB_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
FolderSelectDialog ofd = new FolderSelectDialog();
|
||||
if (ofd.ShowDialog() == DialogResult.OK)
|
||||
materalPathTB.Text = ofd.SelectedPath;
|
||||
}
|
||||
}
|
||||
}
|
120
Switch_FileFormatsMain/GUI/BMD/BMDModelImportSettings.resx
Normal file
120
Switch_FileFormatsMain/GUI/BMD/BMDModelImportSettings.resx
Normal 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>
|
@ -256,6 +256,12 @@
|
||||
<Compile Include="FileFormats\Texture\TPL.cs" />
|
||||
<Compile Include="FileFormats\Rom\GCDisk.cs" />
|
||||
<Compile Include="GL\BMD_Renderer.cs" />
|
||||
<Compile Include="GUI\BMD\BMDModelImportSettings.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="GUI\BMD\BMDModelImportSettings.Designer.cs">
|
||||
<DependentUpon>BMDModelImportSettings.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="libWiiSharp\TPL.cs" />
|
||||
<Compile Include="FileFormats\GFBMDL\GFBMDL.cs" />
|
||||
<Compile Include="FileFormats\GFBMDL\GFBMDL_Wrappers.cs" />
|
||||
@ -1107,6 +1113,9 @@
|
||||
<EmbeddedResource Include="GUI\BFRES\TexturePattern\TexPatternMaterialEditor.resx">
|
||||
<DependentUpon>TexPatternMaterialEditor.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="GUI\BMD\BMDModelImportSettings.resx">
|
||||
<DependentUpon>BMDModelImportSettings.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="GUI\Byaml\CourseMuunt\TurboMunntEditor.resx">
|
||||
<DependentUpon>TurboMunntEditor.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
|
Binary file not shown.
@ -332,3 +332,4 @@ C:\Users\Nathan\Documents\GitHub\SwitchToolboxV1\Switch_FileFormatsMain\obj\Rele
|
||||
C:\Users\Nathan\Documents\GitHub\SwitchToolboxV1\Switch_FileFormatsMain\obj\Release\FirstPlugin.Forms.MaterialPresetDialog.resources
|
||||
C:\Users\Nathan\Documents\GitHub\SwitchToolboxV1\Switch_FileFormatsMain\obj\Release\FirstPlugin.Forms.ParamPatternMaterialEditor.resources
|
||||
C:\Users\Nathan\Documents\GitHub\SwitchToolboxV1\Switch_FileFormatsMain\obj\Release\FirstPlugin.SmoothNormalsMultiMeshForm.resources
|
||||
C:\Users\Nathan\Documents\GitHub\SwitchToolboxV1\Switch_FileFormatsMain\obj\Release\FirstPlugin.BMDModelImportSettings.resources
|
||||
|
Loading…
x
Reference in New Issue
Block a user