This commit is contained in:
Perfare
2018-09-13 20:52:17 +08:00
parent a233af5b8f
commit 310c165824
11 changed files with 103 additions and 90 deletions

View File

@ -46,6 +46,7 @@
this.assetGroupOptions = new System.Windows.Forms.ToolStripComboBox();
this.showExpOpt = new System.Windows.Forms.ToolStripMenuItem();
this.modelToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripMenuItem3 = new System.Windows.Forms.ToolStripMenuItem();
this.exportallobjectsMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.exportallobjectssplitToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.exportselectedobjectsMenuItem = new System.Windows.Forms.ToolStripMenuItem();
@ -113,7 +114,6 @@
this.exportobjectswithselectedAnimationClipMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.jumpToSceneHierarchyToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.showOriginalFileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripMenuItem3 = new System.Windows.Forms.ToolStripMenuItem();
this.menuStrip1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
this.splitContainer1.Panel1.SuspendLayout();
@ -263,7 +263,7 @@
// assetGroupOptions
//
this.assetGroupOptions.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.assetGroupOptions.FlatStyle = System.Windows.Forms.FlatStyle.System;
this.assetGroupOptions.FlatStyle = System.Windows.Forms.FlatStyle.Standard;
this.assetGroupOptions.Items.AddRange(new object[] {
"Group by type",
"Group by source file",
@ -294,24 +294,31 @@
this.modelToolStripMenuItem.Size = new System.Drawing.Size(58, 21);
this.modelToolStripMenuItem.Text = "Model";
//
// toolStripMenuItem3
//
this.toolStripMenuItem3.Enabled = false;
this.toolStripMenuItem3.Name = "toolStripMenuItem3";
this.toolStripMenuItem3.Size = new System.Drawing.Size(332, 22);
this.toolStripMenuItem3.Text = "-----------------------Ascii-----------------------";
//
// exportallobjectsMenuItem
//
this.exportallobjectsMenuItem.Name = "exportallobjectsMenuItem";
this.exportallobjectsMenuItem.Size = new System.Drawing.Size(323, 22);
this.exportallobjectsMenuItem.Size = new System.Drawing.Size(332, 22);
this.exportallobjectsMenuItem.Text = "Export all objects";
this.exportallobjectsMenuItem.Click += new System.EventHandler(this.ExportObjects_Click);
//
// exportallobjectssplitToolStripMenuItem
//
this.exportallobjectssplitToolStripMenuItem.Name = "exportallobjectssplitToolStripMenuItem";
this.exportallobjectssplitToolStripMenuItem.Size = new System.Drawing.Size(323, 22);
this.exportallobjectssplitToolStripMenuItem.Size = new System.Drawing.Size(332, 22);
this.exportallobjectssplitToolStripMenuItem.Text = "Export all objects (split)";
this.exportallobjectssplitToolStripMenuItem.Click += new System.EventHandler(this.exportallobjectssplitToolStripMenuItem_Click);
//
// exportselectedobjectsMenuItem
//
this.exportselectedobjectsMenuItem.Name = "exportselectedobjectsMenuItem";
this.exportselectedobjectsMenuItem.Size = new System.Drawing.Size(323, 22);
this.exportselectedobjectsMenuItem.Size = new System.Drawing.Size(332, 22);
this.exportselectedobjectsMenuItem.Text = "Export selected objects";
this.exportselectedobjectsMenuItem.Click += new System.EventHandler(this.ExportObjects_Click);
//
@ -325,21 +332,21 @@
// exportAllObjectssplitToolStripMenuItem1
//
this.exportAllObjectssplitToolStripMenuItem1.Name = "exportAllObjectssplitToolStripMenuItem1";
this.exportAllObjectssplitToolStripMenuItem1.Size = new System.Drawing.Size(323, 22);
this.exportAllObjectssplitToolStripMenuItem1.Size = new System.Drawing.Size(332, 22);
this.exportAllObjectssplitToolStripMenuItem1.Text = "Export all objects (split)";
this.exportAllObjectssplitToolStripMenuItem1.Click += new System.EventHandler(this.exportAllObjectssplitToolStripMenuItem1_Click);
//
// exportSelectedObjectsToolStripMenuItem
//
this.exportSelectedObjectsToolStripMenuItem.Name = "exportSelectedObjectsToolStripMenuItem";
this.exportSelectedObjectsToolStripMenuItem.Size = new System.Drawing.Size(323, 22);
this.exportSelectedObjectsToolStripMenuItem.Size = new System.Drawing.Size(332, 22);
this.exportSelectedObjectsToolStripMenuItem.Text = "Export selected objects";
this.exportSelectedObjectsToolStripMenuItem.Click += new System.EventHandler(this.exportSelectedObjectsToolStripMenuItem_Click);
//
// exportSelectedObjectsWithAnimationClipToolStripMenuItem
//
this.exportSelectedObjectsWithAnimationClipToolStripMenuItem.Name = "exportSelectedObjectsWithAnimationClipToolStripMenuItem";
this.exportSelectedObjectsWithAnimationClipToolStripMenuItem.Size = new System.Drawing.Size(323, 22);
this.exportSelectedObjectsWithAnimationClipToolStripMenuItem.Size = new System.Drawing.Size(332, 22);
this.exportSelectedObjectsWithAnimationClipToolStripMenuItem.Text = "Export selected objects with AnimationClip";
this.exportSelectedObjectsWithAnimationClipToolStripMenuItem.Click += new System.EventHandler(this.exportObjectswithAnimationClipMenuItem_Click);
//
@ -951,13 +958,6 @@
this.showOriginalFileToolStripMenuItem.Visible = false;
this.showOriginalFileToolStripMenuItem.Click += new System.EventHandler(this.showOriginalFileToolStripMenuItem_Click);
//
// toolStripMenuItem3
//
this.toolStripMenuItem3.Enabled = false;
this.toolStripMenuItem3.Name = "toolStripMenuItem3";
this.toolStripMenuItem3.Size = new System.Drawing.Size(332, 22);
this.toolStripMenuItem3.Text = "-----------------------Ascii-----------------------";
//
// AssetStudioForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);

View File

@ -120,9 +120,6 @@
<metadata name="menuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>312, 17</value>
</metadata>
<metadata name="statusStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>432, 17</value>
</metadata>
<data name="fontPreviewBox.Text" xml:space="preserve">
<value>abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWYZ
1234567890.:,;'\"(!?)+-*/=
@ -141,6 +138,9 @@ The quick brown fox jumps over the lazy dog. 1234567890
The quick brown fox jumps over the lazy dog. 1234567890</value>
</data>
<metadata name="statusStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>432, 17</value>
</metadata>
<metadata name="timer.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>553, 17</value>
</metadata>

View File

@ -48,8 +48,9 @@
this.tobmp = new System.Windows.Forms.RadioButton();
this.converttexture = new System.Windows.Forms.CheckBox();
this.groupBox2 = new System.Windows.Forms.GroupBox();
this.fbxVersion = new System.Windows.Forms.ComboBox();
this.label3 = new System.Windows.Forms.Label();
this.FixRotation = new System.Windows.Forms.CheckBox();
this.compatibility = new System.Windows.Forms.CheckBox();
this.flatInbetween = new System.Windows.Forms.CheckBox();
this.boneSize = new System.Windows.Forms.NumericUpDown();
this.label2 = new System.Windows.Forms.Label();
@ -300,8 +301,9 @@
// groupBox2
//
this.groupBox2.AutoSize = true;
this.groupBox2.Controls.Add(this.fbxVersion);
this.groupBox2.Controls.Add(this.label3);
this.groupBox2.Controls.Add(this.FixRotation);
this.groupBox2.Controls.Add(this.compatibility);
this.groupBox2.Controls.Add(this.flatInbetween);
this.groupBox2.Controls.Add(this.boneSize);
this.groupBox2.Controls.Add(this.label2);
@ -313,11 +315,35 @@
this.groupBox2.Controls.Add(this.EulerFilter);
this.groupBox2.Location = new System.Drawing.Point(265, 12);
this.groupBox2.Name = "groupBox2";
this.groupBox2.Size = new System.Drawing.Size(214, 235);
this.groupBox2.Size = new System.Drawing.Size(214, 240);
this.groupBox2.TabIndex = 11;
this.groupBox2.TabStop = false;
this.groupBox2.Text = "Fbx Binary";
//
// fbxVersion
//
this.fbxVersion.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.fbxVersion.FormattingEnabled = true;
this.fbxVersion.Items.AddRange(new object[] {
"6.1",
"7.1",
"7.2",
"7.3",
"7.4"});
this.fbxVersion.Location = new System.Drawing.Point(77, 200);
this.fbxVersion.Name = "fbxVersion";
this.fbxVersion.Size = new System.Drawing.Size(47, 20);
this.fbxVersion.TabIndex = 16;
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(6, 203);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(65, 12);
this.label3.TabIndex = 15;
this.label3.Text = "FBXVersion";
//
// FixRotation
//
this.FixRotation.AutoSize = true;
@ -330,16 +356,6 @@
this.FixRotation.Text = "FixRotation";
this.FixRotation.UseVisualStyleBackColor = true;
//
// compatibility
//
this.compatibility.AutoSize = true;
this.compatibility.Location = new System.Drawing.Point(6, 199);
this.compatibility.Name = "compatibility";
this.compatibility.Size = new System.Drawing.Size(138, 16);
this.compatibility.TabIndex = 13;
this.compatibility.Text = "Compatibility (6.1)";
this.compatibility.UseVisualStyleBackColor = true;
//
// flatInbetween
//
this.flatInbetween.AutoSize = true;
@ -502,7 +518,6 @@
private System.Windows.Forms.CheckBox convertAudio;
private System.Windows.Forms.Panel panel1;
private System.Windows.Forms.GroupBox groupBox2;
private System.Windows.Forms.CheckBox compatibility;
private System.Windows.Forms.CheckBox flatInbetween;
private System.Windows.Forms.NumericUpDown boneSize;
private System.Windows.Forms.Label label2;
@ -513,5 +528,7 @@
private System.Windows.Forms.CheckBox allFrames;
private System.Windows.Forms.CheckBox EulerFilter;
private System.Windows.Forms.CheckBox FixRotation;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.ComboBox fbxVersion;
}
}

