add more options for export model

This commit is contained in:
Perfare
2019-07-28 18:55:08 +08:00
parent 0b462754a5
commit 20f9fe493f
13 changed files with 196 additions and 112 deletions

View File

@ -38,6 +38,8 @@
this.tobmp = new System.Windows.Forms.RadioButton();
this.converttexture = new System.Windows.Forms.CheckBox();
this.groupBox2 = new System.Windows.Forms.GroupBox();
this.exportBlendShape = new System.Windows.Forms.CheckBox();
this.exportAnimations = new System.Windows.Forms.CheckBox();
this.scaleFactor = new System.Windows.Forms.NumericUpDown();
this.label5 = new System.Windows.Forms.Label();
this.fbxFormat = new System.Windows.Forms.ComboBox();
@ -46,11 +48,11 @@
this.label3 = new System.Windows.Forms.Label();
this.boneSize = new System.Windows.Forms.NumericUpDown();
this.label2 = new System.Windows.Forms.Label();
this.skins = new System.Windows.Forms.CheckBox();
this.exportSkins = new System.Windows.Forms.CheckBox();
this.label1 = new System.Windows.Forms.Label();
this.filterPrecision = new System.Windows.Forms.NumericUpDown();
this.allBones = new System.Windows.Forms.CheckBox();
this.allFrames = new System.Windows.Forms.CheckBox();
this.castToBone = new System.Windows.Forms.CheckBox();
this.exportAllNodes = new System.Windows.Forms.CheckBox();
this.eulerFilter = new System.Windows.Forms.CheckBox();
this.groupBox1.SuspendLayout();
this.panel1.SuspendLayout();
@ -62,7 +64,7 @@
//
// OKbutton
//
this.OKbutton.Location = new System.Drawing.Point(321, 244);
this.OKbutton.Location = new System.Drawing.Point(321, 293);
this.OKbutton.Name = "OKbutton";
this.OKbutton.Size = new System.Drawing.Size(75, 21);
this.OKbutton.TabIndex = 6;
@ -73,7 +75,7 @@
// Cancel
//
this.Cancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.Cancel.Location = new System.Drawing.Point(402, 244);
this.Cancel.Location = new System.Drawing.Point(402, 293);
this.Cancel.Name = "Cancel";
this.Cancel.Size = new System.Drawing.Size(75, 21);
this.Cancel.TabIndex = 7;
@ -163,6 +165,8 @@
// groupBox2
//
this.groupBox2.AutoSize = true;
this.groupBox2.Controls.Add(this.exportBlendShape);
this.groupBox2.Controls.Add(this.exportAnimations);
this.groupBox2.Controls.Add(this.scaleFactor);
this.groupBox2.Controls.Add(this.label5);
this.groupBox2.Controls.Add(this.fbxFormat);
@ -171,19 +175,43 @@
this.groupBox2.Controls.Add(this.label3);
this.groupBox2.Controls.Add(this.boneSize);
this.groupBox2.Controls.Add(this.label2);
this.groupBox2.Controls.Add(this.skins);
this.groupBox2.Controls.Add(this.exportSkins);
this.groupBox2.Controls.Add(this.label1);
this.groupBox2.Controls.Add(this.filterPrecision);
this.groupBox2.Controls.Add(this.allBones);
this.groupBox2.Controls.Add(this.allFrames);
this.groupBox2.Controls.Add(this.castToBone);
this.groupBox2.Controls.Add(this.exportAllNodes);
this.groupBox2.Controls.Add(this.eulerFilter);
this.groupBox2.Location = new System.Drawing.Point(12, 12);
this.groupBox2.Name = "groupBox2";
this.groupBox2.Size = new System.Drawing.Size(214, 255);
this.groupBox2.Size = new System.Drawing.Size(214, 302);
this.groupBox2.TabIndex = 11;
this.groupBox2.TabStop = false;
this.groupBox2.Text = "Fbx";
//
// exportBlendShape
//
this.exportBlendShape.AutoSize = true;
this.exportBlendShape.Checked = true;
this.exportBlendShape.CheckState = System.Windows.Forms.CheckState.Checked;
this.exportBlendShape.Location = new System.Drawing.Point(6, 127);
this.exportBlendShape.Name = "exportBlendShape";
this.exportBlendShape.Size = new System.Drawing.Size(126, 16);
this.exportBlendShape.TabIndex = 22;
this.exportBlendShape.Text = "Export blendshape";
this.exportBlendShape.UseVisualStyleBackColor = true;
//
// exportAnimations
//
this.exportAnimations.AutoSize = true;
this.exportAnimations.Checked = true;
this.exportAnimations.CheckState = System.Windows.Forms.CheckState.Checked;
this.exportAnimations.Location = new System.Drawing.Point(6, 105);
this.exportAnimations.Name = "exportAnimations";
this.exportAnimations.Size = new System.Drawing.Size(126, 16);
this.exportAnimations.TabIndex = 21;
this.exportAnimations.Text = "Export animations";
this.exportAnimations.UseVisualStyleBackColor = true;
//
// scaleFactor
//
this.scaleFactor.DecimalPlaces = 2;
@ -192,7 +220,7 @@
0,
0,
131072});
this.scaleFactor.Location = new System.Drawing.Point(83, 155);
this.scaleFactor.Location = new System.Drawing.Point(83, 202);
this.scaleFactor.Name = "scaleFactor";
this.scaleFactor.Size = new System.Drawing.Size(60, 21);
this.scaleFactor.TabIndex = 20;
@ -206,7 +234,7 @@
// label5
//
this.label5.AutoSize = true;
this.label5.Location = new System.Drawing.Point(6, 157);
this.label5.Location = new System.Drawing.Point(6, 204);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(71, 12);
this.label5.TabIndex = 19;
@ -219,7 +247,7 @@
this.fbxFormat.Items.AddRange(new object[] {
"Binary",
"Ascii"});
this.fbxFormat.Location = new System.Drawing.Point(77, 186);
this.fbxFormat.Location = new System.Drawing.Point(77, 233);
this.fbxFormat.Name = "fbxFormat";
this.fbxFormat.Size = new System.Drawing.Size(61, 20);
this.fbxFormat.TabIndex = 18;
@ -227,7 +255,7 @@
// label4
//
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(6, 189);
this.label4.Location = new System.Drawing.Point(6, 236);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(59, 12);
this.label4.TabIndex = 17;
@ -244,7 +272,7 @@
"7.3",
"7.4",
"7.5"});
this.fbxVersion.Location = new System.Drawing.Point(77, 215);
this.fbxVersion.Location = new System.Drawing.Point(77, 262);
this.fbxVersion.Name = "fbxVersion";
this.fbxVersion.Size = new System.Drawing.Size(47, 20);
this.fbxVersion.TabIndex = 16;
@ -252,7 +280,7 @@
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(6, 218);
this.label3.Location = new System.Drawing.Point(6, 265);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(65, 12);
this.label3.TabIndex = 15;
@ -260,7 +288,7 @@
//
// boneSize
//
this.boneSize.Location = new System.Drawing.Point(65, 128);
this.boneSize.Location = new System.Drawing.Point(65, 175);
this.boneSize.Name = "boneSize";
this.boneSize.Size = new System.Drawing.Size(46, 21);
this.boneSize.TabIndex = 11;
@ -273,23 +301,23 @@
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(6, 130);
this.label2.Location = new System.Drawing.Point(6, 177);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(53, 12);
this.label2.TabIndex = 10;
this.label2.Text = "BoneSize";
//
// skins
// exportSkins
//
this.skins.AutoSize = true;
this.skins.Checked = true;
this.skins.CheckState = System.Windows.Forms.CheckState.Checked;
this.skins.Location = new System.Drawing.Point(6, 105);
this.skins.Name = "skins";
this.skins.Size = new System.Drawing.Size(54, 16);
this.skins.TabIndex = 8;
this.skins.Text = "Skins";
this.skins.UseVisualStyleBackColor = true;
this.exportSkins.AutoSize = true;
this.exportSkins.Checked = true;
this.exportSkins.CheckState = System.Windows.Forms.CheckState.Checked;
this.exportSkins.Location = new System.Drawing.Point(6, 83);
this.exportSkins.Name = "exportSkins";
this.exportSkins.Size = new System.Drawing.Size(96, 16);
this.exportSkins.TabIndex = 8;
this.exportSkins.Text = "Export skins";
this.exportSkins.UseVisualStyleBackColor = true;
//
// label1
//
@ -318,29 +346,27 @@
0,
131072});
//
// allBones
// castToBone
//
this.allBones.AutoSize = true;
this.allBones.Checked = true;
this.allBones.CheckState = System.Windows.Forms.CheckState.Checked;
this.allBones.Location = new System.Drawing.Point(6, 83);
this.allBones.Name = "allBones";
this.allBones.Size = new System.Drawing.Size(72, 16);
this.allBones.TabIndex = 5;
this.allBones.Text = "AllBones";
this.allBones.UseVisualStyleBackColor = true;
this.castToBone.AutoSize = true;
this.castToBone.Location = new System.Drawing.Point(6, 149);
this.castToBone.Name = "castToBone";
this.castToBone.Size = new System.Drawing.Size(156, 16);
this.castToBone.TabIndex = 5;
this.castToBone.Text = "All nodes cast to bone";
this.castToBone.UseVisualStyleBackColor = true;
//
// allFrames
// exportAllNodes
//
this.allFrames.AutoSize = true;
this.allFrames.Checked = true;
this.allFrames.CheckState = System.Windows.Forms.CheckState.Checked;
this.allFrames.Location = new System.Drawing.Point(6, 61);
this.allFrames.Name = "allFrames";
this.allFrames.Size = new System.Drawing.Size(78, 16);
this.allFrames.TabIndex = 4;
this.allFrames.Text = "AllFrames";
this.allFrames.UseVisualStyleBackColor = true;
this.exportAllNodes.AutoSize = true;
this.exportAllNodes.Checked = true;
this.exportAllNodes.CheckState = System.Windows.Forms.CheckState.Checked;
this.exportAllNodes.Location = new System.Drawing.Point(6, 61);
this.exportAllNodes.Name = "exportAllNodes";
this.exportAllNodes.Size = new System.Drawing.Size(120, 16);
this.exportAllNodes.TabIndex = 4;
this.exportAllNodes.Text = "Export all nodes";
this.exportAllNodes.UseVisualStyleBackColor = true;
//
// eulerFilter
//
@ -360,7 +386,7 @@
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.CancelButton = this.Cancel;
this.ClientSize = new System.Drawing.Size(490, 277);
this.ClientSize = new System.Drawing.Size(490, 328);
this.Controls.Add(this.groupBox2);
this.Controls.Add(this.groupBox1);
this.Controls.Add(this.Cancel);
@ -400,11 +426,11 @@
private System.Windows.Forms.GroupBox groupBox2;
private System.Windows.Forms.NumericUpDown boneSize;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.CheckBox skins;
private System.Windows.Forms.CheckBox exportSkins;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.NumericUpDown filterPrecision;
private System.Windows.Forms.CheckBox allBones;
private System.Windows.Forms.CheckBox allFrames;
private System.Windows.Forms.CheckBox castToBone;
private System.Windows.Forms.CheckBox exportAllNodes;
private System.Windows.Forms.CheckBox eulerFilter;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.ComboBox fbxVersion;
@ -412,5 +438,7 @@
private System.Windows.Forms.Label label4;
private System.Windows.Forms.NumericUpDown scaleFactor;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.CheckBox exportBlendShape;
private System.Windows.Forms.CheckBox exportAnimations;
}
}

