HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Material.h
Go to the documentation of this file.
1 //
2 // TM & (c) 2017 Lucasfilm Entertainment Company Ltd. and Lucasfilm Ltd.
3 // All rights reserved. See LICENSE.txt for license.
4 //
5 
6 #ifndef MATERIALX_MATERIAL_H
7 #define MATERIALX_MATERIAL_H
8 
9 /// @file
10 /// Material node helper functions
11 
12 #include <MaterialXCore/Export.h>
13 
14 #include <MaterialXCore/Node.h>
15 
17 
18 /// Return a vector of all shader nodes connected to the given material node's inputs,
19 /// filtered by the given shader type and target. By default, all surface shader nodes
20 /// are returned.
21 /// @param materialNode The node to examine.
22 /// @param nodeType THe shader node type to return. Defaults to the surface shader type.
23 /// @param target An optional target name, which will be used to filter the returned nodes.
24 MX_CORE_API vector<NodePtr> getShaderNodes(NodePtr materialNode,
25  const string& nodeType = SURFACE_SHADER_TYPE_STRING,
26  const string& target = EMPTY_STRING);
27 
28 /// Return a vector of all outputs connected to the given node's inputs.
29 MX_CORE_API vector<OutputPtr> getConnectedOutputs(NodePtr node);
30 
32 
33 #endif
#define MATERIALX_NAMESPACE_BEGIN
Definition: Generated.h:23
MATERIALX_NAMESPACE_BEGIN MX_CORE_API const string EMPTY_STRING
#define MX_CORE_API
Definition: Export.h:18
GLenum target
Definition: glcorearb.h:1667
MATERIALX_NAMESPACE_BEGIN MX_CORE_API vector< NodePtr > getShaderNodes(NodePtr materialNode, const string &nodeType=SURFACE_SHADER_TYPE_STRING, const string &target=EMPTY_STRING)
MX_CORE_API const string SURFACE_SHADER_TYPE_STRING
#define MATERIALX_NAMESPACE_END
Definition: Generated.h:24
MX_CORE_API vector< OutputPtr > getConnectedOutputs(NodePtr node)
Return a vector of all outputs connected to the given node's inputs.
shared_ptr< Node > NodePtr
A shared pointer to a Node.
Definition: Node.h:24