mirror of
https://github.com/4sval/FModel.git
synced 2026-04-03 15:45:59 -05:00
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:
parent
652b7cfeaa
commit
1ba3afb483
|
|
@ -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
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user