View File

@ -28,9 +28,11 @@ namespace AssetStudioGUI
}
eulerFilter.Checked = (bool)Properties.Settings.Default["eulerFilter"];
filterPrecision.Value = (decimal)Properties.Settings.Default["filterPrecision"];
allFrames.Checked = (bool)Properties.Settings.Default["allFrames"];
allBones.Checked = (bool)Properties.Settings.Default["allBones"];
skins.Checked = (bool)Properties.Settings.Default["skins"];
exportAllNodes.Checked = (bool)Properties.Settings.Default["exportAllNodes"];
exportSkins.Checked = (bool)Properties.Settings.Default["exportSkins"];
exportAnimations.Checked = (bool)Properties.Settings.Default["exportAnimations"];
exportBlendShape.Checked = (bool)Properties.Settings.Default["exportBlendShape"];
castToBone.Checked = (bool)Properties.Settings.Default["castToBone"];
boneSize.Value = (decimal)Properties.Settings.Default["boneSize"];
scaleFactor.Value = (decimal)Properties.Settings.Default["scaleFactor"];
fbxVersion.SelectedIndex = (int)Properties.Settings.Default["fbxVersion"];
@ -57,9 +59,11 @@ namespace AssetStudioGUI
}
Properties.Settings.Default["eulerFilter"] = eulerFilter.Checked;
Properties.Settings.Default["filterPrecision"] = filterPrecision.Value;
Properties.Settings.Default["allFrames"] = allFrames.Checked;
Properties.Settings.Default["allBones"] = allBones.Checked;
Properties.Settings.Default["skins"] = skins.Checked;
Properties.Settings.Default["exportAllNodes"] = exportAllNodes.Checked;
Properties.Settings.Default["exportSkins"] = exportSkins.Checked;
Properties.Settings.Default["exportAnimations"] = exportAnimations.Checked;
Properties.Settings.Default["exportBlendShape"] = exportBlendShape.Checked;
Properties.Settings.Default["castToBone"] = castToBone.Checked;
Properties.Settings.Default["boneSize"] = boneSize.Value;
Properties.Settings.Default["scaleFactor"] = scaleFactor.Value;
Properties.Settings.Default["fbxVersion"] = fbxVersion.SelectedIndex;

