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.

VisualShaderNodeFrame

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

被繼承: VisualShaderNodeComment

能夠附加其他視覺化著色器節點的框架,方便組織節點。

說明

一種矩形框架,能夠將視覺化著色器節點進行分組,方便組織。

拖動框架時,附加到框架的節點會跟隨框架移動;框架會自動調整大小,包圍所有附加的節點。

可以自訂標題、描述以及顏色。

屬性

PackedInt32Array

attached_nodes

PackedInt32Array()

bool

autoshrink

true

Color

tint_color

Color(0.3, 0.3, 0.3, 0.75)

bool

tint_color_enabled

false

String

title

"Title"

方法

void

add_attached_node(node: int)

void

remove_attached_node(node: int)


屬性說明

PackedInt32Array attached_nodes = PackedInt32Array() 🔗

附加到框的節點清單。

Note: The returned array is copied and any changes to it will not update the original property value. See PackedInt32Array for more details.


bool autoshrink = true 🔗

  • void set_autoshrink_enabled(value: bool)

  • bool is_autoshrink_enabled()

如果為 true,該框將自動調整大小以包含所有附加的節點。


Color tint_color = Color(0.3, 0.3, 0.3, 0.75) 🔗

  • void set_tint_color(value: Color)

  • Color get_tint_color()

框架在 tint_color_enabled 為 true 時的顏色。


bool tint_color_enabled = false 🔗

  • void set_tint_color_enabled(value: bool)

  • bool is_tint_color_enabled()

如果為 true,則該框將使用 tint_color 中指定的顏色進行著色。


String title = "Title" 🔗

節點的標題。


方法說明

void add_attached_node(node: int) 🔗

將節點新增到框架附加節點清單中。不應該直接呼叫,請改用 VisualShader.attach_node_to_frame()。


void remove_attached_node(node: int) 🔗

將節點從框架附加節點清單中移除。不應該直接呼叫,請改用 VisualShader.detach_node_from_frame()。