Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion source/MaterialXGraphEditor/Graph.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2487,6 +2487,10 @@ void Graph::AddLink(ed::PinId inputPinId, ed::PinId outputPinId)
{
pin->_input->setConnectedOutput(_graphNodes[upNode]->getOutput());
}
else if (_graphNodes[upNode]->getInput() != nullptr)
{
pin->_input->setInterfaceName(_graphNodes[upNode]->getName());
}
else
{
// node graph
Expand Down Expand Up @@ -3405,6 +3409,7 @@ void Graph::showHelp() const
void Graph::addNodePopup(bool cursor)
{
bool open_AddPopup = ImGui::IsWindowFocused(ImGuiFocusedFlags_RootAndChildWindows) && ImGui::IsKeyReleased(ImGuiKey_Tab);
static char input[32]{ "" };
if (open_AddPopup)
{
cursor = true;
Expand All @@ -3414,7 +3419,6 @@ void Graph::addNodePopup(bool cursor)
{
ImGui::Text("Add Node");
ImGui::Separator();
static char input[32]{ "" };
if (cursor)
{
ImGui::SetKeyboardFocusHere();
Expand All @@ -3433,6 +3437,9 @@ void Graph::addNodePopup(bool cursor)
{
std::string str(it->second[i][0]);
std::string nodeName = it->second[i][0];
//allow spaces to be used to search for node names
std::replace(subs.begin(), subs.end(), ' ', '_');

if (str.find(subs) != std::string::npos)
{
if (ImGui::MenuItem(getNodeDefId(nodeName).c_str()) || (ImGui::IsItemFocused() && ImGui::IsKeyPressedMap(ImGuiKey_Enter)))
Expand Down