View File

@ -322,14 +322,17 @@ namespace AssetStudioGUI
{
var eulerFilter = (bool)Properties.Settings.Default["eulerFilter"];
var filterPrecision = (float)(decimal)Properties.Settings.Default["filterPrecision"];
var allFrames = (bool)Properties.Settings.Default["allFrames"];
var allBones = (bool)Properties.Settings.Default["allBones"];
var skins = (bool)Properties.Settings.Default["skins"];
var exportAllNodes = (bool)Properties.Settings.Default["exportAllNodes"];
var exportSkins = (bool)Properties.Settings.Default["exportSkins"];
var exportAnimations = (bool)Properties.Settings.Default["exportAnimations"];
var exportBlendShape = (bool)Properties.Settings.Default["exportBlendShape"];
var castToBone = (bool)Properties.Settings.Default["castToBone"];
var boneSize = (int)(decimal)Properties.Settings.Default["boneSize"];
var scaleFactor = (float)(decimal)Properties.Settings.Default["scaleFactor"];
var fbxVersion = (int)Properties.Settings.Default["fbxVersion"];
var fbxFormat = (int)Properties.Settings.Default["fbxFormat"];
ModelExporter.ExportFbx(exportPath, convert, eulerFilter, filterPrecision, allFrames, allBones, skins, boneSize, scaleFactor, fbxVersion, fbxFormat == 1);
ModelExporter.ExportFbx(exportPath, convert, eulerFilter, filterPrecision,
exportAllNodes, exportSkins, exportAnimations, exportBlendShape, castToBone, boneSize, scaleFactor, fbxVersion, fbxFormat == 1);
}
}
}

