Show only final output pose layer initially in AnimGraph viewer

Only the AnimGraph layer (containing Root/Result nodes) is shown
when first opening the animation blueprint, instead of all layer tabs.

Co-authored-by: LoogLong <86428208+LoogLong@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot] 2026-03-02 05:52:14 +00:00
parent 652b7cfeaa
commit 1ba3afb483

View File

@ -55,8 +55,8 @@ public partial class AnimGraphViewer
}
/// <summary>
/// Creates a tab for each layer in the animation graph.
/// Each tab contains its own canvas with zoom/pan support.
/// Creates a tab for the final output pose layer only.
/// Only the AnimGraph layer (containing the Root node) is shown initially.
/// </summary>
private void BuildLayerTabs()
{
@ -67,7 +67,15 @@ public partial class AnimGraphViewer
if (_viewModel.Layers.Count == 0)
return;
foreach (var layer in _viewModel.Layers)
// Show only the final output pose layer (AnimGraph) initially
var outputLayer = _viewModel.Layers.FirstOrDefault(l =>
l.Nodes.Any(n => n.ExportType.Contains("Root", StringComparison.OrdinalIgnoreCase) ||
n.ExportType.Contains("Result", StringComparison.OrdinalIgnoreCase)))
?? _viewModel.Layers[0];
var layersToShow = new[] { outputLayer };
foreach (var layer in layersToShow)
{
var tabItem = new System.Windows.Controls.TabItem
{