unreal.InterchangeShaderNode

class unreal.InterchangeShaderNode(outer: Object | None = None, name: Name | str = 'None')

Bases: InterchangeBaseNode

A shader node is a named set of inputs and outputs. It can be connected to other shader nodes and finally to a shader graph input.

C++ Source:

  • Plugin: Interchange

  • Module: InterchangeNodes

  • File: InterchangeShaderGraphNode.h

add_float_input(input_name, attribute_value, is_a_parameter=False) bool

Set the Float Attribute on the Shader Node. If bIsAParameter is set to true, it would be treated as a ScalarParameter when the Material Pipeline creates the materials. Otherwise it would be a constant expression in the shader graph. Note: It is assumed that the input name would be the parameter name when bIsAParameter is true.

Parameters:
  • input_name (str) –

  • attribute_value (float) –

  • is_a_parameter (bool) –

Return type:

bool

add_linear_color_input(input_name, attribute_value, is_a_parameter=False) bool

Set the Linear Color Attribute on the Shader Node. If bIsAParameter is set to true, it would be treated as a VectorParameter when the Material Pipeline creates the materials. Otherwise it would be a constant 3 vector expression in the shader graph. Note: It is assumed that the input name would be the parameter name when bIsAParameter is true.

Parameters:
Return type:

bool

add_string_input(input_name, attribute_value, is_a_parameter=False) bool

Set the String Attribute on the Shader Node. If bIsAParameter is set to true, it would be treated as a overridable Texture or else it should be treated as a LUT Texture. Note: It is assumed that the input name would be the parameter name when bIsAParameter is true.

Parameters:
  • input_name (str) –

  • attribute_value (str) –

  • is_a_parameter (bool) –

Return type:

bool

get_custom_shader_type() str or None

Get Custom Shader Type

Returns:

attribute_value (str):

Return type:

str or None

set_custom_shader_type(attribute_value) bool

Sets which type of shader this nodes represents. Can be arbitrary or one of the predefined shader types. The material pipeline handling the shader node should be aware of the shader type that is being set here.

Parameters:

attribute_value (str) –

Return type:

bool