View File

@ -10,7 +10,7 @@ using System.Runtime.InteropServices;
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("AssetStudioGUI")]
[assembly: AssemblyCopyright("")]
[assembly: AssemblyCopyright("Copyright © Perfare 2018-2019")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

View File

@ -158,36 +158,36 @@ namespace AssetStudioGUI.Properties {
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("True")]
public bool allFrames {
public bool exportAllNodes {
get {
return ((bool)(this["allFrames"]));
return ((bool)(this["exportAllNodes"]));
}
set {
this["allFrames"] = value;
this["exportAllNodes"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("True")]
public bool allBones {
public bool exportSkins {
get {
return ((bool)(this["allBones"]));
return ((bool)(this["exportSkins"]));
}
set {
this["allBones"] = value;
this["exportSkins"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("True")]
public bool skins {
public bool exportAnimations {
get {
return ((bool)(this["skins"]));
return ((bool)(this["exportAnimations"]));
}
set {
this["skins"] = value;
this["exportAnimations"] = value;
}
}
@ -238,5 +238,29 @@ namespace AssetStudioGUI.Properties {
this["scaleFactor"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("True")]
public bool exportBlendShape {
get {
return ((bool)(this["exportBlendShape"]));
}
set {
this["exportBlendShape"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("False")]
public bool castToBone {
get {
return ((bool)(this["castToBone"]));
}
set {
this["castToBone"] = value;
}
}
}
}

View File

@ -35,13 +35,13 @@
<Setting Name="filterPrecision" Type="System.Decimal" Scope="User">
<Value Profile="(Default)">0.25</Value>
</Setting>
<Setting Name="allFrames" Type="System.Boolean" Scope="User">
<Setting Name="exportAllNodes" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">True</Value>
</Setting>
<Setting Name="allBones" Type="System.Boolean" Scope="User">
<Setting Name="exportSkins" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">True</Value>
</Setting>
<Setting Name="skins" Type="System.Boolean" Scope="User">
<Setting Name="exportAnimations" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">True</Value>
</Setting>
<Setting Name="boneSize" Type="System.Decimal" Scope="User">
@ -56,5 +56,11 @@
<Setting Name="scaleFactor" Type="System.Decimal" Scope="User">
<Value Profile="(Default)">1</Value>
</Setting>
<Setting Name="exportBlendShape" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">True</Value>
</Setting>
<Setting Name="castToBone" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">False</Value>
</Setting>
</Settings>
</SettingsFile>

View File

@ -40,13 +40,13 @@
<setting name="filterPrecision" serializeAs="String">
<value>0.25</value>
</setting>
<setting name="allFrames" serializeAs="String">
<setting name="exportAllNodes" serializeAs="String">
<value>True</value>
</setting>
<setting name="allBones" serializeAs="String">
<setting name="exportSkins" serializeAs="String">
<value>True</value>
</setting>
<setting name="skins" serializeAs="String">
<setting name="exportAnimations" serializeAs="String">
<value>True</value>
</setting>
<setting name="boneSize" serializeAs="String">
@ -61,6 +61,12 @@
<setting name="scaleFactor" serializeAs="String">
<value>1</value>
</setting>
<setting name="exportBlendShape" serializeAs="String">
<value>True</value>
</setting>
<setting name="castToBone" serializeAs="String">
<value>False</value>
</setting>
</AssetStudioGUI.Properties.Settings>
</userSettings>
</configuration>