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 };