From aad650e565e1c319ac6137557d02978d16b4dbee Mon Sep 17 00:00:00 2001 From: GregoryD2017 Date: Tue, 7 Nov 2023 04:09:36 -0800 Subject: [PATCH] Improve "Add Node" workflows in the graph editor Previously, the tab menu was the only way to add new nodes to the graph editor. Now users can select any pin in the graph, and drag a link off of that pin. If this link does not connect to another pin, on mouse release, the user will be prompted to add a new node. The list of nodes that users can add will be filtered to only include nodes that can be connected to the pin from which this link originates. This context-aware node filtering in the "Add Node" popup can be toggled on/off with the "Smart Filter" check box. --- source/MaterialXGraphEditor/Graph.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/MaterialXGraphEditor/Graph.cpp b/source/MaterialXGraphEditor/Graph.cpp index fb049ee62c..ae977b09fc 100644 --- a/source/MaterialXGraphEditor/Graph.cpp +++ b/source/MaterialXGraphEditor/Graph.cpp @@ -126,11 +126,11 @@ Graph::Graph(const std::string& materialFilename, _addNewNode(false), _ctrlClick(false), _isCut(false), - _smartFilter(true), _autoLayout(false), _frameCount(INT_MIN), _fontScale(1.0f), - _saveNodePositions(true) + _saveNodePositions(true), + _smartFilter(true) { loadStandardLibraries(); setPinColor();