improved & fixed

This commit is contained in:
Perfare 2018-10-07 19:38:07 +08:00
parent a1f491af25
commit d54bfbdfe7
12 changed files with 43 additions and 114 deletions

View File

@ -1867,7 +1867,7 @@ namespace AssetStudio
private void showOriginalFileToolStripMenuItem_Click(object sender, EventArgs e) private void showOriginalFileToolStripMenuItem_Click(object sender, EventArgs e)
{ {
var selectasset = (AssetPreloadData)assetListView.Items[assetListView.SelectedIndices[0]]; var selectasset = (AssetPreloadData)assetListView.Items[assetListView.SelectedIndices[0]];
var args = $"/select, {selectasset.sourceFile.parentPath ?? selectasset.sourceFile.filePath}"; var args = $"/select, \"{selectasset.sourceFile.parentPath ?? selectasset.sourceFile.filePath}\"";
var pfi = new ProcessStartInfo("explorer.exe", args); var pfi = new ProcessStartInfo("explorer.exe", args);
Process.Start(pfi); Process.Start(pfi);
} }

View File

@ -50,7 +50,6 @@
this.groupBox2 = new System.Windows.Forms.GroupBox(); this.groupBox2 = new System.Windows.Forms.GroupBox();
this.fbxVersion = new System.Windows.Forms.ComboBox(); this.fbxVersion = new System.Windows.Forms.ComboBox();
this.label3 = new System.Windows.Forms.Label(); this.label3 = new System.Windows.Forms.Label();
this.FixRotation = new System.Windows.Forms.CheckBox();
this.flatInbetween = new System.Windows.Forms.CheckBox(); this.flatInbetween = new System.Windows.Forms.CheckBox();
this.boneSize = new System.Windows.Forms.NumericUpDown(); this.boneSize = new System.Windows.Forms.NumericUpDown();
this.label2 = new System.Windows.Forms.Label(); this.label2 = new System.Windows.Forms.Label();
@ -303,7 +302,6 @@
this.groupBox2.AutoSize = true; this.groupBox2.AutoSize = true;
this.groupBox2.Controls.Add(this.fbxVersion); this.groupBox2.Controls.Add(this.fbxVersion);
this.groupBox2.Controls.Add(this.label3); this.groupBox2.Controls.Add(this.label3);
this.groupBox2.Controls.Add(this.FixRotation);
this.groupBox2.Controls.Add(this.flatInbetween); this.groupBox2.Controls.Add(this.flatInbetween);
this.groupBox2.Controls.Add(this.boneSize); this.groupBox2.Controls.Add(this.boneSize);
this.groupBox2.Controls.Add(this.label2); this.groupBox2.Controls.Add(this.label2);
@ -315,7 +313,7 @@
this.groupBox2.Controls.Add(this.EulerFilter); this.groupBox2.Controls.Add(this.EulerFilter);
this.groupBox2.Location = new System.Drawing.Point(265, 12); this.groupBox2.Location = new System.Drawing.Point(265, 12);
this.groupBox2.Name = "groupBox2"; this.groupBox2.Name = "groupBox2";
this.groupBox2.Size = new System.Drawing.Size(214, 240); this.groupBox2.Size = new System.Drawing.Size(214, 235);
this.groupBox2.TabIndex = 11; this.groupBox2.TabIndex = 11;
this.groupBox2.TabStop = false; this.groupBox2.TabStop = false;
this.groupBox2.Text = "Fbx Binary"; this.groupBox2.Text = "Fbx Binary";
@ -329,8 +327,9 @@
"7.1", "7.1",
"7.2", "7.2",
"7.3", "7.3",
"7.4"}); "7.4",
this.fbxVersion.Location = new System.Drawing.Point(77, 200); "7.5"});
this.fbxVersion.Location = new System.Drawing.Point(77, 178);
this.fbxVersion.Name = "fbxVersion"; this.fbxVersion.Name = "fbxVersion";
this.fbxVersion.Size = new System.Drawing.Size(47, 20); this.fbxVersion.Size = new System.Drawing.Size(47, 20);
this.fbxVersion.TabIndex = 16; this.fbxVersion.TabIndex = 16;
@ -338,28 +337,16 @@
// label3 // label3
// //
this.label3.AutoSize = true; this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(6, 203); this.label3.Location = new System.Drawing.Point(6, 181);
this.label3.Name = "label3"; this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(65, 12); this.label3.Size = new System.Drawing.Size(65, 12);
this.label3.TabIndex = 15; this.label3.TabIndex = 15;
this.label3.Text = "FBXVersion"; this.label3.Text = "FBXVersion";
// //
// FixRotation
//
this.FixRotation.AutoSize = true;
this.FixRotation.Checked = true;
this.FixRotation.CheckState = System.Windows.Forms.CheckState.Checked;
this.FixRotation.Location = new System.Drawing.Point(6, 20);
this.FixRotation.Name = "FixRotation";
this.FixRotation.Size = new System.Drawing.Size(90, 16);
this.FixRotation.TabIndex = 14;
this.FixRotation.Text = "FixRotation";
this.FixRotation.UseVisualStyleBackColor = true;
//
// flatInbetween // flatInbetween
// //
this.flatInbetween.AutoSize = true; this.flatInbetween.AutoSize = true;
this.flatInbetween.Location = new System.Drawing.Point(6, 177); this.flatInbetween.Location = new System.Drawing.Point(6, 155);
this.flatInbetween.Name = "flatInbetween"; this.flatInbetween.Name = "flatInbetween";
this.flatInbetween.Size = new System.Drawing.Size(102, 16); this.flatInbetween.Size = new System.Drawing.Size(102, 16);
this.flatInbetween.TabIndex = 12; this.flatInbetween.TabIndex = 12;
@ -368,7 +355,7 @@
// //
// boneSize // boneSize
// //
this.boneSize.Location = new System.Drawing.Point(65, 150); this.boneSize.Location = new System.Drawing.Point(65, 128);
this.boneSize.Name = "boneSize"; this.boneSize.Name = "boneSize";
this.boneSize.Size = new System.Drawing.Size(46, 21); this.boneSize.Size = new System.Drawing.Size(46, 21);
this.boneSize.TabIndex = 11; this.boneSize.TabIndex = 11;
@ -381,7 +368,7 @@
// label2 // label2
// //
this.label2.AutoSize = true; this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(6, 152); this.label2.Location = new System.Drawing.Point(6, 130);
this.label2.Name = "label2"; this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(53, 12); this.label2.Size = new System.Drawing.Size(53, 12);
this.label2.TabIndex = 10; this.label2.TabIndex = 10;
@ -392,7 +379,7 @@
this.skins.AutoSize = true; this.skins.AutoSize = true;
this.skins.Checked = true; this.skins.Checked = true;
this.skins.CheckState = System.Windows.Forms.CheckState.Checked; this.skins.CheckState = System.Windows.Forms.CheckState.Checked;
this.skins.Location = new System.Drawing.Point(6, 127); this.skins.Location = new System.Drawing.Point(6, 105);
this.skins.Name = "skins"; this.skins.Name = "skins";
this.skins.Size = new System.Drawing.Size(54, 16); this.skins.Size = new System.Drawing.Size(54, 16);
this.skins.TabIndex = 8; this.skins.TabIndex = 8;
@ -402,7 +389,7 @@
// label1 // label1
// //
this.label1.AutoSize = true; this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(26, 61); this.label1.Location = new System.Drawing.Point(26, 39);
this.label1.Name = "label1"; this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(95, 12); this.label1.Size = new System.Drawing.Size(95, 12);
this.label1.TabIndex = 7; this.label1.TabIndex = 7;
@ -416,7 +403,7 @@
0, 0,
0, 0,
131072}); 131072});
this.filterPrecision.Location = new System.Drawing.Point(127, 59); this.filterPrecision.Location = new System.Drawing.Point(127, 37);
this.filterPrecision.Name = "filterPrecision"; this.filterPrecision.Name = "filterPrecision";
this.filterPrecision.Size = new System.Drawing.Size(51, 21); this.filterPrecision.Size = new System.Drawing.Size(51, 21);
this.filterPrecision.TabIndex = 6; this.filterPrecision.TabIndex = 6;
@ -431,7 +418,7 @@
this.allBones.AutoSize = true; this.allBones.AutoSize = true;
this.allBones.Checked = true; this.allBones.Checked = true;
this.allBones.CheckState = System.Windows.Forms.CheckState.Checked; this.allBones.CheckState = System.Windows.Forms.CheckState.Checked;
this.allBones.Location = new System.Drawing.Point(6, 105); this.allBones.Location = new System.Drawing.Point(6, 83);
this.allBones.Name = "allBones"; this.allBones.Name = "allBones";
this.allBones.Size = new System.Drawing.Size(72, 16); this.allBones.Size = new System.Drawing.Size(72, 16);
this.allBones.TabIndex = 5; this.allBones.TabIndex = 5;
@ -441,7 +428,7 @@
// allFrames // allFrames
// //
this.allFrames.AutoSize = true; this.allFrames.AutoSize = true;
this.allFrames.Location = new System.Drawing.Point(6, 83); this.allFrames.Location = new System.Drawing.Point(6, 61);
this.allFrames.Name = "allFrames"; this.allFrames.Name = "allFrames";
this.allFrames.Size = new System.Drawing.Size(78, 16); this.allFrames.Size = new System.Drawing.Size(78, 16);
this.allFrames.TabIndex = 4; this.allFrames.TabIndex = 4;
@ -451,7 +438,9 @@
// EulerFilter // EulerFilter
// //
this.EulerFilter.AutoSize = true; this.EulerFilter.AutoSize = true;
this.EulerFilter.Location = new System.Drawing.Point(6, 42); this.EulerFilter.Checked = true;
this.EulerFilter.CheckState = System.Windows.Forms.CheckState.Checked;
this.EulerFilter.Location = new System.Drawing.Point(6, 20);
this.EulerFilter.Name = "EulerFilter"; this.EulerFilter.Name = "EulerFilter";
this.EulerFilter.Size = new System.Drawing.Size(90, 16); this.EulerFilter.Size = new System.Drawing.Size(90, 16);
this.EulerFilter.TabIndex = 3; this.EulerFilter.TabIndex = 3;
@ -527,7 +516,6 @@
private System.Windows.Forms.CheckBox allBones; private System.Windows.Forms.CheckBox allBones;
private System.Windows.Forms.CheckBox allFrames; private System.Windows.Forms.CheckBox allFrames;
private System.Windows.Forms.CheckBox EulerFilter; private System.Windows.Forms.CheckBox EulerFilter;
private System.Windows.Forms.CheckBox FixRotation;
private System.Windows.Forms.Label label3; private System.Windows.Forms.Label label3;
private System.Windows.Forms.ComboBox fbxVersion; private System.Windows.Forms.ComboBox fbxVersion;
} }

