Supported merge GameObject to export

This commit is contained in:
Perfare
2019-07-17 12:51:00 +08:00
parent 738b084440
commit e9e8390bbc
6 changed files with 164 additions and 54 deletions

View File

@ -615,7 +615,32 @@ namespace AssetStudioGUI
});
}
private static void GetSelectedParentNode(TreeNodeCollection nodes, List<GameObject> gameObjects)
public static void ExportObjectsMergeWithAnimationClip(string exportPath, bool openAfterExport, List<GameObject> gameObjects, List<AssetItem> animationList = null)
{
ThreadPool.QueueUserWorkItem(state =>
{
var name = Path.GetFileName(exportPath);
Progress.Reset();
Logger.Info($"Exporting {name}");
try
{
ExportGameObjectMerge(gameObjects, exportPath, animationList);
Progress.Report(1, 1);
Logger.Info($"Finished exporting {name}");
}
catch (Exception ex)
{
MessageBox.Show($"Export Model:{name} error\r\n{ex.Message}\r\n{ex.StackTrace}");
Logger.Info("Error in export");
}
if (openAfterExport)
{
Process.Start(Path.GetDirectoryName(exportPath));
}
});
}
public static void GetSelectedParentNode(TreeNodeCollection nodes, List<GameObject> gameObjects)
{
foreach (GameObjectTreeNode i in nodes)
{