alelievr / NodeGraphProcessor

Node graph editor framework focused on data processing using Unity UIElements and C# 4.6
https://github.com/alelievr/NodeGraphProcessor/projects/2
MIT License
2.34k stars 387 forks source link

`FilterCreateNodeMenuEntries` Not working when I create Node by drag #221

Open xzaxzaazx opened 2 years ago

xzaxzaazx commented 2 years ago

Nodes totally mixed when I have TWO type of graphs. I can tell them apart by overriding DialogGraphView.FilterCreateNodeMenuEntries(), but that doesn't work when I drag a port to empty place to create new Node. The nodes in create list are totally not filtered.

chadefranklin commented 2 years ago

In CreateNodeMenuWindow.cs: In CreateEdgeNodeMenu():

replace: NodeProvider.GetNodeMenuEntries(graphView.graph)

with: graphView.FilterCreateNodeMenuEntries().OrderBy(k => k.path)