From 63b446485052e37ec43ab4f5372d45c7d55869b2 Mon Sep 17 00:00:00 2001 From: Razmoth <32140579+Razmoth@users.noreply.github.com> Date: Tue, 27 Feb 2024 14:59:31 +0400 Subject: [PATCH] - [GUI] Highlight nodes that are exportable as fbx. - [GUI] Add option to toggle between selecting all subnodes or matching only (using `Alt` key). --- AssetStudio.GUI/Components/GameObjectTreeNode.cs | 4 ++++ AssetStudio.GUI/MainForm.cs | 15 +++++++++++---- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/AssetStudio.GUI/Components/GameObjectTreeNode.cs b/AssetStudio.GUI/Components/GameObjectTreeNode.cs index 99c71e6..6d7eba8 100644 --- a/AssetStudio.GUI/Components/GameObjectTreeNode.cs +++ b/AssetStudio.GUI/Components/GameObjectTreeNode.cs @@ -10,6 +10,10 @@ public GameObjectTreeNode(GameObject gameObject) { this.gameObject = gameObject; Text = gameObject.m_Name; + if (gameObject.HasModel()) + { + BackColor = System.Drawing.Color.LightBlue; + } } } } diff --git a/AssetStudio.GUI/MainForm.cs b/AssetStudio.GUI/MainForm.cs index d0d3dd9..1453ef7 100644 --- a/AssetStudio.GUI/MainForm.cs +++ b/AssetStudio.GUI/MainForm.cs @@ -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; @@ -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];