class_visualshadernodegroupbase.rst 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244
  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:`VisualShaderNodeResizableBase<class_VisualShaderNodeResizableBase>` **<** :ref:`VisualShaderNode<class_VisualShaderNode>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :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. Methods
  15. -------
  16. +-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  17. | 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 **)** |
  18. +-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  19. | 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 **)** |
  20. +-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  21. | void | :ref:`clear_input_ports<class_VisualShaderNodeGroupBase_method_clear_input_ports>` **(** **)** |
  22. +-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  23. | void | :ref:`clear_output_ports<class_VisualShaderNodeGroupBase_method_clear_output_ports>` **(** **)** |
  24. +-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  25. | :ref:`int<class_int>` | :ref:`get_free_input_port_id<class_VisualShaderNodeGroupBase_method_get_free_input_port_id>` **(** **)** |const| |
  26. +-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  27. | :ref:`int<class_int>` | :ref:`get_free_output_port_id<class_VisualShaderNodeGroupBase_method_get_free_output_port_id>` **(** **)** |const| |
  28. +-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  29. | :ref:`int<class_int>` | :ref:`get_input_port_count<class_VisualShaderNodeGroupBase_method_get_input_port_count>` **(** **)** |const| |
  30. +-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  31. | :ref:`String<class_String>` | :ref:`get_inputs<class_VisualShaderNodeGroupBase_method_get_inputs>` **(** **)** |const| |
  32. +-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  33. | :ref:`int<class_int>` | :ref:`get_output_port_count<class_VisualShaderNodeGroupBase_method_get_output_port_count>` **(** **)** |const| |
  34. +-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  35. | :ref:`String<class_String>` | :ref:`get_outputs<class_VisualShaderNodeGroupBase_method_get_outputs>` **(** **)** |const| |
  36. +-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  37. | :ref:`bool<class_bool>` | :ref:`has_input_port<class_VisualShaderNodeGroupBase_method_has_input_port>` **(** :ref:`int<class_int>` id **)** |const| |
  38. +-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  39. | :ref:`bool<class_bool>` | :ref:`has_output_port<class_VisualShaderNodeGroupBase_method_has_output_port>` **(** :ref:`int<class_int>` id **)** |const| |
  40. +-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  41. | :ref:`bool<class_bool>` | :ref:`is_valid_port_name<class_VisualShaderNodeGroupBase_method_is_valid_port_name>` **(** :ref:`String<class_String>` name **)** |const| |
  42. +-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  43. | void | :ref:`remove_input_port<class_VisualShaderNodeGroupBase_method_remove_input_port>` **(** :ref:`int<class_int>` id **)** |
  44. +-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  45. | void | :ref:`remove_output_port<class_VisualShaderNodeGroupBase_method_remove_output_port>` **(** :ref:`int<class_int>` id **)** |
  46. +-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  47. | void | :ref:`set_input_port_name<class_VisualShaderNodeGroupBase_method_set_input_port_name>` **(** :ref:`int<class_int>` id, :ref:`String<class_String>` name **)** |
  48. +-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  49. | void | :ref:`set_input_port_type<class_VisualShaderNodeGroupBase_method_set_input_port_type>` **(** :ref:`int<class_int>` id, :ref:`int<class_int>` type **)** |
  50. +-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  51. | void | :ref:`set_inputs<class_VisualShaderNodeGroupBase_method_set_inputs>` **(** :ref:`String<class_String>` inputs **)** |
  52. +-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  53. | void | :ref:`set_output_port_name<class_VisualShaderNodeGroupBase_method_set_output_port_name>` **(** :ref:`int<class_int>` id, :ref:`String<class_String>` name **)** |
  54. +-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  55. | void | :ref:`set_output_port_type<class_VisualShaderNodeGroupBase_method_set_output_port_type>` **(** :ref:`int<class_int>` id, :ref:`int<class_int>` type **)** |
  56. +-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  57. | void | :ref:`set_outputs<class_VisualShaderNodeGroupBase_method_set_outputs>` **(** :ref:`String<class_String>` outputs **)** |
  58. +-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  59. Method Descriptions
  60. -------------------
  61. .. _class_VisualShaderNodeGroupBase_method_add_input_port:
  62. - void **add_input_port** **(** :ref:`int<class_int>` id, :ref:`int<class_int>` type, :ref:`String<class_String>` name **)**
  63. Adds an input port with the specified ``type`` (see :ref:`PortType<enum_VisualShaderNode_PortType>`) and ``name``.
  64. ----
  65. .. _class_VisualShaderNodeGroupBase_method_add_output_port:
  66. - void **add_output_port** **(** :ref:`int<class_int>` id, :ref:`int<class_int>` type, :ref:`String<class_String>` name **)**
  67. Adds an output port with the specified ``type`` (see :ref:`PortType<enum_VisualShaderNode_PortType>`) and ``name``.
  68. ----
  69. .. _class_VisualShaderNodeGroupBase_method_clear_input_ports:
  70. - void **clear_input_ports** **(** **)**
  71. Removes all previously specified input ports.
  72. ----
  73. .. _class_VisualShaderNodeGroupBase_method_clear_output_ports:
  74. - void **clear_output_ports** **(** **)**
  75. Removes all previously specified output ports.
  76. ----
  77. .. _class_VisualShaderNodeGroupBase_method_get_free_input_port_id:
  78. - :ref:`int<class_int>` **get_free_input_port_id** **(** **)** |const|
  79. Returns a free input port ID which can be used in :ref:`add_input_port<class_VisualShaderNodeGroupBase_method_add_input_port>`.
  80. ----
  81. .. _class_VisualShaderNodeGroupBase_method_get_free_output_port_id:
  82. - :ref:`int<class_int>` **get_free_output_port_id** **(** **)** |const|
  83. Returns a free output port ID which can be used in :ref:`add_output_port<class_VisualShaderNodeGroupBase_method_add_output_port>`.
  84. ----
  85. .. _class_VisualShaderNodeGroupBase_method_get_input_port_count:
  86. - :ref:`int<class_int>` **get_input_port_count** **(** **)** |const|
  87. Returns the number of input ports in use. Alternative for :ref:`get_free_input_port_id<class_VisualShaderNodeGroupBase_method_get_free_input_port_id>`.
  88. ----
  89. .. _class_VisualShaderNodeGroupBase_method_get_inputs:
  90. - :ref:`String<class_String>` **get_inputs** **(** **)** |const|
  91. 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>`).
  92. ----
  93. .. _class_VisualShaderNodeGroupBase_method_get_output_port_count:
  94. - :ref:`int<class_int>` **get_output_port_count** **(** **)** |const|
  95. Returns the number of output ports in use. Alternative for :ref:`get_free_output_port_id<class_VisualShaderNodeGroupBase_method_get_free_output_port_id>`.
  96. ----
  97. .. _class_VisualShaderNodeGroupBase_method_get_outputs:
  98. - :ref:`String<class_String>` **get_outputs** **(** **)** |const|
  99. 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>`).
  100. ----
  101. .. _class_VisualShaderNodeGroupBase_method_has_input_port:
  102. - :ref:`bool<class_bool>` **has_input_port** **(** :ref:`int<class_int>` id **)** |const|
  103. Returns ``true`` if the specified input port exists.
  104. ----
  105. .. _class_VisualShaderNodeGroupBase_method_has_output_port:
  106. - :ref:`bool<class_bool>` **has_output_port** **(** :ref:`int<class_int>` id **)** |const|
  107. Returns ``true`` if the specified output port exists.
  108. ----
  109. .. _class_VisualShaderNodeGroupBase_method_is_valid_port_name:
  110. - :ref:`bool<class_bool>` **is_valid_port_name** **(** :ref:`String<class_String>` name **)** |const|
  111. Returns ``true`` if the specified port name does not override an existed port name and is valid within the shader.
  112. ----
  113. .. _class_VisualShaderNodeGroupBase_method_remove_input_port:
  114. - void **remove_input_port** **(** :ref:`int<class_int>` id **)**
  115. Removes the specified input port.
  116. ----
  117. .. _class_VisualShaderNodeGroupBase_method_remove_output_port:
  118. - void **remove_output_port** **(** :ref:`int<class_int>` id **)**
  119. Removes the specified output port.
  120. ----
  121. .. _class_VisualShaderNodeGroupBase_method_set_input_port_name:
  122. - void **set_input_port_name** **(** :ref:`int<class_int>` id, :ref:`String<class_String>` name **)**
  123. Renames the specified input port.
  124. ----
  125. .. _class_VisualShaderNodeGroupBase_method_set_input_port_type:
  126. - void **set_input_port_type** **(** :ref:`int<class_int>` id, :ref:`int<class_int>` type **)**
  127. Sets the specified input port's type (see :ref:`PortType<enum_VisualShaderNode_PortType>`).
  128. ----
  129. .. _class_VisualShaderNodeGroupBase_method_set_inputs:
  130. - void **set_inputs** **(** :ref:`String<class_String>` inputs **)**
  131. 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>`).
  132. ----
  133. .. _class_VisualShaderNodeGroupBase_method_set_output_port_name:
  134. - void **set_output_port_name** **(** :ref:`int<class_int>` id, :ref:`String<class_String>` name **)**
  135. Renames the specified output port.
  136. ----
  137. .. _class_VisualShaderNodeGroupBase_method_set_output_port_type:
  138. - void **set_output_port_type** **(** :ref:`int<class_int>` id, :ref:`int<class_int>` type **)**
  139. Sets the specified output port's type (see :ref:`PortType<enum_VisualShaderNode_PortType>`).
  140. ----
  141. .. _class_VisualShaderNodeGroupBase_method_set_outputs:
  142. - void **set_outputs** **(** :ref:`String<class_String>` outputs **)**
  143. 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>`).
  144. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  145. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  146. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  147. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  148. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  149. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`