Skip to content
This repository has been archived by the owner on May 11, 2024. It is now read-only.

Commit

Permalink
- [GUI] Highlight nodes that are exportable as fbx.
Browse files Browse the repository at this point in the history
- [GUI] Add option to toggle between selecting all subnodes or matching only (using `Alt` key).
  • Loading branch information
Razmoth committed Feb 27, 2024
1 parent ab73046 commit 63b4464
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
4 changes: 4 additions & 0 deletions AssetStudio.GUI/Components/GameObjectTreeNode.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ public GameObjectTreeNode(GameObject gameObject)
{
this.gameObject = gameObject;
Text = gameObject.m_Name;
if (gameObject.HasModel())
{
BackColor = System.Drawing.Color.LightBlue;
}
}
}
}
15 changes: 11 additions & 4 deletions AssetStudio.GUI/MainForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -609,9 +609,12 @@ private void treeSearch_KeyDown(object sender, KeyEventArgs e)
foreach (var node in treeSrcResults)
{
var tempNode = node;
while (tempNode.Parent != null)
if (e.Alt)
{
tempNode = tempNode.Parent;
while (tempNode.Parent != null)
{
tempNode = tempNode.Parent;
}
}
tempNode.EnsureVisible();
tempNode.Checked = e.Control;
Expand All @@ -625,10 +628,14 @@ private void treeSearch_KeyDown(object sender, KeyEventArgs e)
nextGObject = 0;
}
var node = treeSrcResults[nextGObject];
while (node.Parent != null)
if (e.Alt)
{
node = node.Parent;
while (node.Parent != null)
{
node = node.Parent;
}
}

node.EnsureVisible();
node.Checked = e.Control;
sceneTreeView.SelectedNode = treeSrcResults[nextGObject];
Expand Down

0 comments on commit 63b4464

Please sign in to comment.