this.bExpOk = new System.Windows.Forms.Button();\r
this.bRefTsoEx = new System.Windows.Forms.Button();\r
this.bRefTso = new System.Windows.Forms.Button();\r
- this.rb1Bone = new System.Windows.Forms.RadioButton();\r
- this.rbAutoBone = new System.Windows.Forms.RadioButton();\r
+ this.rbOneBone = new System.Windows.Forms.RadioButton();\r
+ this.rbRefBone = new System.Windows.Forms.RadioButton();\r
this.tbTsoEx = new System.Windows.Forms.TextBox();\r
this.label5 = new System.Windows.Forms.Label();\r
this.tbTso = new System.Windows.Forms.TextBox();\r
this.tabPage2.Controls.Add(this.bExpOk);\r
this.tabPage2.Controls.Add(this.bRefTsoEx);\r
this.tabPage2.Controls.Add(this.bRefTso);\r
- this.tabPage2.Controls.Add(this.rb1Bone);\r
- this.tabPage2.Controls.Add(this.rbAutoBone);\r
+ this.tabPage2.Controls.Add(this.rbOneBone);\r
+ this.tabPage2.Controls.Add(this.rbRefBone);\r
this.tabPage2.Controls.Add(this.tbTsoEx);\r
this.tabPage2.Controls.Add(this.label5);\r
this.tabPage2.Controls.Add(this.tbTso);\r
this.bRefTso.UseVisualStyleBackColor = true;\r
this.bRefTso.Click += new System.EventHandler(this.bRefTso_Click);\r
// \r
- // rb1Bone\r
- // \r
- this.rb1Bone.AutoSize = true;\r
- this.rb1Bone.Location = new System.Drawing.Point(170, 81);\r
- this.rb1Bone.Name = "rb1Bone";\r
- this.rb1Bone.Size = new System.Drawing.Size(119, 16);\r
- this.rb1Bone.TabIndex = 8;\r
- this.rb1Bone.Text = "1ボーンに割り当てる";\r
- this.rb1Bone.UseVisualStyleBackColor = true;\r
- this.rb1Bone.CheckedChanged += new System.EventHandler(this.radioButton2_CheckedChanged);\r
- // \r
- // rbAutoBone\r
- // \r
- this.rbAutoBone.AutoSize = true;\r
- this.rbAutoBone.Checked = true;\r
- this.rbAutoBone.Location = new System.Drawing.Point(8, 81);\r
- this.rbAutoBone.Name = "rbAutoBone";\r
- this.rbAutoBone.Size = new System.Drawing.Size(156, 16);\r
- this.rbAutoBone.TabIndex = 7;\r
- this.rbAutoBone.TabStop = true;\r
- this.rbAutoBone.Text = "自動的にボーンを割り当てる";\r
- this.rbAutoBone.UseVisualStyleBackColor = true;\r
- this.rbAutoBone.CheckedChanged += new System.EventHandler(this.radioButton1_CheckedChanged);\r
+ // rbOneBone\r
+ // \r
+ this.rbOneBone.AutoSize = true;\r
+ this.rbOneBone.Location = new System.Drawing.Point(170, 81);\r
+ this.rbOneBone.Name = "rbOneBone";\r
+ this.rbOneBone.Size = new System.Drawing.Size(119, 16);\r
+ this.rbOneBone.TabIndex = 8;\r
+ this.rbOneBone.Text = "1ボーンに割り当てる";\r
+ this.rbOneBone.UseVisualStyleBackColor = true;\r
+ this.rbOneBone.CheckedChanged += new System.EventHandler(this.radioButton2_CheckedChanged);\r
+ // \r
+ // rbRefBone\r
+ // \r
+ this.rbRefBone.AutoSize = true;\r
+ this.rbRefBone.Checked = true;\r
+ this.rbRefBone.Location = new System.Drawing.Point(8, 81);\r
+ this.rbRefBone.Name = "rbRefBone";\r
+ this.rbRefBone.Size = new System.Drawing.Size(156, 16);\r
+ this.rbRefBone.TabIndex = 7;\r
+ this.rbRefBone.TabStop = true;\r
+ this.rbRefBone.Text = "自動的にボーンを割り当てる";\r
+ this.rbRefBone.UseVisualStyleBackColor = true;\r
+ this.rbRefBone.CheckedChanged += new System.EventHandler(this.radioButton1_CheckedChanged);\r
// \r
// tbTsoEx\r
// \r
private System.Windows.Forms.Label label3;\r
private System.Windows.Forms.Button bRefTsoEx;\r
private System.Windows.Forms.Button bRefTso;\r
- private System.Windows.Forms.RadioButton rb1Bone;\r
- private System.Windows.Forms.RadioButton rbAutoBone;\r
+ private System.Windows.Forms.RadioButton rbOneBone;\r
+ private System.Windows.Forms.RadioButton rbRefBone;\r
private System.Windows.Forms.TextBox tbTsoEx;\r
private System.Windows.Forms.Label label5;\r
private System.Windows.Forms.TextBox tbTso;\r
private void Form1_Load(object sender, EventArgs e)\r
{\r
RegistryKey reg = Application.UserAppDataRegistry.CreateSubKey("Config");\r
- OutPath = (string)reg.GetValue("OutPath", Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments));\r
- tabControl1.SelectedIndex = (int)reg.GetValue("TabPage", 0);\r
- tbMqoIn .Text = (string)reg.GetValue("MqoIn", "");\r
- tbTso .Text = (string)reg.GetValue("Tso", "");\r
- tbTsoEx .Text = (string)reg.GetValue("TsoEx", "");\r
- tbMergeTso.Text = (string)reg.GetValue("MergeTso", "");\r
- rbAutoBone .Checked = (int)reg.GetValue("AutoBone", 1) == 1;\r
- rb1Bone .Checked = (int)reg.GetValue("OneBone", 0) == 1;\r
- rbBoneNone .Checked = (int)reg.GetValue("BoneNone", 1) == 1;\r
- rbBoneRokDeBone.Checked = (int)reg.GetValue("BoneRokDeBone", 0) == 1;\r
- cbMakeSub .Checked = (int)reg.GetValue("MakeSub", 1) == 1;\r
- cbCopyTSO .Checked = (int)reg.GetValue("CopyTSO", 1) == 1;\r
- cbShowMaterials.Checked = (int)reg.GetValue("ShowMaterials", 0) == 1;\r
+ OutPath = (string)reg.GetValue("OutPath", Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments));\r
+ tabControl1.SelectedIndex = (int)reg.GetValue("TabPage", 0);\r
+ tbMqoIn.Text = (string)reg.GetValue("MqoIn", "");\r
+ tbTso.Text = (string)reg.GetValue("Tso", "");\r
+ tbTsoEx.Text = (string)reg.GetValue("TsoEx", "");\r
+ tbMergeTso.Text = (string)reg.GetValue("MergeTso", "");\r
+ rbRefBone.Checked = (int)reg.GetValue("RefBone", 1) == 1;\r
+ rbOneBone.Checked = (int)reg.GetValue("OneBone", 0) == 1;\r
+ rbBoneNone.Checked = (int)reg.GetValue("BoneNone", 1) == 1;\r
+ rbBoneRokDeBone.Checked = (int)reg.GetValue("BoneRokDeBone", 0) == 1;\r
+ cbMakeSub.Checked = (int)reg.GetValue("MakeSub", 1) == 1;\r
+ cbCopyTSO.Checked = (int)reg.GetValue("CopyTSO", 1) == 1;\r
+ cbShowMaterials.Checked = (int)reg.GetValue("ShowMaterials", 0) == 1;\r
\r
reg = Application.UserAppDataRegistry.CreateSubKey("Form1");\r
Bounds = new Rectangle(\r
private void Form1_FormClosed(object sender, FormClosedEventArgs e)\r
{\r
RegistryKey reg = Application.UserAppDataRegistry.CreateSubKey("Config");\r
- reg.SetValue("OutPath", OutPath);\r
- reg.SetValue("TabPage", tabControl1.SelectedIndex);\r
- reg.SetValue("MqoIn", tbMqoIn .Text);\r
- reg.SetValue("Tso", tbTso .Text);\r
- reg.SetValue("TsoEx", tbTsoEx .Text);\r
- reg.SetValue("MergeTso", tbMergeTso.Text);\r
- reg.SetValue("AutoBone", rbAutoBone .Checked ? 1 : 0);\r
- reg.SetValue("OneBone", rb1Bone .Checked ? 1 : 0);\r
- reg.SetValue("BoneNone", rbBoneNone .Checked ? 1 : 0);\r
+ reg.SetValue("OutPath", OutPath);\r
+ reg.SetValue("TabPage", tabControl1.SelectedIndex);\r
+ reg.SetValue("MqoIn", tbMqoIn.Text);\r
+ reg.SetValue("Tso", tbTso.Text);\r
+ reg.SetValue("TsoEx", tbTsoEx.Text);\r
+ reg.SetValue("MergeTso", tbMergeTso.Text);\r
+ reg.SetValue("RefBone", rbRefBone.Checked ? 1 : 0);\r
+ reg.SetValue("OneBone", rbOneBone.Checked ? 1 : 0);\r
+ reg.SetValue("BoneNone", rbBoneNone.Checked ? 1 : 0);\r
reg.SetValue("BoneRokDeBone", rbBoneRokDeBone.Checked ? 1 : 0);\r
- reg.SetValue("MakeSub", cbMakeSub .Checked ? 1 : 0);\r
- reg.SetValue("CopyTSO", cbCopyTSO .Checked ? 1 : 0);\r
+ reg.SetValue("MakeSub", cbMakeSub.Checked ? 1 : 0);\r
+ reg.SetValue("CopyTSO", cbCopyTSO.Checked ? 1 : 0);\r
reg.SetValue("ShowMaterials", cbShowMaterials.Checked ? 1 : 0);\r
\r
reg= Application.UserAppDataRegistry.CreateSubKey("Form1");\r
break;\r
\r
case 1:\r
- switch(Path.GetExtension(files[0]).ToUpper())\r
+ switch (Path.GetExtension(files[0]).ToUpper())\r
{\r
- case ".TSO": tbTso .Text= files[0]; break;\r
- case ".MQO": tbMqoIn.Text= files[0]; break;\r
- //case ".MQO": OpenMQOFile(files[0]); break;\r
+ case ".TSO": tbTso.Text = files[0]; break;\r
+ case ".MQO": tbMqoIn.Text = files[0]; break;\r
}\r
\r
break;\r
TSOGenerateConfig config = new TSOGenerateConfig();\r
config.ShowMaterials = cbShowMaterials.Checked;\r
\r
- if (rbAutoBone.Checked)\r
+ if (rbRefBone.Checked)\r
{\r
- gen.GenerateAutoBone(f, tbTso.Text, tbTsoEx.Text, config);\r
+ gen.GenerateRefBone(f, tbTso.Text, tbTsoEx.Text, config);\r
}\r
else\r
- if (rb1Bone.Checked)\r
+ if (rbOneBone.Checked)\r
{\r
Dictionary<string, string> boneref = new Dictionary<string, string>();\r
\r
\r
private void EnableControlStuff()\r
{\r
- gbBone.Enabled = rb1Bone.Checked;\r
+ gbBone.Enabled = rbOneBone.Checked;\r
}\r
\r
private void BuildBoneTree(TreeNodeCollection nodes, TSONode node)\r
{ // バッチで処理する\r
try\r
{\r
- //bool bImport= false, bExport= false;\r
- //bool bMakeSub= false, bCopyTSO= false;\r
- //bool bBoneAuto= false;\r
string tso = null;\r
string mqo = null;\r
string rtso= null;\r
\r
switch(o)\r
{\r
- //case "-i": bImport = true; break;\r
- //case "-e": bExport = true; break;\r
- //case "-s": bMakeSub = true; break;\r
- //case "-c": bCopyTSO = true; break;\r
- //case "-ba": bBoneAuto= true; break;\r
default:\r
if(o.StartsWith("-tso:")) tso = o.Substring(5).Trim('\r', '\n');\r
else if(o.StartsWith("-mqo:")) mqo = o.Substring(5).Trim('\r', '\n');\r
if(tso == null) throw new ArgumentException("「-tso:ファイル名」の形式で出力Tsoファイル名を指定してください");\r
if(rtso == null) throw new ArgumentException("「-ref:ファイル名」の形式で参照Tsoファイル名を指定してください");\r
\r
- gen.GenerateAutoBone(mqo, rtso, tso, config);\r
+ gen.GenerateRefBone(mqo, rtso, tso, config);\r
} catch(ArgumentException e)\r
{\r
System.Diagnostics.Debug.WriteLine(e.Message);\r
return true;\r
}\r
\r
- private bool AutoBone_DoLoadRefTSO(string tsoref)\r
+ private bool RefBone_DoLoadRefTSO(string tsoref)\r
{\r
// 参照TSOロード\r
tsor = LoadTSO(tsoref);\r
return true;\r
}\r
\r
- private bool AutoBone_DoGenerateMeshes()\r
+ private bool RefBone_DoGenerateMeshes()\r
{\r
meshes = new List<TSOMesh>();\r
\r
return true;\r
}\r
\r
- private bool AutoBone_DoOutput(string tsoex)\r
+ private bool RefBone_DoOutput(string tsoex)\r
{\r
//----- 出力処理 -----------------------------------------------\r
ii.materials.Clear();\r
Common_DoWriteTextures();\r
Common_DoWriteEffects();\r
Common_DoWriteMaterials();\r
- AutoBone_DoGenerateMeshes();\r
+ RefBone_DoGenerateMeshes();\r
Common_DoWriteMeshes();\r
}\r
\r
}\r
}\r
\r
- public void GenerateAutoBone(string mqoin, string tsoref, string tsoex, TSOGenerateConfig config)\r
+ public void GenerateRefBone(string mqoin, string tsoref, string tsoex, TSOGenerateConfig config)\r
{\r
this.config = config;\r
string importinfo_file = Path.ChangeExtension(mqoin, ".xml");\r
{\r
if (!Common_DoSetupDir(mqoin)) return;\r
if (!Common_DoLoadMQO(mqoin)) return;\r
- if (!AutoBone_DoLoadRefTSO(tsoref)) return;\r
+ if (!RefBone_DoLoadRefTSO(tsoref)) return;\r
if (!Common_DoLoadXml(importinfo_file)) return;\r
- if (!AutoBone_DoOutput(tsoex)) return;\r
+ if (!RefBone_DoOutput(tsoex)) return;\r
if (!Common_DoSaveXml(importinfo_file)) return;\r
}\r
finally\r
#endregion\r
}\r
\r
+ public class TSOGeneratorOneBone : TSOGenerator\r
+ {\r
+ }\r
+ \r
+ public class TSOGeneratorRefBone : TSOGenerator\r
+ {\r
+ }\r
+\r
public class TextureInfo\r
{\r
public string name;\r