mirror of
https://github.com/aelurum/AssetStudio.git
synced 2025-05-25 05:40:21 -04:00
Fixed #302
This commit is contained in:
parent
0a5b866a03
commit
ec9184ba93
@ -1783,7 +1783,7 @@ namespace AssetStudioGUI
|
||||
if (saveFolderDialog1.ShowDialog(this) == DialogResult.OK)
|
||||
{
|
||||
var exportPath = saveFolderDialog1.Folder + "\\Animator\\";
|
||||
ExportAnimatorWithAnimationClip(animator, animationList, exportPath);
|
||||
ExportAnimatorWithAnimationClip(animator, animationList, exportPath, openAfterExport.Checked);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1796,7 +1796,7 @@ namespace AssetStudioGUI
|
||||
if (saveFolderDialog1.ShowDialog(this) == DialogResult.OK)
|
||||
{
|
||||
var exportPath = saveFolderDialog1.Folder + "\\GameObject\\";
|
||||
ExportObjectsWithAnimationClip(exportPath, sceneTreeView.Nodes);
|
||||
ExportObjectsWithAnimationClip(exportPath, sceneTreeView.Nodes, openAfterExport.Checked);
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -1814,7 +1814,7 @@ namespace AssetStudioGUI
|
||||
{
|
||||
var exportPath = saveFolderDialog1.Folder + "\\GameObject\\";
|
||||
var animationList = GetSelectedAssets().Where(x => x.Type == ClassIDType.AnimationClip).ToList();
|
||||
ExportObjectsWithAnimationClip(exportPath, sceneTreeView.Nodes, animationList.Count == 0 ? null : animationList);
|
||||
ExportObjectsWithAnimationClip(exportPath, sceneTreeView.Nodes, openAfterExport.Checked, animationList.Count == 0 ? null : animationList);
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -1841,7 +1841,7 @@ namespace AssetStudioGUI
|
||||
if (saveFolderDialog1.ShowDialog(this) == DialogResult.OK)
|
||||
{
|
||||
var savePath = saveFolderDialog1.Folder + "\\";
|
||||
ExportSplitObjects(savePath, sceneTreeView.Nodes);
|
||||
ExportSplitObjects(savePath, sceneTreeView.Nodes, openAfterExport.Checked);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -466,7 +466,7 @@ namespace AssetStudioGUI
|
||||
});
|
||||
}
|
||||
|
||||
public static void ExportSplitObjects(string savePath, TreeNodeCollection nodes)
|
||||
public static void ExportSplitObjects(string savePath, TreeNodeCollection nodes, bool openAfterExport)
|
||||
{
|
||||
ThreadPool.QueueUserWorkItem(state =>
|
||||
{
|
||||
@ -519,6 +519,10 @@ namespace AssetStudioGUI
|
||||
Logger.Info($"Finished exporting {filename}.fbx");
|
||||
}
|
||||
}
|
||||
if (openAfterExport)
|
||||
{
|
||||
Process.Start(savePath);
|
||||
}
|
||||
Logger.Info("Finished");
|
||||
});
|
||||
}
|
||||
@ -532,7 +536,7 @@ namespace AssetStudioGUI
|
||||
}
|
||||
}
|
||||
|
||||
public static void ExportAnimatorWithAnimationClip(AssetItem animator, List<AssetItem> animationList, string exportPath)
|
||||
public static void ExportAnimatorWithAnimationClip(AssetItem animator, List<AssetItem> animationList, string exportPath, bool openAfterExport)
|
||||
{
|
||||
ThreadPool.QueueUserWorkItem(state =>
|
||||
{
|
||||
@ -540,6 +544,10 @@ namespace AssetStudioGUI
|
||||
try
|
||||
{
|
||||
ExportAnimator(animator, exportPath, animationList);
|
||||
if (openAfterExport)
|
||||
{
|
||||
Process.Start(exportPath);
|
||||
}
|
||||
Logger.Info($"Finished exporting {animator.Text}");
|
||||
}
|
||||
catch (Exception ex)
|
||||
@ -550,7 +558,7 @@ namespace AssetStudioGUI
|
||||
});
|
||||
}
|
||||
|
||||
public static void ExportObjectsWithAnimationClip(string exportPath, TreeNodeCollection nodes, List<AssetItem> animationList = null)
|
||||
public static void ExportObjectsWithAnimationClip(string exportPath, TreeNodeCollection nodes, bool openAfterExport, List<AssetItem> animationList = null)
|
||||
{
|
||||
ThreadPool.QueueUserWorkItem(state =>
|
||||
{
|
||||
@ -577,6 +585,10 @@ namespace AssetStudioGUI
|
||||
|
||||
Progress.Report(++i, count);
|
||||
}
|
||||
if (openAfterExport)
|
||||
{
|
||||
Process.Start(exportPath);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user