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.21k stars 369 forks source link

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

Open xzaxzaazx opened 1 year ago

xzaxzaazx commented 1 year 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 1 year ago

In CreateNodeMenuWindow.cs: In CreateEdgeNodeMenu():

replace: NodeProvider.GetNodeMenuEntries(graphView.graph)

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