MaterialX 1.38.9
Loading...
Searching...
No Matches
ShaderInput Class Reference

An input on a ShaderNode. More...

#include <ShaderNode.h>

Inheritance diagram for ShaderInput:
ShaderPort

Public Member Functions

 ShaderInput (ShaderNode *node, const TypeDesc *type, const string &name)
 
ShaderOutputgetConnection ()
 Return a connection to an upstream node output, or nullptr if not connected.
 
const ShaderOutputgetConnection () const
 Return a connection to an upstream node output, or nullptr if not connected.
 
void makeConnection (ShaderOutput *src)
 Make a connection from the given source output to this input.
 
void breakConnection ()
 Break the connection to this input.
 
void setChannels (const string &channels)
 Set optional channels value.
 
const string & getChannels () const
 Get optional channels value.
 
ShaderNodegetConnectedSibling () const
 Return the sibling node connected upstream, or nullptr if there is no sibling upstream.
 
- Public Member Functions inherited from ShaderPort
 ShaderPort (ShaderNode *node, const TypeDesc *type, const string &name, ValuePtr value=nullptr)
 Constructor.
 
ShaderPortPtr getSelf ()
 Return a shared pointer instance of this object.
 
ShaderNodegetNode ()
 Return the node this port belongs to.
 
const ShaderNodegetNode () const
 Return the node this port belongs to.
 
void setType (const TypeDesc *type)
 Set the data type for this port.
 
const TypeDescgetType () const
 Return the data type for this port.
 
void setName (const string &name)
 Set the name of this port.
 
const string & getName () const
 Return the name of this port.
 
string getFullName () const
 Return the name of this port.
 
void setVariable (const string &name)
 Set the variable name of this port.
 
const string & getVariable () const
 Return the variable name of this port.
 
void setSemantic (const string &semantic)
 Set the variable semantic of this port.
 
const string & getSemantic () const
 Return the variable semantic of this port.
 
void setValue (ValuePtr value)
 Set a value on this port.
 
ValuePtr getValue () const
 Return the value set on this port.
 
string getValueString () const
 Return the value set on this port as a string, or an empty string if there is no value.
 
void setColorSpace (const string &colorspace)
 Set a source color space for the value on this port.
 
const string & getColorSpace () const
 Return the source color space for the value on this port.
 
void setUnit (const string &unit)
 Set a unit type for the value on this port.
 
const string & getUnit () const
 Return the unit type for the value on this port.
 
void setGeomProp (const string &geomprop)
 Set geomprop name if the input has a default geomprop to be assigned when it is unconnected.
 
const string & getGeomProp () const
 Get geomprop name.
 
void setPath (const string &path)
 Set the path to this port.
 
const string & getPath () const
 Return the path to this port.
 
void setFlags (uint32_t flags)
 Set flags on this port.
 
uint32_t getFlags () const
 Return flags set on this port.
 
void setFlag (uint32_t flag, bool value)
 Set the on|off state of a given flag.
 
bool getFlag (uint32_t flag) const
 Return the on|off state of a given flag.
 
void setUniform ()
 Set the uniform flag this port to true.
 
bool isUniform () const
 Return the uniform flag on this port.
 
void setEmitted ()
 Set the emitted state on this port to true.
 
bool isEmitted () const
 Return the emitted state of this port.
 
void setBindInput ()
 Set the bind input state on this port to true.
 
bool isBindInput () const
 Return the emitted state of this port.
 
void setMetadata (ShaderMetadataVecPtr metadata)
 Set the metadata vector.
 
ShaderMetadataVecPtr getMetadata ()
 Get the metadata vector.
 
const ShaderMetadataVecPtr & getMetadata () const
 Get the metadata vector.
 

Protected Attributes

ShaderOutput_connection
 
string _channels
 
- Protected Attributes inherited from ShaderPort
ShaderNode_node
 
const TypeDesc_type
 
string _name
 
string _path
 
string _semantic
 
string _variable
 
ValuePtr _value
 
string _unit
 
string _colorspace
 
string _geomprop
 
ShaderMetadataVecPtr _metadata
 
uint32_t _flags
 

Friends

class ShaderOutput
 

Detailed Description

An input on a ShaderNode.


The documentation for this class was generated from the following files: