From c1962c77bec8cfd47f326cd206fdf97bcdc1296b Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 2 Mar 2026 06:31:15 +0000 Subject: [PATCH] Fix output pose layer detection to use AnimGraphNode_Root Name="AnimGraph" The output pose layer is now correctly identified by finding the node whose Name property is "AnimGraph" (stored on AnimGraphNode_Root), instead of incorrectly matching any node with "Root" in ExportType. Co-authored-by: LoogLong <86428208+LoogLong@users.noreply.github.com> --- FModel/ViewModels/AnimGraphViewModel.cs | 4 ++-- FModel/Views/AnimGraphViewer.xaml.cs | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/FModel/ViewModels/AnimGraphViewModel.cs b/FModel/ViewModels/AnimGraphViewModel.cs index c1b9bb5b..f1e4061e 100644 --- a/FModel/ViewModels/AnimGraphViewModel.cs +++ b/FModel/ViewModels/AnimGraphViewModel.cs @@ -215,9 +215,9 @@ public class AnimGraphViewModel /// private static string GetLayerName(List nodes, int index) { - // Look for a prominent node type to name the layer + // The final output pose layer contains an AnimGraphNode_Root with Name="AnimGraph" var rootNode = nodes.FirstOrDefault(n => - n.ExportType.Contains("Root", StringComparison.OrdinalIgnoreCase)); + n.Name.Equals("AnimGraph", StringComparison.OrdinalIgnoreCase)); if (rootNode != null) return "AnimGraph"; diff --git a/FModel/Views/AnimGraphViewer.xaml.cs b/FModel/Views/AnimGraphViewer.xaml.cs index 01d4f31b..773b0044 100644 --- a/FModel/Views/AnimGraphViewer.xaml.cs +++ b/FModel/Views/AnimGraphViewer.xaml.cs @@ -67,10 +67,10 @@ public partial class AnimGraphViewer if (_viewModel.Layers.Count == 0) return; - // Show only the final output pose layer (AnimGraph) initially + // Show only the final output pose layer (AnimGraph) initially. + // The root node of the output layer is an AnimGraphNode_Root with Name="AnimGraph". var outputLayer = _viewModel.Layers.FirstOrDefault(l => - l.Nodes.Any(n => n.ExportType.Contains("Root", StringComparison.OrdinalIgnoreCase) || - n.ExportType.Contains("Result", StringComparison.OrdinalIgnoreCase))) + l.Nodes.Any(n => n.Name.Equals("AnimGraph", StringComparison.OrdinalIgnoreCase))) ?? _viewModel.Layers[0]; var layersToShow = new[] { outputLayer };