View File

@ -34,7 +34,6 @@ namespace AssetStudio
break; break;
} }
} }
FixRotation.Checked = (bool)Properties.Settings.Default["FixRotation"];
EulerFilter.Checked = (bool)Properties.Settings.Default["EulerFilter"]; EulerFilter.Checked = (bool)Properties.Settings.Default["EulerFilter"];
filterPrecision.Value = (decimal)Properties.Settings.Default["filterPrecision"]; filterPrecision.Value = (decimal)Properties.Settings.Default["filterPrecision"];
allFrames.Checked = (bool)Properties.Settings.Default["allFrames"]; allFrames.Checked = (bool)Properties.Settings.Default["allFrames"];
@ -69,7 +68,6 @@ namespace AssetStudio
break; break;
} }
} }
Properties.Settings.Default["FixRotation"] = FixRotation.Checked;
Properties.Settings.Default["EulerFilter"] = EulerFilter.Checked; Properties.Settings.Default["EulerFilter"] = EulerFilter.Checked;
Properties.Settings.Default["filterPrecision"] = filterPrecision.Value; Properties.Settings.Default["filterPrecision"] = filterPrecision.Value;
Properties.Settings.Default["allFrames"] = allFrames.Checked; Properties.Settings.Default["allFrames"] = allFrames.Checked;

