mirror of
https://github.com/aelurum/AssetStudio.git
synced 2025-05-27 22:00:23 -04:00
Fixed #177
This commit is contained in:
parent
e3a0ab4e4a
commit
906149a58a
@ -1744,7 +1744,7 @@ namespace AssetStudio
|
|||||||
selectedAssets.Add((AssetPreloadData)assetListView.Items[assetListView.SelectedIndices[0]]);
|
selectedAssets.Add((AssetPreloadData)assetListView.Items[assetListView.SelectedIndices[0]]);
|
||||||
showOriginalFileToolStripMenuItem.Visible = true;
|
showOriginalFileToolStripMenuItem.Visible = true;
|
||||||
}
|
}
|
||||||
else if (assetListView.SelectedIndices.Count >= 1)
|
if (assetListView.SelectedIndices.Count >= 1)
|
||||||
{
|
{
|
||||||
selectedAssets.Clear();
|
selectedAssets.Clear();
|
||||||
foreach (int index in assetListView.SelectedIndices)
|
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))
|
if (selectedAssets.Any(x => x.Type == ClassIDReference.Animator) && selectedAssets.Any(x => x.Type == ClassIDReference.AnimationClip))
|
||||||
{
|
{
|
||||||
exportAnimatorwithAnimationClipMenuItem.Visible = true;
|
exportAnimatorwithAnimationClipMenuItem.Visible = true;
|
||||||
|
|
||||||
}
|
}
|
||||||
else if (selectedAssets.All(x => x.Type == ClassIDReference.AnimationClip))
|
else if (selectedAssets.All(x => x.Type == ClassIDReference.AnimationClip))
|
||||||
{
|
{
|
||||||
@ -1819,7 +1818,7 @@ namespace AssetStudio
|
|||||||
var saveFolderDialog1 = new OpenFolderDialog();
|
var saveFolderDialog1 = new OpenFolderDialog();
|
||||||
if (saveFolderDialog1.ShowDialog(this) == DialogResult.OK)
|
if (saveFolderDialog1.ShowDialog(this) == DialogResult.OK)
|
||||||
{
|
{
|
||||||
var exportPath = saveFolderDialog1.Folder + "\\Animator\\";
|
var exportPath = saveFolderDialog1.Folder + "\\GameObject\\";
|
||||||
ThreadPool.QueueUserWorkItem(state => ForeachTreeNodes(sceneTreeView.Nodes, exportPath));
|
ThreadPool.QueueUserWorkItem(state => ForeachTreeNodes(sceneTreeView.Nodes, exportPath));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -178,8 +178,6 @@ namespace AssetStudio
|
|||||||
public Vector3 tangent { get; set; }
|
public Vector3 tangent { get; set; }
|
||||||
public uint index { get; set; }
|
public uint index { get; set; }
|
||||||
|
|
||||||
public BlendShapeVertex() { }
|
|
||||||
|
|
||||||
public BlendShapeVertex(EndianBinaryReader reader)
|
public BlendShapeVertex(EndianBinaryReader reader)
|
||||||
{
|
{
|
||||||
vertex = reader.ReadVector3();
|
vertex = reader.ReadVector3();
|
||||||
@ -196,15 +194,13 @@ namespace AssetStudio
|
|||||||
public bool hasNormals { get; set; }
|
public bool hasNormals { get; set; }
|
||||||
public bool hasTangents { get; set; }
|
public bool hasTangents { get; set; }
|
||||||
|
|
||||||
public MeshBlendShape() { }
|
|
||||||
|
|
||||||
public MeshBlendShape(EndianBinaryReader reader)
|
public MeshBlendShape(EndianBinaryReader reader)
|
||||||
{
|
{
|
||||||
firstVertex = reader.ReadUInt32();
|
firstVertex = reader.ReadUInt32();
|
||||||
vertexCount = reader.ReadUInt32();
|
vertexCount = reader.ReadUInt32();
|
||||||
hasNormals = reader.ReadBoolean();
|
hasNormals = reader.ReadBoolean();
|
||||||
hasTangents = reader.ReadBoolean();
|
hasTangents = reader.ReadBoolean();
|
||||||
reader.ReadBytes(2);
|
reader.AlignStream(4);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -215,11 +211,9 @@ namespace AssetStudio
|
|||||||
public int frameIndex { get; set; }
|
public int frameIndex { get; set; }
|
||||||
public int frameCount { get; set; }
|
public int frameCount { get; set; }
|
||||||
|
|
||||||
public MeshBlendShapeChannel() { }
|
|
||||||
|
|
||||||
public MeshBlendShapeChannel(EndianBinaryReader reader)
|
public MeshBlendShapeChannel(EndianBinaryReader reader)
|
||||||
{
|
{
|
||||||
name = reader.ReadStringToNull();
|
name = reader.ReadAlignedString();
|
||||||
nameHash = reader.ReadUInt32();
|
nameHash = reader.ReadUInt32();
|
||||||
frameIndex = reader.ReadInt32();
|
frameIndex = reader.ReadInt32();
|
||||||
frameCount = reader.ReadInt32();
|
frameCount = reader.ReadInt32();
|
||||||
|
@ -510,13 +510,14 @@ namespace AssetStudio
|
|||||||
{
|
{
|
||||||
ThreadPool.QueueUserWorkItem(state =>
|
ThreadPool.QueueUserWorkItem(state =>
|
||||||
{
|
{
|
||||||
var result = false;
|
bool result;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
result = ExportAnimator(animator, animationList, exportPath);
|
result = ExportAnimator(animator, animationList, exportPath);
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
result = false;
|
||||||
MessageBox.Show($"{ex.Message}\r\n{ex.StackTrace}");
|
MessageBox.Show($"{ex.Message}\r\n{ex.StackTrace}");
|
||||||
}
|
}
|
||||||
StatusStripUpdate(result ? "Successfully exported" : "Nothing exported.");
|
StatusStripUpdate(result ? "Successfully exported" : "Nothing exported.");
|
||||||
@ -526,7 +527,16 @@ namespace AssetStudio
|
|||||||
|
|
||||||
public static void ExportObjectsWithAnimationClip(GameObject gameObject, List<AssetPreloadData> animationList, string exportPath)
|
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.");
|
StatusStripUpdate(result ? "Successfully exported" : "Nothing exported.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user