VisualShaderNodeGroupBase

继承: VisualShaderNodeResizableBase < VisualShaderNode < Resource < RefCounted < Object

派生: VisualShaderNodeExpression

Base class for a family of nodes with variable number of input and output ports within the visual shader graph.

描述

Currently, has no direct usage, use the derived classes instead.

方法

voidadd_input_port ( id: int, type: int, name: String )
voidadd_output_port ( id: int, type: int, name: String )
voidclear_input_ports ( )
voidclear_output_ports ( )
intget_free_input_port_id ( ) const1
intget_free_output_port_id ( ) const1
intget_input_port_count ( ) const1
Stringget_inputs ( ) const1
intget_output_port_count ( ) const1
Stringget_outputs ( ) const1
boolhas_input_port ( id: int ) const1
boolhas_output_port ( id: int ) const1
boolis_valid_port_name ( name: String ) const1
voidremove_input_port ( id: int )
voidremove_output_port ( id: int )
voidset_input_port_name ( id: int, name: String )
voidset_input_port_type ( id: int, type: int )
voidset_inputs ( inputs: String )
voidset_output_port_name ( id: int, name: String )
voidset_output_port_type ( id: int, type: int )
voidset_outputs ( outputs: String )

方法说明

void add_input_port ( id: int, type: int, name: String )

Adds an input port with the specified type (see PortType) and name.


void add_output_port ( id: int, type: int, name: String )

Adds an output port with the specified type (see PortType) and name.


void clear_input_ports ( )

Removes all previously specified input ports.


void clear_output_ports ( )

Removes all previously specified output ports.


int get_free_input_port_id ( ) const1

Returns a free input port ID which can be used in add_input_port.


int get_free_output_port_id ( ) const1

Returns a free output port ID which can be used in add_output_port.


int get_input_port_count ( ) const1

Returns the number of input ports in use. Alternative for get_free_input_port_id.


String get_inputs ( ) const1

Returns a String description of the input ports as a colon-separated list using the format id,type,name; (see add_input_port).


int get_output_port_count ( ) const1

Returns the number of output ports in use. Alternative for get_free_output_port_id.


String get_outputs ( ) const1

Returns a String description of the output ports as a colon-separated list using the format id,type,name; (see add_output_port).


bool has_input_port ( id: int ) const1

Returns true if the specified input port exists.


bool has_output_port ( id: int ) const1

Returns true if the specified output port exists.


bool is_valid_port_name ( name: String ) const1

Returns true if the specified port name does not override an existed port name and is valid within the shader.


void remove_input_port ( id: int )

Removes the specified input port.


void remove_output_port ( id: int )

Removes the specified output port.


void set_input_port_name ( id: int, name: String )

Renames the specified input port.


void set_input_port_type ( id: int, type: int )

Sets the specified input port's type (see PortType).


void set_inputs ( inputs: String )

Defines all input ports using a String formatted as a colon-separated list: id,type,name; (see add_input_port).


void set_output_port_name ( id: int, name: String )

Renames the specified output port.


void set_output_port_type ( id: int, type: int )

Sets the specified output port's type (see PortType).


void set_outputs ( outputs: String )

Defines all output ports using a String formatted as a colon-separated list: id,type,name; (see add_output_port).

2

本方法通常需要用户覆盖才能生效。

1

本方法无副作用,不会修改该实例的任何成员变量。

3

本方法除了能接受在此处描述的参数外,还能够继续接受任意数量的参数。

4

本方法用于构造某个类型。

5

调用本方法无需实例,可直接使用类名进行调用。

6

本方法描述的是使用本类型作为左操作数的有效运算符。

7

这个值是由下列位标志构成位掩码的整数。

8

无返回值。