Skip to content

Commit

Permalink
Minor formatting updates
Browse files Browse the repository at this point in the history
Signed-off-by: Jonathan Stone <jstone@lucasfilm.com>
  • Loading branch information
jstone-lucasfilm committed Oct 13, 2023
1 parent 38cde49 commit 5376225
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions source/MaterialXGraphEditor/Graph.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3716,20 +3716,25 @@ bool Graph::isPinHovered() {
return currentPin != nullPin;
}

void Graph::addPinPopup() {
void Graph::addPinPopup()
{
// Add a floating popup to pin when hovered
if (isPinHovered()) {
if (isPinHovered())
{
ed::Suspend();
UiPinPtr pin = getPin(ed::GetHoveredPin());
std::string connected = "";
std::string value = "";
if (pin->_connected) {
if (pin->_connected)
{
connected = "\nConnected to";
for (UiPinPtr connectedPins : pin->getConnections()) {
for (UiPinPtr connectedPins : pin->getConnections())
{
connected = connected + " " + connectedPins->_name + ",";
}
}
else if(pin->_input != nullptr) {
else if(pin->_input != nullptr)
{
value = "\nValue: " + pin->_input->getValueString();
}
std::string const message{ "Name: " + pin->_name + "\nType: " + pin->_type + value + connected};
Expand Down

0 comments on commit 5376225

Please sign in to comment.