class_visualshadernodegroupbase.rst 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266
  1. :github_url: hide
  2. .. Generated automatically by doc/tools/make_rst.py in Godot's source tree.
  3. .. DO NOT EDIT THIS FILE, but the VisualShaderNodeGroupBase.xml source instead.
  4. .. The source is found in doc/classes or modules/<name>/doc_classes.
  5. .. _class_VisualShaderNodeGroupBase:
  6. VisualShaderNodeGroupBase
  7. =========================
  8. **Inherits:** :ref:`VisualShaderNode<class_VisualShaderNode>` **<** :ref:`Resource<class_Resource>` **<** :ref:`Reference<class_Reference>` **<** :ref:`Object<class_Object>`
  9. **Inherited By:** :ref:`VisualShaderNodeExpression<class_VisualShaderNodeExpression>`
  10. Base class for a family of nodes with variable amount of input and output ports within the visual shader graph.
  11. Description
  12. -----------
  13. Currently, has no direct usage, use the derived classes instead.
  14. Properties
  15. ----------
  16. +-------------------------------+------------------------------------------------------------+---------------------+
  17. | :ref:`Vector2<class_Vector2>` | :ref:`size<class_VisualShaderNodeGroupBase_property_size>` | ``Vector2( 0, 0 )`` |
  18. +-------------------------------+------------------------------------------------------------+---------------------+
  19. Methods
  20. -------
  21. +-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  22. | void | :ref:`add_input_port<class_VisualShaderNodeGroupBase_method_add_input_port>` **(** :ref:`int<class_int>` id, :ref:`int<class_int>` type, :ref:`String<class_String>` name **)** |
  23. +-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  24. | void | :ref:`add_output_port<class_VisualShaderNodeGroupBase_method_add_output_port>` **(** :ref:`int<class_int>` id, :ref:`int<class_int>` type, :ref:`String<class_String>` name **)** |
  25. +-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  26. | void | :ref:`clear_input_ports<class_VisualShaderNodeGroupBase_method_clear_input_ports>` **(** **)** |
  27. +-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  28. | void | :ref:`clear_output_ports<class_VisualShaderNodeGroupBase_method_clear_output_ports>` **(** **)** |
  29. +-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  30. | :ref:`int<class_int>` | :ref:`get_free_input_port_id<class_VisualShaderNodeGroupBase_method_get_free_input_port_id>` **(** **)** |const| |
  31. +-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  32. | :ref:`int<class_int>` | :ref:`get_free_output_port_id<class_VisualShaderNodeGroupBase_method_get_free_output_port_id>` **(** **)** |const| |
  33. +-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  34. | :ref:`int<class_int>` | :ref:`get_input_port_count<class_VisualShaderNodeGroupBase_method_get_input_port_count>` **(** **)** |const| |
  35. +-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  36. | :ref:`String<class_String>` | :ref:`get_inputs<class_VisualShaderNodeGroupBase_method_get_inputs>` **(** **)** |const| |
  37. +-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  38. | :ref:`int<class_int>` | :ref:`get_output_port_count<class_VisualShaderNodeGroupBase_method_get_output_port_count>` **(** **)** |const| |
  39. +-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  40. | :ref:`String<class_String>` | :ref:`get_outputs<class_VisualShaderNodeGroupBase_method_get_outputs>` **(** **)** |const| |
  41. +-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  42. | :ref:`bool<class_bool>` | :ref:`has_input_port<class_VisualShaderNodeGroupBase_method_has_input_port>` **(** :ref:`int<class_int>` id **)** |const| |
  43. +-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  44. | :ref:`bool<class_bool>` | :ref:`has_output_port<class_VisualShaderNodeGroupBase_method_has_output_port>` **(** :ref:`int<class_int>` id **)** |const| |
  45. +-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  46. | :ref:`bool<class_bool>` | :ref:`is_valid_port_name<class_VisualShaderNodeGroupBase_method_is_valid_port_name>` **(** :ref:`String<class_String>` name **)** |const| |
  47. +-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  48. | void | :ref:`remove_input_port<class_VisualShaderNodeGroupBase_method_remove_input_port>` **(** :ref:`int<class_int>` id **)** |
  49. +-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  50. | void | :ref:`remove_output_port<class_VisualShaderNodeGroupBase_method_remove_output_port>` **(** :ref:`int<class_int>` id **)** |
  51. +-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  52. | void | :ref:`set_input_port_name<class_VisualShaderNodeGroupBase_method_set_input_port_name>` **(** :ref:`int<class_int>` id, :ref:`String<class_String>` name **)** |
  53. +-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  54. | void | :ref:`set_input_port_type<class_VisualShaderNodeGroupBase_method_set_input_port_type>` **(** :ref:`int<class_int>` id, :ref:`int<class_int>` type **)** |
  55. +-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  56. | void | :ref:`set_inputs<class_VisualShaderNodeGroupBase_method_set_inputs>` **(** :ref:`String<class_String>` inputs **)** |
  57. +-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  58. | void | :ref:`set_output_port_name<class_VisualShaderNodeGroupBase_method_set_output_port_name>` **(** :ref:`int<class_int>` id, :ref:`String<class_String>` name **)** |
  59. +-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  60. | void | :ref:`set_output_port_type<class_VisualShaderNodeGroupBase_method_set_output_port_type>` **(** :ref:`int<class_int>` id, :ref:`int<class_int>` type **)** |
  61. +-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  62. | void | :ref:`set_outputs<class_VisualShaderNodeGroupBase_method_set_outputs>` **(** :ref:`String<class_String>` outputs **)** |
  63. +-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  64. Property Descriptions
  65. ---------------------
  66. .. _class_VisualShaderNodeGroupBase_property_size:
  67. - :ref:`Vector2<class_Vector2>` **size**
  68. +-----------+---------------------+
  69. | *Default* | ``Vector2( 0, 0 )`` |
  70. +-----------+---------------------+
  71. | *Setter* | set_size(value) |
  72. +-----------+---------------------+
  73. | *Getter* | get_size() |
  74. +-----------+---------------------+
  75. The size of the node in the visual shader graph.
  76. Method Descriptions
  77. -------------------
  78. .. _class_VisualShaderNodeGroupBase_method_add_input_port:
  79. - void **add_input_port** **(** :ref:`int<class_int>` id, :ref:`int<class_int>` type, :ref:`String<class_String>` name **)**
  80. Adds an input port with the specified ``type`` (see :ref:`PortType<enum_VisualShaderNode_PortType>`) and ``name``.
  81. ----
  82. .. _class_VisualShaderNodeGroupBase_method_add_output_port:
  83. - void **add_output_port** **(** :ref:`int<class_int>` id, :ref:`int<class_int>` type, :ref:`String<class_String>` name **)**
  84. Adds an output port with the specified ``type`` (see :ref:`PortType<enum_VisualShaderNode_PortType>`) and ``name``.
  85. ----
  86. .. _class_VisualShaderNodeGroupBase_method_clear_input_ports:
  87. - void **clear_input_ports** **(** **)**
  88. Removes all previously specified input ports.
  89. ----
  90. .. _class_VisualShaderNodeGroupBase_method_clear_output_ports:
  91. - void **clear_output_ports** **(** **)**
  92. Removes all previously specified output ports.
  93. ----
  94. .. _class_VisualShaderNodeGroupBase_method_get_free_input_port_id:
  95. - :ref:`int<class_int>` **get_free_input_port_id** **(** **)** |const|
  96. Returns a free input port ID which can be used in :ref:`add_input_port<class_VisualShaderNodeGroupBase_method_add_input_port>`.
  97. ----
  98. .. _class_VisualShaderNodeGroupBase_method_get_free_output_port_id:
  99. - :ref:`int<class_int>` **get_free_output_port_id** **(** **)** |const|
  100. Returns a free output port ID which can be used in :ref:`add_output_port<class_VisualShaderNodeGroupBase_method_add_output_port>`.
  101. ----
  102. .. _class_VisualShaderNodeGroupBase_method_get_input_port_count:
  103. - :ref:`int<class_int>` **get_input_port_count** **(** **)** |const|
  104. Returns the number of input ports in use. Alternative for :ref:`get_free_input_port_id<class_VisualShaderNodeGroupBase_method_get_free_input_port_id>`.
  105. ----
  106. .. _class_VisualShaderNodeGroupBase_method_get_inputs:
  107. - :ref:`String<class_String>` **get_inputs** **(** **)** |const|
  108. Returns a :ref:`String<class_String>` description of the input ports as a colon-separated list using the format ``id,type,name;`` (see :ref:`add_input_port<class_VisualShaderNodeGroupBase_method_add_input_port>`).
  109. ----
  110. .. _class_VisualShaderNodeGroupBase_method_get_output_port_count:
  111. - :ref:`int<class_int>` **get_output_port_count** **(** **)** |const|
  112. Returns the number of output ports in use. Alternative for :ref:`get_free_output_port_id<class_VisualShaderNodeGroupBase_method_get_free_output_port_id>`.
  113. ----
  114. .. _class_VisualShaderNodeGroupBase_method_get_outputs:
  115. - :ref:`String<class_String>` **get_outputs** **(** **)** |const|
  116. Returns a :ref:`String<class_String>` description of the output ports as a colon-separated list using the format ``id,type,name;`` (see :ref:`add_output_port<class_VisualShaderNodeGroupBase_method_add_output_port>`).
  117. ----
  118. .. _class_VisualShaderNodeGroupBase_method_has_input_port:
  119. - :ref:`bool<class_bool>` **has_input_port** **(** :ref:`int<class_int>` id **)** |const|
  120. Returns ``true`` if the specified input port exists.
  121. ----
  122. .. _class_VisualShaderNodeGroupBase_method_has_output_port:
  123. - :ref:`bool<class_bool>` **has_output_port** **(** :ref:`int<class_int>` id **)** |const|
  124. Returns ``true`` if the specified output port exists.
  125. ----
  126. .. _class_VisualShaderNodeGroupBase_method_is_valid_port_name:
  127. - :ref:`bool<class_bool>` **is_valid_port_name** **(** :ref:`String<class_String>` name **)** |const|
  128. Returns ``true`` if the specified port name does not override an existed port name and is valid within the shader.
  129. ----
  130. .. _class_VisualShaderNodeGroupBase_method_remove_input_port:
  131. - void **remove_input_port** **(** :ref:`int<class_int>` id **)**
  132. Removes the specified input port.
  133. ----
  134. .. _class_VisualShaderNodeGroupBase_method_remove_output_port:
  135. - void **remove_output_port** **(** :ref:`int<class_int>` id **)**
  136. Removes the specified output port.
  137. ----
  138. .. _class_VisualShaderNodeGroupBase_method_set_input_port_name:
  139. - void **set_input_port_name** **(** :ref:`int<class_int>` id, :ref:`String<class_String>` name **)**
  140. Renames the specified input port.
  141. ----
  142. .. _class_VisualShaderNodeGroupBase_method_set_input_port_type:
  143. - void **set_input_port_type** **(** :ref:`int<class_int>` id, :ref:`int<class_int>` type **)**
  144. Sets the specified input port's type (see :ref:`PortType<enum_VisualShaderNode_PortType>`).
  145. ----
  146. .. _class_VisualShaderNodeGroupBase_method_set_inputs:
  147. - void **set_inputs** **(** :ref:`String<class_String>` inputs **)**
  148. Defines all input ports using a :ref:`String<class_String>` formatted as a colon-separated list: ``id,type,name;`` (see :ref:`add_input_port<class_VisualShaderNodeGroupBase_method_add_input_port>`).
  149. ----
  150. .. _class_VisualShaderNodeGroupBase_method_set_output_port_name:
  151. - void **set_output_port_name** **(** :ref:`int<class_int>` id, :ref:`String<class_String>` name **)**
  152. Renames the specified output port.
  153. ----
  154. .. _class_VisualShaderNodeGroupBase_method_set_output_port_type:
  155. - void **set_output_port_type** **(** :ref:`int<class_int>` id, :ref:`int<class_int>` type **)**
  156. Sets the specified output port's type (see :ref:`PortType<enum_VisualShaderNode_PortType>`).
  157. ----
  158. .. _class_VisualShaderNodeGroupBase_method_set_outputs:
  159. - void **set_outputs** **(** :ref:`String<class_String>` outputs **)**
  160. Defines all output ports using a :ref:`String<class_String>` formatted as a colon-separated list: ``id,type,name;`` (see :ref:`add_output_port<class_VisualShaderNodeGroupBase_method_add_output_port>`).
  161. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  162. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  163. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`