Table of Contents

Class VisualShaderNode

Base class for VisualShader nodes. Not related to scene nodes.

Inheritance
VisualShaderNode
Derived

Remarks

Visual shader graphs consist of various nodes. Each node in the graph is a separate object and they are represented as a rectangular boxes with title and a set of properties. Each node also has connection ports that allow to connect it to another nodes and control the flow of the shader.

See Also

Properties

linked_parent_graph_frame

Represents the index of the frame this node is linked to. If set to -1 the node is not linked to any frame.

var linked_parent_graph_frame : int = -1

Property Value

int

Remarks

  • void set_frame(int value)
  • int get_frame

output_port_for_preview

Sets the output port index which will be showed for preview. If set to -1 no port will be open for preview.

var output_port_for_preview : int = -1

Property Value

int

Remarks

  • void set_output_port_for_preview(int value)
  • int get_output_port_for_preview

Methods

clear_default_input_values

Clears the default input ports value.

void clear_default_input_values

get_default_input_port(int)

Qualifiers: const

Returns the input port which should be connected by default when this node is created as a result of dragging a connection from an existing node to the empty space on the graph.

int get_default_input_port(int type)

Parameters

type int

get_default_input_values

Qualifiers: const

Returns an Array containing default values for all of the input ports of the node in the form [index0, value0, index1, value1, ...].

Array get_default_input_values

get_input_port_default_value(int)

Qualifiers: const

Returns the default value of the input port.

Variant get_input_port_default_value(int port)

Parameters

port int

remove_input_port_default_value(int)

Removes the default value of the input port.

void remove_input_port_default_value(int port)

Parameters

port int

set_default_input_values(Array)

Sets the default input ports values using an Array of the form [index0, value0, index1, value1, ...]. For example: [0, Vector3(0, 0, 0), 1, Vector3(0, 0, 0)].

void set_default_input_values(Array values)

Parameters

values Array

set_input_port_default_value(int, Variant, Variant)

Sets the default value for the selected input port.

void set_input_port_default_value(int port, Variant value, Variant prev_value)

Parameters

port int
value Variant
prev_value Variant