Support for exporting raw data

This commit is contained in:
Perfare
2019-07-28 19:48:06 +08:00
parent 20f9fe493f
commit f377381e26
4 changed files with 119 additions and 50 deletions

View File

@ -355,7 +355,7 @@ namespace AssetStudioGUI
return Path.GetInvalidFileNameChars().Aggregate(str, (current, c) => current.Replace(c, '_'));
}
public static void ExportAssets(string savePath, List<AssetItem> toExportAssets, int assetGroupSelectedIndex, bool openAfterExport)
public static void ExportAssets(string savePath, List<AssetItem> toExportAssets, int assetGroupSelectedIndex, bool openAfterExport, bool raw)
{
ThreadPool.QueueUserWorkItem(state =>
{
@ -379,6 +379,14 @@ namespace AssetStudioGUI
Logger.Info($"Exporting {asset.TypeString}: {asset.Text}");
try
{
if (raw)
{
if (ExportRawFile(asset, exportpath))
{
exportedCount++;
}
continue;
}
switch (asset.Type)
{
case ClassIDType.Texture2D: