File tree Expand file tree Collapse file tree
source/MaterialXGraphEditor Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2487,6 +2487,10 @@ void Graph::AddLink(ed::PinId inputPinId, ed::PinId outputPinId)
24872487 {
24882488 pin->_input ->setConnectedOutput (_graphNodes[upNode]->getOutput ());
24892489 }
2490+ else if (_graphNodes[upNode]->getInput () != nullptr )
2491+ {
2492+ pin->_input ->setInterfaceName (_graphNodes[upNode]->getName ());
2493+ }
24902494 else
24912495 {
24922496 // node graph
@@ -3405,6 +3409,7 @@ void Graph::showHelp() const
34053409void Graph::addNodePopup (bool cursor)
34063410{
34073411 bool open_AddPopup = ImGui::IsWindowFocused (ImGuiFocusedFlags_RootAndChildWindows) && ImGui::IsKeyReleased (ImGuiKey_Tab);
3412+ static char input[32 ]{ " " };
34083413 if (open_AddPopup)
34093414 {
34103415 cursor = true ;
@@ -3414,7 +3419,6 @@ void Graph::addNodePopup(bool cursor)
34143419 {
34153420 ImGui::Text (" Add Node" );
34163421 ImGui::Separator ();
3417- static char input[32 ]{ " " };
34183422 if (cursor)
34193423 {
34203424 ImGui::SetKeyboardFocusHere ();
@@ -3433,6 +3437,9 @@ void Graph::addNodePopup(bool cursor)
34333437 {
34343438 std::string str (it->second [i][0 ]);
34353439 std::string nodeName = it->second [i][0 ];
3440+ // allow spaces to be used to search for node names
3441+ std::replace (subs.begin (), subs.end (), ' ' , ' _' );
3442+
34363443 if (str.find (subs) != std::string::npos)
34373444 {
34383445 if (ImGui::MenuItem (getNodeDefId (nodeName).c_str ()) || (ImGui::IsItemFocused () && ImGui::IsKeyPressedMap (ImGuiKey_Enter)))
You can’t perform that action at this time.
0 commit comments