Export by nodes
This commit is contained in:
@@ -1578,6 +1578,41 @@ namespace AssetStudioGUI
|
||||
}
|
||||
}
|
||||
|
||||
private void exportSelectedNodessplitToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
ExportNodes(false);
|
||||
}
|
||||
|
||||
private void exportSelectedNodessplitSelectedAnimationClipsToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
ExportNodes(true);
|
||||
}
|
||||
|
||||
private void ExportNodes(bool animation)
|
||||
{
|
||||
if (sceneTreeView.Nodes.Count > 0)
|
||||
{
|
||||
var saveFolderDialog = new OpenFolderDialog();
|
||||
saveFolderDialog.InitialFolder = saveDirectoryBackup;
|
||||
if (saveFolderDialog.ShowDialog(this) == DialogResult.OK)
|
||||
{
|
||||
saveDirectoryBackup = saveFolderDialog.Folder;
|
||||
var exportPath = Path.Combine(saveFolderDialog.Folder, "GameObject") + Path.DirectorySeparatorChar;
|
||||
var roots = sceneTreeView.Nodes.Cast<TreeNode>().Where(x => x.Level == 0 && x.Checked).ToList();
|
||||
List<AssetItem> animationList = null;
|
||||
if (animation)
|
||||
{
|
||||
animationList = GetSelectedAssets().Where(x => x.Type == ClassIDType.AnimationClip).ToList();
|
||||
if (animationList.Count == 0)
|
||||
{
|
||||
animationList = null;
|
||||
}
|
||||
}
|
||||
ExportNodesWithAnimationClip(exportPath, roots, animationList);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void goToSceneHierarchyToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
var selectasset = (AssetItem)assetListView.Items[assetListView.SelectedIndices[0]];
|
||||
|
||||
Reference in New Issue
Block a user