From 21ff88c89029c845e9511d15e26a1569ba7e1423 Mon Sep 17 00:00:00 2001 From: Perfare Date: Tue, 24 Jul 2018 13:02:08 +0800 Subject: [PATCH] Fixed #234 --- AssetStudio/StudioClasses/AssetsFile.cs | 5 ++++ AssetStudio/StudioClasses/Studio.cs | 34 +++++++++++++++---------- 2 files changed, 26 insertions(+), 13 deletions(-) diff --git a/AssetStudio/StudioClasses/AssetsFile.cs b/AssetStudio/StudioClasses/AssetsFile.cs index 6fe4ef9..be000ea 100644 --- a/AssetStudio/StudioClasses/AssetsFile.cs +++ b/AssetStudio/StudioClasses/AssetsFile.cs @@ -211,6 +211,11 @@ namespace AssetStudio } } + if (fileGen > 6 && m_Version == "") + { + return; + } + if (platform > 255 || platform < 0) { byte[] b32 = BitConverter.GetBytes(platform); diff --git a/AssetStudio/StudioClasses/Studio.cs b/AssetStudio/StudioClasses/Studio.cs index 896e192..061f1ef 100644 --- a/AssetStudio/StudioClasses/Studio.cs +++ b/AssetStudio/StudioClasses/Studio.cs @@ -672,22 +672,30 @@ namespace AssetStudio { var gameObjects = new List(); GetSelectedParentNode(nodes, gameObjects); - SetProgressBarValue(0); - SetProgressBarMaximum(gameObjects.Count); - foreach (var gameObject in gameObjects) + if (gameObjects.Count > 0) { - StatusStripUpdate($"Exporting {gameObject.Text}"); - try + SetProgressBarValue(0); + SetProgressBarMaximum(gameObjects.Count); + foreach (var gameObject in gameObjects) { - ExportGameObject(gameObject, exportPath, animationList); - StatusStripUpdate($"Finished exporting {gameObject.Text}"); + StatusStripUpdate($"Exporting {gameObject.Text}"); + try + { + ExportGameObject(gameObject, exportPath, animationList); + StatusStripUpdate($"Finished exporting {gameObject.Text}"); + } + catch (Exception ex) + { + MessageBox.Show($"{ex.Message}\r\n{ex.StackTrace}"); + StatusStripUpdate("Error in export"); + } + + ProgressBarPerformStep(); } - catch (Exception ex) - { - MessageBox.Show($"{ex.Message}\r\n{ex.StackTrace}"); - StatusStripUpdate("Error in export"); - } - ProgressBarPerformStep(); + } + else + { + StatusStripUpdate("No Object can be exported."); } }); }