MaterialX 1.39.1
Loading...
Searching...
No Matches
Material.h File Reference

Material node helper functions. More...

Go to the source code of this file.

Functions

MATERIALX_NAMESPACE_BEGIN MX_CORE_API vector< NodePtrgetShaderNodes (NodePtr materialNode, const string &nodeType=SURFACE_SHADER_TYPE_STRING, const string &target=EMPTY_STRING)
 Return a vector of all shader nodes connected to the given material node's inputs, filtered by the given shader type and target. More...
 
MX_CORE_API vector< OutputPtrgetConnectedOutputs (NodePtr node)
 Return a vector of all outputs connected to the given node's inputs.
 

Detailed Description

Material node helper functions.

Function Documentation

◆ getShaderNodes()

MATERIALX_NAMESPACE_BEGIN MX_CORE_API vector< NodePtr > getShaderNodes ( NodePtr  materialNode,
const string &  nodeType = SURFACE_SHADER_TYPE_STRING,
const string &  target = EMPTY_STRING 
)

Return a vector of all shader nodes connected to the given material node's inputs, filtered by the given shader type and target.

By default, all surface shader nodes are returned.

Parameters
materialNodeThe node to examine.
nodeTypeTHe shader node type to return. Defaults to the surface shader type.
targetAn optional target name, which will be used to filter the returned nodes.