This commit is contained in:
Perfare 2018-04-13 03:16:09 +08:00
parent e3a0ab4e4a
commit 906149a58a
3 changed files with 16 additions and 13 deletions

View File

@ -1744,7 +1744,7 @@ namespace AssetStudio
selectedAssets.Add((AssetPreloadData)assetListView.Items[assetListView.SelectedIndices[0]]);
showOriginalFileToolStripMenuItem.Visible = true;
}
else if (assetListView.SelectedIndices.Count >= 1)
if (assetListView.SelectedIndices.Count >= 1)
{
selectedAssets.Clear();
foreach (int index in assetListView.SelectedIndices)
@ -1755,7 +1755,6 @@ namespace AssetStudio
if (selectedAssets.Any(x => x.Type == ClassIDReference.Animator) && selectedAssets.Any(x => x.Type == ClassIDReference.AnimationClip))
{
exportAnimatorwithAnimationClipMenuItem.Visible = true;
}
else if (selectedAssets.All(x => x.Type == ClassIDReference.AnimationClip))
{
@ -1819,7 +1818,7 @@ namespace AssetStudio
var saveFolderDialog1 = new OpenFolderDialog();
if (saveFolderDialog1.ShowDialog(this) == DialogResult.OK)
{
var exportPath = saveFolderDialog1.Folder + "\\Animator\\";
var exportPath = saveFolderDialog1.Folder + "\\GameObject\\";
ThreadPool.QueueUserWorkItem(state => ForeachTreeNodes(sceneTreeView.Nodes, exportPath));
}
}

View File

@ -178,8 +178,6 @@ namespace AssetStudio
public Vector3 tangent { get; set; }
public uint index { get; set; }
public BlendShapeVertex() { }
public BlendShapeVertex(EndianBinaryReader reader)
{
vertex = reader.ReadVector3();
@ -196,15 +194,13 @@ namespace AssetStudio
public bool hasNormals { get; set; }
public bool hasTangents { get; set; }
public MeshBlendShape() { }
public MeshBlendShape(EndianBinaryReader reader)
{
firstVertex = reader.ReadUInt32();
vertexCount = reader.ReadUInt32();
hasNormals = reader.ReadBoolean();
hasTangents = reader.ReadBoolean();
reader.ReadBytes(2);
reader.AlignStream(4);
}
}
@ -215,11 +211,9 @@ namespace AssetStudio
public int frameIndex { get; set; }
public int frameCount { get; set; }
public MeshBlendShapeChannel() { }
public MeshBlendShapeChannel(EndianBinaryReader reader)
{
name = reader.ReadStringToNull();
name = reader.ReadAlignedString();
nameHash = reader.ReadUInt32();
frameIndex = reader.ReadInt32();
frameCount = reader.ReadInt32();

View File

@ -510,13 +510,14 @@ namespace AssetStudio
{
ThreadPool.QueueUserWorkItem(state =>
{
var result = false;
bool result;
try
{
result = ExportAnimator(animator, animationList, exportPath);
}
catch (Exception ex)
{
result = false;
MessageBox.Show($"{ex.Message}\r\n{ex.StackTrace}");
}
StatusStripUpdate(result ? "Successfully exported" : "Nothing exported.");
@ -526,7 +527,16 @@ namespace AssetStudio
public static void ExportObjectsWithAnimationClip(GameObject gameObject, List<AssetPreloadData> animationList, string exportPath)
{
var result = ExportGameObject(gameObject, animationList, exportPath);
bool result;
try
{
result = ExportGameObject(gameObject, animationList, exportPath);
}
catch (Exception ex)
{
result = false;
MessageBox.Show($"{ex.Message}\r\n{ex.StackTrace}");
}
StatusStripUpdate(result ? "Successfully exported" : "Nothing exported.");
}
}