View File

@ -42,7 +42,7 @@ namespace AssetStudio
skins.Checked = (bool)Properties.Settings.Default["skins"];
boneSize.Value = (decimal)Properties.Settings.Default["boneSize"];
flatInbetween.Checked = (bool)Properties.Settings.Default["flatInbetween"];
compatibility.Checked = (bool)Properties.Settings.Default["compatibility"];
fbxVersion.SelectedIndex = (int)Properties.Settings.Default["fbxVersion"];
}
private void exportOpnions_CheckedChanged(object sender, EventArgs e)
@ -77,7 +77,7 @@ namespace AssetStudio
Properties.Settings.Default["skins"] = skins.Checked;
Properties.Settings.Default["boneSize"] = boneSize.Value;
Properties.Settings.Default["flatInbetween"] = flatInbetween.Checked;
Properties.Settings.Default["compatibility"] = compatibility.Checked;
Properties.Settings.Default["fbxVersion"] = fbxVersion.SelectedIndex;
Properties.Settings.Default.Save();
DialogResult = DialogResult.OK;
Close();

View File

@ -301,13 +301,13 @@ namespace AssetStudio.Properties {
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("False")]
public bool compatibility {
[global::System.Configuration.DefaultSettingValueAttribute("3")]
public int fbxVersion {
get {
return ((bool)(this["compatibility"]));
return ((int)(this["fbxVersion"]));
}
set {
this["compatibility"] = value;
this["fbxVersion"] = value;
}
}

View File

@ -71,8 +71,8 @@
<Setting Name="flatInbetween" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">False</Value>
</Setting>
<Setting Name="compatibility" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">False</Value>
<Setting Name="fbxVersion" Type="System.Int32" Scope="User">
<Value Profile="(Default)">3</Value>
</Setting>
<Setting Name="FixRotation" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">True</Value>

View File

@ -353,8 +353,8 @@ namespace AssetStudio
var skins = (bool)Properties.Settings.Default["skins"];
var boneSize = (int)(decimal)Properties.Settings.Default["boneSize"];
var flatInbetween = (bool)Properties.Settings.Default["flatInbetween"];
var compatibility = (bool)Properties.Settings.Default["compatibility"];
Fbx.Exporter.Export(exportPath, convert, EulerFilter, filterPrecision, allFrames, allBones, skins, boneSize, flatInbetween, compatibility);
var fbxVersion = (int)Properties.Settings.Default["fbxVersion"];
Fbx.Exporter.Export(exportPath, convert, EulerFilter, filterPrecision, allFrames, allBones, skins, boneSize, flatInbetween, fbxVersion);
return true;
}
}

View File

@ -39,7 +39,13 @@ namespace AssetStudio
public ModelConverter(GameObject m_GameObject, List<AssetPreloadData> animationList)
{
InitWithGameObject(m_GameObject);
if (assetsfileList.TryGetPD(m_GameObject.m_Animator, out var m_Animator))
{
var animator = new Animator(m_Animator);
InitWithAnimator(animator);
}
else
InitWithGameObject(m_GameObject);
foreach (var assetPreloadData in animationList)
{
animationClipHashSet.Add(assetPreloadData);

View File

@ -76,8 +76,8 @@
<setting name="flatInbetween" serializeAs="String">
<value>False</value>
</setting>
<setting name="compatibility" serializeAs="String">
<value>False</value>
<setting name="fbxVersion" serializeAs="String">
<value>3</value>
</setting>
<setting name="FixRotation" serializeAs="String">
<value>True</value>