View File

@ -217,7 +217,7 @@ namespace AssetStudio.Properties {
[global::System.Configuration.UserScopedSettingAttribute()] [global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("False")] [global::System.Configuration.DefaultSettingValueAttribute("True")]
public bool EulerFilter { public bool EulerFilter {
get { get {
return ((bool)(this["EulerFilter"])); return ((bool)(this["EulerFilter"]));
@ -310,17 +310,5 @@ namespace AssetStudio.Properties {
this["fbxVersion"] = value; this["fbxVersion"] = value;
} }
} }
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("True")]
public bool FixRotation {
get {
return ((bool)(this["FixRotation"]));
}
set {
this["FixRotation"] = value;
}
}
} }
} }

View File

@ -51,7 +51,7 @@
<Value Profile="(Default)">False</Value> <Value Profile="(Default)">False</Value>
</Setting> </Setting>
<Setting Name="EulerFilter" Type="System.Boolean" Scope="User"> <Setting Name="EulerFilter" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">False</Value> <Value Profile="(Default)">True</Value>
</Setting> </Setting>
<Setting Name="filterPrecision" Type="System.Decimal" Scope="User"> <Setting Name="filterPrecision" Type="System.Decimal" Scope="User">
<Value Profile="(Default)">0.25</Value> <Value Profile="(Default)">0.25</Value>
@ -74,8 +74,5 @@
<Setting Name="fbxVersion" Type="System.Int32" Scope="User"> <Setting Name="fbxVersion" Type="System.Int32" Scope="User">
<Value Profile="(Default)">3</Value> <Value Profile="(Default)">3</Value>
</Setting> </Setting>
<Setting Name="FixRotation" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">True</Value>
</Setting>
</Settings> </Settings>
</SettingsFile> </SettingsFile>

