unreal.InterchangeShaderPortsAPI
¶
- class unreal.InterchangeShaderPortsAPI(outer: Optional[Object] = None, name: Union[Name, str] = 'None')¶
Bases:
Object
The Shader Ports API manages a set of inputs and outputs attributes. This API can be used over any InterchangeBaseNode that wants to support shader ports as attributes.
C++ Source:
Plugin: Interchange
Module: InterchangeNodes
File: InterchangeShaderGraphNode.h
- classmethod connect_default_ouput_to_input(interchange_node, input_name, expression_uid) bool ¶
Adds an input connection attribute.
- Parameters:
interchange_node (InterchangeBaseNode) – The Node to create the input on.
input_name (str) – The name to give to the input.
expression_uid (str) – The unique id of the node to connect to the input.
- Returns:
true if the input connection was successfully added to the node.
- Return type:
- classmethod connect_ouput_to_input(interchange_node, input_name, expression_uid, output_name) bool ¶
Adds an input connection attribute.
- Parameters:
interchange_node (InterchangeBaseNode) – The Node to create the input on.
input_name (str) – The name to give to the input.
expression_uid (str) – The unique id of the node to connect to the input.
output_name (str) – The name of the ouput from ExpressionUid to connect to the input.
- Returns:
true if the input connection was succesfully added to the node.
- Return type:
- classmethod gather_inputs(interchange_node) Array[str] ¶
Retrieves the names of all the inputs for a given node.
- Parameters:
interchange_node (InterchangeBaseNode) –
- Returns:
out_input_names (Array[str]):
- Return type:
- classmethod get_input_connection(interchange_node, input_name) (out_expression_uid=str, output_name=str) or None ¶
Retrieves the node unique id and the ouputname connected to a given input, if any.
- Parameters:
interchange_node (InterchangeBaseNode) –
input_name (str) –
- Returns:
out_expression_uid (str):
output_name (str):
- Return type:
tuple or None
- classmethod has_input(interchange_node, input_name) bool ¶
Checks if a particular input exists on a given node.
- Parameters:
interchange_node (InterchangeBaseNode) –
input_name (Name) –
- Return type:
- classmethod is_an_input(attribute_key) bool ¶
Returns true if the attribute key is associated with an input (starts with “Inputs:”).
- classmethod make_input_connection_key(input_name) Name ¶
Makes an attribute key to represent a node being connected to an input (ie: Inputs:InputName:Connect).