Skip to content

Commit 6c7ac47

Browse files
authored
Merge pull request WolvenKit#2668 from WolvenKit/cvm-expand-materialtemplate
CVM: expand materialtemplate's properties when opening
2 parents d2af699 + 62a053d commit 6c7ac47

File tree

10 files changed

+170
-210
lines changed

10 files changed

+170
-210
lines changed

WolvenKit.App/ViewModels/GraphEditor/RedGraph.Quest.cs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
using WolvenKit.App.ViewModels.GraphEditor.Nodes.Quest.Internal;
88
using WolvenKit.App.ViewModels.Shell;
99
using WolvenKit.RED4.Types;
10-
using WolvenKit.App.Services;
1110

1211
namespace WolvenKit.App.ViewModels.GraphEditor;
1312

@@ -521,15 +520,15 @@ private void RefreshCVM(questSocketDefinition[] sockets)
521520

522521
// Find affected nodes and trigger property panel refresh for each
523522
var affectedNodeIds = sockets
524-
.Select(socket => Nodes.FirstOrDefault(n =>
523+
.Select(socket => Nodes.FirstOrDefault(n =>
525524
n.Output.OfType<QuestOutputConnectorViewModel>()
526525
.Any(output => ReferenceEquals(output.Data, socket)) ||
527526
n.Input.OfType<QuestInputConnectorViewModel>()
528527
.Any(input => ReferenceEquals(input.Data, socket))))
529528
.Where(node => node != null)
530529
.Select(node => node!.UniqueId)
531530
.ToHashSet();
532-
531+
533532
// Trigger property panel refresh for affected nodes
534533
foreach (var nodeId in affectedNodeIds)
535534
{
@@ -548,7 +547,7 @@ private void RefreshCVM(questSocketDefinition[] sockets)
548547
return null;
549548
}
550549

551-
if (dataViewModel.Chunks[0].GetPropertyFromPath("graph.nodes") is not { } nodes)
550+
if (dataViewModel.Chunks[0].GetPropertyChild("graph", "nodes") is not { } nodes)
552551
{
553552
return null;
554553
}

0 commit comments

Comments
 (0)