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

Method createNode

source/MaterialXGenShader/ShaderGraph.cpp:707–724  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

705}
706
707ShaderNode* ShaderGraph::createNode(const string& name, const string& uniqueId, ConstNodeDefPtr nodeDef, GenContext& context)
708{
709 MX_TRACE_FUNCTION(Tracing::Category::ShaderGen);
710 MX_TRACE_SCOPE(Tracing::Category::ShaderGen, name.c_str());
711
712 if (!nodeDef)
713 {
714 throw ExceptionShaderGenError("Could not find a nodedef for node '" + name + "'");
715 }
716
717 // Create this node in the graph.
718 ShaderNodePtr newNode = ShaderNode::create(this, name, *nodeDef, context);
719 newNode->_uniqueId = uniqueId;
720 _nodeMap[uniqueId] = newNode;
721 _nodeOrder.push_back(newNode.get());
722
723 return newNode.get();
724}
725
726ShaderNode* ShaderGraph::createNode(ConstNodePtr node, GenContext& context)
727{

Callers 3

addColorTransformNodeMethod · 0.45
addUnitTransformNodeMethod · 0.45
createMethod · 0.45

Calls 14

getInputSocketFunction · 0.85
c_strMethod · 0.80
push_backMethod · 0.80
getNamePathMethod · 0.80
makeConnectionMethod · 0.80
getActiveInputsMethod · 0.80
getDefaultGeomPropMethod · 0.80
createFunction · 0.70
getMethod · 0.45
getNodeDefMethod · 0.45
getNameMethod · 0.45
initializeMethod · 0.45

Tested by

no test coverage detected