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

Function getNodeDefInput

source/MaterialXGenShader/Util.cpp:451–465  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

449}
450
451InputPtr getNodeDefInput(InputPtr nodeInput, const string& target)
452{
453 ElementPtr parent = nodeInput ? nodeInput->getParent() : nullptr;
454 NodePtr node = parent ? parent->asA<Node>() : nullptr;
455 if (node)
456 {
457 NodeDefPtr nodeDef = node->getNodeDef(target);
458 if (nodeDef)
459 {
460 return nodeDef->getActiveInput(nodeInput->getName());
461 }
462 }
463
464 return nullptr;
465}
466
467namespace
468{

Callers 1

getUIPropertiesFunction · 0.85

Calls 3

getActiveInputMethod · 0.80
getNodeDefMethod · 0.45
getNameMethod · 0.45

Tested by

no test coverage detected