Skip to content

Commit

Permalink
add "Dump with PathID as filename" feature
Browse files Browse the repository at this point in the history
  • Loading branch information
aelurum committed Jul 27, 2020
1 parent c5f7ef6 commit 0426625
Show file tree
Hide file tree
Showing 9 changed files with 66 additions and 30 deletions.
4 changes: 2 additions & 2 deletions AssetStudio/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@
//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
//通过使用 "*",如下所示:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("0.14.38.3")]
[assembly: AssemblyFileVersion("0.14.38.3")]
[assembly: AssemblyVersion("0.14.38.4")]
[assembly: AssemblyFileVersion("0.14.38.4")]
47 changes: 31 additions & 16 deletions AssetStudioGUI/ExportOptions.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 2 additions & 7 deletions AssetStudioGUI/ExportOptions.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,4 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace AssetStudioGUI
Expand Down Expand Up @@ -41,6 +34,7 @@ public ExportOptions()
fbxVersion.SelectedIndex = Properties.Settings.Default.fbxVersion;
fbxFormat.SelectedIndex = Properties.Settings.Default.fbxFormat;
pathIDAsImageName.Checked = Properties.Settings.Default.pathIDAsImageName;
pathIDAsDumpName.Checked = Properties.Settings.Default.pathIDAsDumpName;
}

private void OKbutton_Click(object sender, EventArgs e)
Expand Down Expand Up @@ -70,6 +64,7 @@ private void OKbutton_Click(object sender, EventArgs e)
Properties.Settings.Default.fbxVersion = fbxVersion.SelectedIndex;
Properties.Settings.Default.fbxFormat = fbxFormat.SelectedIndex;
Properties.Settings.Default.pathIDAsImageName = pathIDAsImageName.Checked;
Properties.Settings.Default.pathIDAsDumpName = pathIDAsDumpName.Checked;
Properties.Settings.Default.Save();
DialogResult = DialogResult.OK;
Close();
Expand Down
10 changes: 9 additions & 1 deletion AssetStudioGUI/Exporter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,15 @@ private static void ExportFbx(IImported convert, string exportPath)

public static bool ExportDumpFile(AssetItem item, string exportPath)
{
var exportFullName = exportPath + item.Text + ".txt";
string exportFullName;
if (Properties.Settings.Default.pathIDAsDumpName)
{
exportFullName = exportPath + item.m_PathID.ToString() + ".txt";
}
else
{
exportFullName = exportPath + item.Text + ".txt";
}
if (ExportFileExists(exportFullName))
return false;
var str = item.Asset.Dump();
Expand Down
4 changes: 2 additions & 2 deletions AssetStudioGUI/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@
//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
//通过使用 "*",如下所示:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("0.14.38.3")]
[assembly: AssemblyFileVersion("0.14.38.3")]
[assembly: AssemblyVersion("0.14.38.4")]
[assembly: AssemblyFileVersion("0.14.38.4")]
12 changes: 12 additions & 0 deletions AssetStudioGUI/Properties/Settings.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions AssetStudioGUI/Properties/Settings.settings
Original file line number Diff line number Diff line change
Expand Up @@ -65,5 +65,8 @@
<Setting Name="pathIDAsImageName" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">False</Value>
</Setting>
<Setting Name="pathIDAsDumpName" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">False</Value>
</Setting>
</Settings>
</SettingsFile>
3 changes: 3 additions & 0 deletions AssetStudioGUI/app.config
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,9 @@
<setting name="pathIDAsImageName" serializeAs="String">
<value>False</value>
</setting>
<setting name="pathIDAsDumpName" serializeAs="String">
<value>False</value>
</setting>
</AssetStudioGUI.Properties.Settings>
</userSettings>
</configuration>
4 changes: 2 additions & 2 deletions AssetStudioUtility/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@
//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
//通过使用 "*",如下所示:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("0.14.38.3")]
[assembly: AssemblyFileVersion("0.14.38.3")]
[assembly: AssemblyVersion("0.14.38.4")]
[assembly: AssemblyFileVersion("0.14.38.4")]

0 comments on commit 0426625

Please sign in to comment.