Debian Codegraph @

doc/classes/VisualShaderNode.xml

raw symbols SCIP
1 <?xml version="1.0" encoding="UTF-8" ?>
2 <class name="VisualShaderNode" inherits="Resource" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
3 <brief_description>
4 Base class for [VisualShader] nodes. Not related to scene nodes.
5 </brief_description>
6 <description>
7 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.
8 </description>
9 <tutorials>
10 <link title="Using VisualShaders">$DOCS_URL/tutorials/shaders/visual_shaders.html</link>
11 </tutorials>
12 <methods>
13 <method name="clear_default_input_values">
14 <return type="void" />
15 <description>
16 Clears the default input ports value.
17 </description>
18 </method>
19 <method name="get_default_input_port" qualifiers="const">
20 <return type="int" />
21 <param index="0" name="type" type="int" enum="VisualShaderNode.PortType" />
22 <description>
23 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.
24 </description>
25 </method>
26 <method name="get_default_input_values" qualifiers="const">
27 <return type="Array" />
28 <description>
29 Returns an [Array] containing default values for all of the input ports of the node in the form [code][index0, value0, index1, value1, ...][/code].
30 </description>
31 </method>
32 <method name="get_input_port_default_value" qualifiers="const">
33 <return type="Variant" />
34 <param index="0" name="port" type="int" />
35 <description>
36 Returns the default value of the input [param port].
37 </description>
38 </method>
39 <method name="remove_input_port_default_value">
40 <return type="void" />
41 <param index="0" name="port" type="int" />
42 <description>
43 Removes the default value of the input [param port].
44 </description>
45 </method>
46 <method name="set_default_input_values">
47 <return type="void" />
48 <param index="0" name="values" type="Array" />
49 <description>
50 Sets the default input ports values using an [Array] of the form [code][index0, value0, index1, value1, ...][/code]. For example: [code][0, Vector3(0, 0, 0), 1, Vector3(0, 0, 0)][/code].
51 </description>
52 </method>
53 <method name="set_input_port_default_value">
54 <return type="void" />
55 <param index="0" name="port" type="int" />
56 <param index="1" name="value" type="Variant" />
57 <param index="2" name="prev_value" type="Variant" default="null" />
58 <description>
59 Sets the default [param value] for the selected input [param port].
60 </description>
61 </method>
62 </methods>
63 <members>
64 <member name="linked_parent_graph_frame" type="int" setter="set_frame" getter="get_frame" default="-1">
65 Represents the index of the frame this node is linked to. If set to [code]-1[/code] the node is not linked to any frame.
66 </member>
67 <member name="output_port_for_preview" type="int" setter="set_output_port_for_preview" getter="get_output_port_for_preview" default="-1">
68 Sets the output port index which will be showed for preview. If set to [code]-1[/code] no port will be open for preview.
69 </member>
70 </members>
71 <constants>
72 <constant name="PORT_TYPE_SCALAR" value="0" enum="PortType">
73 Floating-point scalar. Translated to [code skip-lint]float[/code] type in shader code.
74 </constant>
75 <constant name="PORT_TYPE_SCALAR_INT" value="1" enum="PortType">
76 Integer scalar. Translated to [code skip-lint]int[/code] type in shader code.
77 </constant>
78 <constant name="PORT_TYPE_SCALAR_UINT" value="2" enum="PortType">
79 Unsigned integer scalar. Translated to [code skip-lint]uint[/code] type in shader code.
80 </constant>
81 <constant name="PORT_TYPE_VECTOR_2D" value="3" enum="PortType">
82 2D vector of floating-point values. Translated to [code skip-lint]vec2[/code] type in shader code.
83 </constant>
84 <constant name="PORT_TYPE_VECTOR_3D" value="4" enum="PortType">
85 3D vector of floating-point values. Translated to [code skip-lint]vec3[/code] type in shader code.
86 </constant>
87 <constant name="PORT_TYPE_VECTOR_4D" value="5" enum="PortType">
88 4D vector of floating-point values. Translated to [code skip-lint]vec4[/code] type in shader code.
89 </constant>
90 <constant name="PORT_TYPE_BOOLEAN" value="6" enum="PortType">
91 Boolean type. Translated to [code skip-lint]bool[/code] type in shader code.
92 </constant>
93 <constant name="PORT_TYPE_TRANSFORM" value="7" enum="PortType">
94 Transform type. Translated to [code skip-lint]mat4[/code] type in shader code.
95 </constant>
96 <constant name="PORT_TYPE_SAMPLER" value="8" enum="PortType">
97 Sampler type. Translated to reference of sampler uniform in shader code. Can only be used for input ports in non-uniform nodes.
98 </constant>
99 <constant name="PORT_TYPE_MAX" value="9" enum="PortType">
100 Represents the size of the [enum PortType] enum.
101 </constant>
102 </constants>
103 </class>