mirror of
https://github.com/aelurum/AssetStudio.git
synced 2025-07-18 03:24:15 -04:00
Supported merge GameObject to export
This commit is contained in:
@ -1723,7 +1723,6 @@ namespace AssetStudioGUI
|
||||
jumpToSceneHierarchyToolStripMenuItem.Visible = false;
|
||||
showOriginalFileToolStripMenuItem.Visible = false;
|
||||
exportAnimatorwithselectedAnimationClipMenuItem.Visible = false;
|
||||
exportobjectswithselectedAnimationClipMenuItem.Visible = false;
|
||||
|
||||
if (assetListView.SelectedIndices.Count == 1)
|
||||
{
|
||||
@ -1737,10 +1736,6 @@ namespace AssetStudioGUI
|
||||
{
|
||||
exportAnimatorwithselectedAnimationClipMenuItem.Visible = true;
|
||||
}
|
||||
else if (selectedAssets.All(x => x.Type == ClassIDType.AnimationClip))
|
||||
{
|
||||
exportobjectswithselectedAnimationClipMenuItem.Visible = true;
|
||||
}
|
||||
}
|
||||
|
||||
contextMenuStrip1.Show(assetListView, e.X, e.Y);
|
||||
@ -1828,6 +1823,43 @@ namespace AssetStudioGUI
|
||||
}
|
||||
}
|
||||
|
||||
private void exportSelectedObjectsmergeToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (sceneTreeView.Nodes.Count > 0)
|
||||
{
|
||||
var gameObjects = new List<GameObject>();
|
||||
GetSelectedParentNode(sceneTreeView.Nodes, gameObjects);
|
||||
var saveFileDialog = new SaveFileDialog();
|
||||
saveFileDialog.FileName = gameObjects[0].m_Name + " (merge).fbx";
|
||||
saveFileDialog.AddExtension = false;
|
||||
saveFileDialog.Filter = "Fbx file (*.fbx)|*.fbx";
|
||||
if (saveFileDialog.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
var exportPath = saveFileDialog.FileName;
|
||||
ExportObjectsMergeWithAnimationClip(exportPath, openAfterExport.Checked, gameObjects);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void exportSelectedObjectsmergeWithAnimationClipToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (sceneTreeView.Nodes.Count > 0)
|
||||
{
|
||||
var gameObjects = new List<GameObject>();
|
||||
GetSelectedParentNode(sceneTreeView.Nodes, gameObjects);
|
||||
var saveFileDialog = new SaveFileDialog();
|
||||
saveFileDialog.FileName = gameObjects[0].m_Name + " (merge).fbx";
|
||||
saveFileDialog.AddExtension = false;
|
||||
saveFileDialog.Filter = "Fbx file (*.fbx)|*.fbx";
|
||||
if (saveFileDialog.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
var exportPath = saveFileDialog.FileName;
|
||||
var animationList = GetSelectedAssets().Where(x => x.Type == ClassIDType.AnimationClip).ToList();
|
||||
ExportObjectsMergeWithAnimationClip(exportPath, openAfterExport.Checked, gameObjects, animationList.Count == 0 ? null : animationList);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void jumpToSceneHierarchyToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
var selectasset = (AssetItem)assetListView.Items[assetListView.SelectedIndices[0]];
|
||||
|
Reference in New Issue
Block a user