VisualShaderNodeGroupBase.xml 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <class name="VisualShaderNodeGroupBase" inherits="VisualShaderNode" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
  3. <brief_description>
  4. Base class for a family of nodes with variable amount of input and output ports within the visual shader graph.
  5. </brief_description>
  6. <description>
  7. Currently, has no direct usage, use the derived classes instead.
  8. </description>
  9. <tutorials>
  10. </tutorials>
  11. <methods>
  12. <method name="add_input_port">
  13. <return type="void" />
  14. <argument index="0" name="id" type="int" />
  15. <argument index="1" name="type" type="int" />
  16. <argument index="2" name="name" type="String" />
  17. <description>
  18. Adds an input port with the specified [code]type[/code] (see [enum VisualShaderNode.PortType]) and [code]name[/code].
  19. </description>
  20. </method>
  21. <method name="add_output_port">
  22. <return type="void" />
  23. <argument index="0" name="id" type="int" />
  24. <argument index="1" name="type" type="int" />
  25. <argument index="2" name="name" type="String" />
  26. <description>
  27. Adds an output port with the specified [code]type[/code] (see [enum VisualShaderNode.PortType]) and [code]name[/code].
  28. </description>
  29. </method>
  30. <method name="clear_input_ports">
  31. <return type="void" />
  32. <description>
  33. Removes all previously specified input ports.
  34. </description>
  35. </method>
  36. <method name="clear_output_ports">
  37. <return type="void" />
  38. <description>
  39. Removes all previously specified output ports.
  40. </description>
  41. </method>
  42. <method name="get_free_input_port_id" qualifiers="const">
  43. <return type="int" />
  44. <description>
  45. Returns a free input port ID which can be used in [method add_input_port].
  46. </description>
  47. </method>
  48. <method name="get_free_output_port_id" qualifiers="const">
  49. <return type="int" />
  50. <description>
  51. Returns a free output port ID which can be used in [method add_output_port].
  52. </description>
  53. </method>
  54. <method name="get_input_port_count" qualifiers="const">
  55. <return type="int" />
  56. <description>
  57. Returns the number of input ports in use. Alternative for [method get_free_input_port_id].
  58. </description>
  59. </method>
  60. <method name="get_inputs" qualifiers="const">
  61. <return type="String" />
  62. <description>
  63. Returns a [String] description of the input ports as a colon-separated list using the format [code]id,type,name;[/code] (see [method add_input_port]).
  64. </description>
  65. </method>
  66. <method name="get_output_port_count" qualifiers="const">
  67. <return type="int" />
  68. <description>
  69. Returns the number of output ports in use. Alternative for [method get_free_output_port_id].
  70. </description>
  71. </method>
  72. <method name="get_outputs" qualifiers="const">
  73. <return type="String" />
  74. <description>
  75. Returns a [String] description of the output ports as a colon-separated list using the format [code]id,type,name;[/code] (see [method add_output_port]).
  76. </description>
  77. </method>
  78. <method name="has_input_port" qualifiers="const">
  79. <return type="bool" />
  80. <argument index="0" name="id" type="int" />
  81. <description>
  82. Returns [code]true[/code] if the specified input port exists.
  83. </description>
  84. </method>
  85. <method name="has_output_port" qualifiers="const">
  86. <return type="bool" />
  87. <argument index="0" name="id" type="int" />
  88. <description>
  89. Returns [code]true[/code] if the specified output port exists.
  90. </description>
  91. </method>
  92. <method name="is_valid_port_name" qualifiers="const">
  93. <return type="bool" />
  94. <argument index="0" name="name" type="String" />
  95. <description>
  96. Returns [code]true[/code] if the specified port name does not override an existed port name and is valid within the shader.
  97. </description>
  98. </method>
  99. <method name="remove_input_port">
  100. <return type="void" />
  101. <argument index="0" name="id" type="int" />
  102. <description>
  103. Removes the specified input port.
  104. </description>
  105. </method>
  106. <method name="remove_output_port">
  107. <return type="void" />
  108. <argument index="0" name="id" type="int" />
  109. <description>
  110. Removes the specified output port.
  111. </description>
  112. </method>
  113. <method name="set_input_port_name">
  114. <return type="void" />
  115. <argument index="0" name="id" type="int" />
  116. <argument index="1" name="name" type="String" />
  117. <description>
  118. Renames the specified input port.
  119. </description>
  120. </method>
  121. <method name="set_input_port_type">
  122. <return type="void" />
  123. <argument index="0" name="id" type="int" />
  124. <argument index="1" name="type" type="int" />
  125. <description>
  126. Sets the specified input port's type (see [enum VisualShaderNode.PortType]).
  127. </description>
  128. </method>
  129. <method name="set_inputs">
  130. <return type="void" />
  131. <argument index="0" name="inputs" type="String" />
  132. <description>
  133. Defines all input ports using a [String] formatted as a colon-separated list: [code]id,type,name;[/code] (see [method add_input_port]).
  134. </description>
  135. </method>
  136. <method name="set_output_port_name">
  137. <return type="void" />
  138. <argument index="0" name="id" type="int" />
  139. <argument index="1" name="name" type="String" />
  140. <description>
  141. Renames the specified output port.
  142. </description>
  143. </method>
  144. <method name="set_output_port_type">
  145. <return type="void" />
  146. <argument index="0" name="id" type="int" />
  147. <argument index="1" name="type" type="int" />
  148. <description>
  149. Sets the specified output port's type (see [enum VisualShaderNode.PortType]).
  150. </description>
  151. </method>
  152. <method name="set_outputs">
  153. <return type="void" />
  154. <argument index="0" name="outputs" type="String" />
  155. <description>
  156. Defines all output ports using a [String] formatted as a colon-separated list: [code]id,type,name;[/code] (see [method add_output_port]).
  157. </description>
  158. </method>
  159. </methods>
  160. <members>
  161. <member name="size" type="Vector2" setter="set_size" getter="get_size" default="Vector2( 0, 0 )">
  162. The size of the node in the visual shader graph.
  163. </member>
  164. </members>
  165. <constants>
  166. </constants>
  167. </class>