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

Method setConnectedOutput

source/MaterialXCore/Interface.cpp:54–79  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

52}
53
54void PortElement::setConnectedOutput(ConstOutputPtr output)
55{
56 if (output)
57 {
58 setOutputString(output->getName());
59 ConstElementPtr parent = output->getParent();
60 if (parent->isA<NodeGraph>())
61 {
62 setNodeGraphString(parent->getName());
63 removeAttribute(NODE_NAME_ATTRIBUTE);
64 }
65 else if (parent->isA<Node>())
66 {
67 setNodeName(parent->getName());
68 removeAttribute(NODE_GRAPH_ATTRIBUTE);
69 }
70
71 removeAttribute(VALUE_ATTRIBUTE);
72 }
73 else
74 {
75 removeAttribute(OUTPUT_ATTRIBUTE);
76 removeAttribute(NODE_GRAPH_ATTRIBUTE);
77 removeAttribute(NODE_NAME_ATTRIBUTE);
78 }
79}
80
81OutputPtr PortElement::getConnectedOutput() const
82{

Callers 9

test_BuildDocumentMethod · 0.80
buildDocumentFunction · 0.80
copyInputsMethod · 0.80
addLinkMethod · 0.80
deleteLinkInfoMethod · 0.80
deleteNodeMethod · 0.80
Document.cppFile · 0.80
document.spec.jsFile · 0.80

Calls 7

setOutputStringFunction · 0.85
setNodeGraphStringFunction · 0.85
addInputFunction · 0.85
getInputFunction · 0.70
getNameMethod · 0.45
setTypeMethod · 0.45
getTypeMethod · 0.45

Tested by 1

test_BuildDocumentMethod · 0.64