View File

@ -840,21 +840,6 @@ namespace AssetStudio
time2 = animationClip.m_MuscleClip.m_StopTime; time2 = animationClip.m_MuscleClip.m_StopTime;
} }
} }
if ((bool)Properties.Settings.Default["FixRotation"])
{
foreach (var track in iAnim.TrackList)
{
var prevKey = new Vector3();
foreach (var rotation in track.Rotations)
{
var value = rotation.value;
ReplaceOutOfBound(ref prevKey, ref value);
prevKey = value;
rotation.value = value;
}
}
}
} }
} }
@ -999,40 +984,6 @@ namespace AssetStudio
} }
} }
private void ReplaceOutOfBound(ref Vector3 prevKey, ref Vector3 curKey)
{
curKey.X = ReplaceOutOfBound(prevKey.X, curKey.X);
curKey.Y = ReplaceOutOfBound(prevKey.Y, curKey.Y);
curKey.Z = ReplaceOutOfBound(prevKey.Z, curKey.Z);
}
private float ReplaceOutOfBound(float prevValue, float curValue)
{
double prev = prevValue;
double cur = curValue;
double prevAbs = Math.Abs(prev);
double prevSign = Math.Sign(prev);
double prevShift = 180.0 + prevAbs;
double count = Math.Floor(prevShift / 360.0) * prevSign;
double prevRemain = 180.0 + (prev - count * 360.0);
double curShift = 180.0 + cur;
if (prevRemain - curShift > 180)
{
count++;
}
else if (prevRemain - curShift < -180)
{
count--;
}
double newValue = count * 360.0 + cur;
return (float)newValue;
}
private void DeoptimizeTransformHierarchy() private void DeoptimizeTransformHierarchy()
{ {
if (avatar == null) if (avatar == null)

View File

@ -56,7 +56,7 @@
<value>False</value> <value>False</value>
</setting> </setting>
<setting name="EulerFilter" serializeAs="String"> <setting name="EulerFilter" serializeAs="String">
<value>False</value> <value>True</value>
</setting> </setting>
<setting name="filterPrecision" serializeAs="String"> <setting name="filterPrecision" serializeAs="String">
<value>0.25</value> <value>0.25</value>
@ -79,9 +79,6 @@
<setting name="fbxVersion" serializeAs="String"> <setting name="fbxVersion" serializeAs="String">
<value>3</value> <value>3</value>
</setting> </setting>
<setting name="FixRotation" serializeAs="String">
<value>True</value>
</setting>
</AssetStudio.Properties.Settings> </AssetStudio.Properties.Settings>
</userSettings> </userSettings>
</configuration> </configuration>

View File

@ -31,7 +31,8 @@ static char* FBXVersion[] =
FBX_2011_00_COMPATIBLE, FBX_2011_00_COMPATIBLE,
FBX_2012_00_COMPATIBLE, FBX_2012_00_COMPATIBLE,
FBX_2013_00_COMPATIBLE, FBX_2013_00_COMPATIBLE,
FBX_2014_00_COMPATIBLE FBX_2014_00_COMPATIBLE,
FBX_2016_00_COMPATIBLE
}; };
namespace AssetStudio { namespace AssetStudio {

View File

@ -90,11 +90,11 @@
<WarningLevel>Level3</WarningLevel> <WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization> <Optimization>Disabled</Optimization>
<PreprocessorDefinitions>FBXSDK_SHARED;_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>FBXSDK_SHARED;_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>C:\Program Files\Autodesk\FBX\FBX SDK\2015.1\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>C:\Program Files\Autodesk\FBX\FBX SDK\2019.0\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile> </ClCompile>
<Link> <Link>
<AdditionalDependencies>libfbxsdk.lib;%(AdditionalDependencies)</AdditionalDependencies> <AdditionalDependencies>libfbxsdk.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>C:\Program Files\Autodesk\FBX\FBX SDK\2015.1\lib\vs2013\x64\release;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> <AdditionalLibraryDirectories>C:\Program Files\Autodesk\FBX\FBX SDK\2019.0\lib\vs2015\x64\release;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Link> </Link>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
@ -102,33 +102,33 @@
<WarningLevel>Level3</WarningLevel> <WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization> <Optimization>Disabled</Optimization>
<PreprocessorDefinitions>FBXSDK_SHARED;_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>FBXSDK_SHARED;_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>C:\Program Files\Autodesk\FBX\FBX SDK\2015.1\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>C:\Program Files\Autodesk\FBX\FBX SDK\2019.0\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile> </ClCompile>
<Link> <Link>
<AdditionalDependencies>libfbxsdk.lib;%(AdditionalDependencies)</AdditionalDependencies> <AdditionalDependencies>libfbxsdk.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>C:\Program Files\Autodesk\FBX\FBX SDK\2015.1\lib\vs2013\x86\release;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> <AdditionalLibraryDirectories>C:\Program Files\Autodesk\FBX\FBX SDK\2019.0\lib\vs2015\x86\release;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Link> </Link>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile> <ClCompile>
<WarningLevel>Level3</WarningLevel> <WarningLevel>Level3</WarningLevel>
<PreprocessorDefinitions>FBXSDK_SHARED;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>FBXSDK_SHARED;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>C:\Program Files\Autodesk\FBX\FBX SDK\2015.1\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>C:\Program Files\Autodesk\FBX\FBX SDK\2019.0\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile> </ClCompile>
<Link> <Link>
<AdditionalDependencies>libfbxsdk.lib;%(AdditionalDependencies)</AdditionalDependencies> <AdditionalDependencies>libfbxsdk.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>C:\Program Files\Autodesk\FBX\FBX SDK\2015.1\lib\vs2013\x64\release;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> <AdditionalLibraryDirectories>C:\Program Files\Autodesk\FBX\FBX SDK\2019.0\lib\vs2015\x64\release;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Link> </Link>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile> <ClCompile>
<WarningLevel>Level3</WarningLevel> <WarningLevel>Level3</WarningLevel>
<PreprocessorDefinitions>FBXSDK_SHARED;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>FBXSDK_SHARED;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>C:\Program Files\Autodesk\FBX\FBX SDK\2015.1\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>C:\Program Files\Autodesk\FBX\FBX SDK\2019.0\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile> </ClCompile>
<Link> <Link>
<AdditionalDependencies>libfbxsdk.lib;%(AdditionalDependencies)</AdditionalDependencies> <AdditionalDependencies>libfbxsdk.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>C:\Program Files\Autodesk\FBX\FBX SDK\2015.1\lib\vs2013\x86\release;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> <AdditionalLibraryDirectories>C:\Program Files\Autodesk\FBX\FBX SDK\2019.0\lib\vs2015\x86\release;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Link> </Link>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemGroup> <ItemGroup>

View File

@ -75,11 +75,21 @@ namespace AssetStudio
cDest = StringToCharArray(path); cDest = StringToCharArray(path);
pExporter = FbxExporter::Create(pScene, ""); pExporter = FbxExporter::Create(pScene, "");
if (!pExporter->Initialize(cDest, 0, pSdkManager->GetIOSettings()))
int pFileFormat = 0;
if (versionIndex == 0)
{
pFileFormat = 3;
}
else
{
pExporter->SetFileExportVersion(FBXVersion[versionIndex]);
}
if (!pExporter->Initialize(cDest, pFileFormat, pSdkManager->GetIOSettings()))
{ {
throw gcnew Exception(gcnew String("Failed to initialize FbxExporter: ") + gcnew String(pExporter->GetStatus().GetErrorString())); throw gcnew Exception(gcnew String("Failed to initialize FbxExporter: ") + gcnew String(pExporter->GetStatus().GetErrorString()));
} }
pExporter->SetFileExportVersion(FBXVersion[versionIndex], FbxSceneRenamer::ERenamingMode::eNone);
frameNames = nullptr; frameNames = nullptr;
if (!allFrames) if (!allFrames)
@ -113,7 +123,7 @@ namespace AssetStudio
meshPath = gcnew String(rootNode->GetName()) + "/" + meshPath; meshPath = gcnew String(rootNode->GetName()) + "/" + meshPath;
} }
ImportedMesh^ mesh = ImportedHelpers::FindMesh(meshPath, imported->MeshList); ImportedMesh^ mesh = ImportedHelpers::FindMesh(meshPath, imported->MeshList);
ExportMesh(meshNode, mesh, normals); ExportMesh(meshNode, mesh, normals);
} }
} }
else else
@ -818,7 +828,6 @@ namespace AssetStudio
lCurve[1] = lCurveRY; lCurve[1] = lCurveRY;
lCurve[2] = lCurveRZ; lCurve[2] = lCurveRZ;
EulerFilter->Reset(); EulerFilter->Reset();
EulerFilter->SetTestForPath(true);
EulerFilter->SetQualityTolerance(filterPrecision); EulerFilter->SetQualityTolerance(filterPrecision);
EulerFilter->Apply(lCurve, 3); EulerFilter->Apply(lCurve, 3);
} }