Attention: Here be dragons
This is the latest
(unstable) version of this documentation, which may document features
not available in or compatible with released stable versions of Godot.
Checking the stable version of the documentation...
VisualShaderNodeGroupBase
继承: VisualShaderNodeResizableBase < VisualShaderNode < Resource < RefCounted < Object
派生: VisualShaderNodeExpression
可视化着色器图中,具有可变数量的输入和输出端口的系列节点的基类。
描述
目前,没有直接使用,而用派生类代替。
方法
void |
add_input_port(id: int, type: int, name: String) |
void |
add_output_port(id: int, type: int, name: String) |
void |
|
void |
|
get_free_input_port_id() const |
|
get_free_output_port_id() const |
|
get_input_port_count() const |
|
get_inputs() const |
|
get_output_port_count() const |
|
get_outputs() const |
|
has_input_port(id: int) const |
|
has_output_port(id: int) const |
|
is_valid_port_name(name: String) const |
|
void |
remove_input_port(id: int) |
void |
remove_output_port(id: int) |
void |
set_input_port_name(id: int, name: String) |
void |
set_input_port_type(id: int, type: int) |
void |
set_inputs(inputs: String) |
void |
set_output_port_name(id: int, name: String) |
void |
set_output_port_type(id: int, type: int) |
void |
set_outputs(outputs: String) |
方法说明
void add_input_port(id: int, type: int, name: String) 🔗
添加具有指定类型 type
和名称 name
的输入端口(见 PortType)。
void add_output_port(id: int, type: int, name: String) 🔗
添加具有指定类型 type
和名称 name
的输出端口(见 PortType)。
void clear_input_ports() 🔗
移除所有先前指定的输入端口。
void clear_output_ports() 🔗
移除所有先前指定的输出端口。
int get_free_input_port_id() const 🔗
返回一个空闲的输入端口 ID,可以在 add_input_port() 中使用。
int get_free_output_port_id() const 🔗
返回一个空闲的输出端口 ID,可以在 add_output_port() 中使用。
int get_input_port_count() const 🔗
返回正在使用的输入端口的数量。替代get_free_input_port_id()。
返回输入端口的String描述,是一个用冒号分隔的列表,格式为id,type,name;
,参阅add_input_port()。
int get_output_port_count() const 🔗
返回正在使用的输出端口的数量。替代get_free_output_port_id()。
返回输出端口的String描述,作为一个用冒号分隔的列表,格式为id,type,name;
,参阅add_output_port()。
bool has_input_port(id: int) const 🔗
如果指定的输入端口存在,返回 true
。
bool has_output_port(id: int) const 🔗
如果指定的输出端口存在,返回 true
。
bool is_valid_port_name(name: String) const 🔗
如果指定的端口名称没有覆盖现有的端口名称,并且在着色器中有效,则返回 true
。
void remove_input_port(id: int) 🔗
移除指定的输入端口。
void remove_output_port(id: int) 🔗
移除指定的输出端口。
void set_input_port_name(id: int, name: String) 🔗
重命名指定的输入端口。
void set_input_port_type(id: int, type: int) 🔗
设置指定的输入端口的类型,参阅PortType。
void set_inputs(inputs: String) 🔗
使用一个String格式的以冒号分隔的列表来定义所有输入端口:id,type,name;
,参阅add_input_port()。
void set_output_port_name(id: int, name: String) 🔗
重命名指定的输出端口。
void set_output_port_type(id: int, type: int) 🔗
设置指定输出端口的类型,参阅PortType。
void set_outputs(outputs: String) 🔗
使用一个String格式的以冒号分隔的列表来定义所有输出端口: id,type,name;
,参阅add_output_port()。