MCPcopy Create free account
hub / github.com/AcademySoftwareFoundation/MaterialX / addPinPopup

Method addPinPopup

source/MaterialXGraphEditor/Graph.cpp:3935–3961  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3933}
3934
3935void Graph::addPinPopup()
3936{
3937 // Add a floating popup to pin when hovered
3938 if (isPinHovered())
3939 {
3940 ed::Suspend();
3941 UiPinPtr pin = getPin(ed::GetHoveredPin());
3942 std::string connected;
3943 std::string value;
3944 if (pin->getConnected())
3945 {
3946 mx::StringVec connectedNames;
3947 for (UiPinPtr connectedPin : pin->getConnections())
3948 {
3949 connectedNames.push_back(connectedPin->getName());
3950 }
3951 connected = "\nConnected to " + mx::joinStrings(connectedNames, ", ");
3952 }
3953 else if (pin->getInput())
3954 {
3955 value = "\nValue: " + pin->getInput()->getValueString();
3956 }
3957 const std::string message("Name: " + pin->getName() + "\nType: " + pin->getType() + value + connected);
3958 ImGui::SetTooltip("%s", message.c_str());
3959 ed::Resume();
3960 }
3961}
3962
3963void Graph::readOnlyPopup()
3964{

Callers

nothing calls this directly

Calls 8

joinStringsFunction · 0.85
getConnectedMethod · 0.80
push_backMethod · 0.80
c_strMethod · 0.80
getNameMethod · 0.45
getInputMethod · 0.45
getValueStringMethod · 0.45
getTypeMethod · 0.45

Tested by

no test coverage detected