Skip to content

Commit

Permalink
added another connection so input nodes have a link back to output
Browse files Browse the repository at this point in the history
  • Loading branch information
ethomare-ilm committed Oct 13, 2023
1 parent 271f9e6 commit 38cde49
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions source/MaterialXGraphEditor/Graph.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2219,6 +2219,7 @@ std::vector<int> Graph::createNodes(bool nodegraph)
}

upUiNode->outputPins[pinIndex]->addConnection(pin);
pin->addConnection(upUiNode->outputPins[pinIndex]);
}
pin->setConnected(true);
}
Expand Down Expand Up @@ -2284,6 +2285,7 @@ std::vector<int> Graph::createNodes(bool nodegraph)
}
}
upUiNode->outputPins[pinIndex]->addConnection(pin);
pin->addConnection(upUiNode->outputPins[pinIndex]);
}
pin->setConnected(true);
}
Expand Down Expand Up @@ -2354,6 +2356,7 @@ std::vector<int> Graph::createNodes(bool nodegraph)
}
}
upUiNode->outputPins[pinIndex]->addConnection(pin);
pin->addConnection(upUiNode->outputPins[pinIndex]);
}
}

Expand Down Expand Up @@ -3722,13 +3725,8 @@ void Graph::addPinPopup() {
std::string value = "";
if (pin->_connected) {
connected = "\nConnected to";
if (pin->_name == "out") {
for (UiPinPtr connectedPins : pin->getConnections()) {
connected = connected + " " + connectedPins->_name + ",";
}
}
else {
connected = connected + " out";
for (UiPinPtr connectedPins : pin->getConnections()) {
connected = connected + " " + connectedPins->_name + ",";
}
}
else if(pin->_input != nullptr) {
Expand Down

0 comments on commit 38cde49

Please sign in to comment.