class_visualscriptpropertyset.rst 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339
  1. :github_url: hide
  2. .. DO NOT EDIT THIS FILE!!!
  3. .. Generated automatically from Godot engine sources.
  4. .. Generator: https://github.com/godotengine/godot/tree/3.6/doc/tools/make_rst.py.
  5. .. XML source: https://github.com/godotengine/godot/tree/3.6/modules/visual_script/doc_classes/VisualScriptPropertySet.xml.
  6. .. _class_VisualScriptPropertySet:
  7. VisualScriptPropertySet
  8. =======================
  9. **Inherits:** :ref:`VisualScriptNode<class_VisualScriptNode>` **<** :ref:`Resource<class_Resource>` **<** :ref:`Reference<class_Reference>` **<** :ref:`Object<class_Object>`
  10. A Visual Script node that sets a property of an :ref:`Object<class_Object>`.
  11. .. rst-class:: classref-introduction-group
  12. Description
  13. -----------
  14. **VisualScriptPropertySet** can set the value of any property from the current object or other objects.
  15. .. rst-class:: classref-reftable-group
  16. Properties
  17. ----------
  18. .. table::
  19. :widths: auto
  20. +--------------------------------------------------------+------------------------------------------------------------------------+--------------+
  21. | :ref:`AssignOp<enum_VisualScriptPropertySet_AssignOp>` | :ref:`assign_op<class_VisualScriptPropertySet_property_assign_op>` | ``0`` |
  22. +--------------------------------------------------------+------------------------------------------------------------------------+--------------+
  23. | :ref:`String<class_String>` | :ref:`base_script<class_VisualScriptPropertySet_property_base_script>` | |
  24. +--------------------------------------------------------+------------------------------------------------------------------------+--------------+
  25. | :ref:`String<class_String>` | :ref:`base_type<class_VisualScriptPropertySet_property_base_type>` | ``"Object"`` |
  26. +--------------------------------------------------------+------------------------------------------------------------------------+--------------+
  27. | :ref:`Variant.Type<enum_@GlobalScope_Variant.Type>` | :ref:`basic_type<class_VisualScriptPropertySet_property_basic_type>` | |
  28. +--------------------------------------------------------+------------------------------------------------------------------------+--------------+
  29. | :ref:`String<class_String>` | :ref:`index<class_VisualScriptPropertySet_property_index>` | |
  30. +--------------------------------------------------------+------------------------------------------------------------------------+--------------+
  31. | :ref:`NodePath<class_NodePath>` | :ref:`node_path<class_VisualScriptPropertySet_property_node_path>` | |
  32. +--------------------------------------------------------+------------------------------------------------------------------------+--------------+
  33. | :ref:`String<class_String>` | :ref:`property<class_VisualScriptPropertySet_property_property>` | ``""`` |
  34. +--------------------------------------------------------+------------------------------------------------------------------------+--------------+
  35. | :ref:`CallMode<enum_VisualScriptPropertySet_CallMode>` | :ref:`set_mode<class_VisualScriptPropertySet_property_set_mode>` | ``0`` |
  36. +--------------------------------------------------------+------------------------------------------------------------------------+--------------+
  37. .. rst-class:: classref-section-separator
  38. ----
  39. .. rst-class:: classref-descriptions-group
  40. Enumerations
  41. ------------
  42. .. _enum_VisualScriptPropertySet_CallMode:
  43. .. rst-class:: classref-enumeration
  44. enum **CallMode**:
  45. .. _class_VisualScriptPropertySet_constant_CALL_MODE_SELF:
  46. .. rst-class:: classref-enumeration-constant
  47. :ref:`CallMode<enum_VisualScriptPropertySet_CallMode>` **CALL_MODE_SELF** = ``0``
  48. The property will be set on this :ref:`Object<class_Object>`.
  49. .. _class_VisualScriptPropertySet_constant_CALL_MODE_NODE_PATH:
  50. .. rst-class:: classref-enumeration-constant
  51. :ref:`CallMode<enum_VisualScriptPropertySet_CallMode>` **CALL_MODE_NODE_PATH** = ``1``
  52. The property will be set on the given :ref:`Node<class_Node>` in the scene tree.
  53. .. _class_VisualScriptPropertySet_constant_CALL_MODE_INSTANCE:
  54. .. rst-class:: classref-enumeration-constant
  55. :ref:`CallMode<enum_VisualScriptPropertySet_CallMode>` **CALL_MODE_INSTANCE** = ``2``
  56. The property will be set on an instanced node with the given type and script.
  57. .. _class_VisualScriptPropertySet_constant_CALL_MODE_BASIC_TYPE:
  58. .. rst-class:: classref-enumeration-constant
  59. :ref:`CallMode<enum_VisualScriptPropertySet_CallMode>` **CALL_MODE_BASIC_TYPE** = ``3``
  60. The property will be set on a GDScript basic type (e.g. :ref:`Vector2<class_Vector2>`).
  61. .. rst-class:: classref-item-separator
  62. ----
  63. .. _enum_VisualScriptPropertySet_AssignOp:
  64. .. rst-class:: classref-enumeration
  65. enum **AssignOp**:
  66. .. _class_VisualScriptPropertySet_constant_ASSIGN_OP_NONE:
  67. .. rst-class:: classref-enumeration-constant
  68. :ref:`AssignOp<enum_VisualScriptPropertySet_AssignOp>` **ASSIGN_OP_NONE** = ``0``
  69. The property will be assigned regularly.
  70. .. _class_VisualScriptPropertySet_constant_ASSIGN_OP_ADD:
  71. .. rst-class:: classref-enumeration-constant
  72. :ref:`AssignOp<enum_VisualScriptPropertySet_AssignOp>` **ASSIGN_OP_ADD** = ``1``
  73. The value will be added to the property. Equivalent of doing ``+=``.
  74. .. _class_VisualScriptPropertySet_constant_ASSIGN_OP_SUB:
  75. .. rst-class:: classref-enumeration-constant
  76. :ref:`AssignOp<enum_VisualScriptPropertySet_AssignOp>` **ASSIGN_OP_SUB** = ``2``
  77. The value will be subtracted from the property. Equivalent of doing ``-=``.
  78. .. _class_VisualScriptPropertySet_constant_ASSIGN_OP_MUL:
  79. .. rst-class:: classref-enumeration-constant
  80. :ref:`AssignOp<enum_VisualScriptPropertySet_AssignOp>` **ASSIGN_OP_MUL** = ``3``
  81. The property will be multiplied by the value. Equivalent of doing ``*=``.
  82. .. _class_VisualScriptPropertySet_constant_ASSIGN_OP_DIV:
  83. .. rst-class:: classref-enumeration-constant
  84. :ref:`AssignOp<enum_VisualScriptPropertySet_AssignOp>` **ASSIGN_OP_DIV** = ``4``
  85. The property will be divided by the value. Equivalent of doing ``/=``.
  86. .. _class_VisualScriptPropertySet_constant_ASSIGN_OP_MOD:
  87. .. rst-class:: classref-enumeration-constant
  88. :ref:`AssignOp<enum_VisualScriptPropertySet_AssignOp>` **ASSIGN_OP_MOD** = ``5``
  89. A modulo operation will be performed on the property and the value. Equivalent of doing ``%=``.
  90. .. _class_VisualScriptPropertySet_constant_ASSIGN_OP_SHIFT_LEFT:
  91. .. rst-class:: classref-enumeration-constant
  92. :ref:`AssignOp<enum_VisualScriptPropertySet_AssignOp>` **ASSIGN_OP_SHIFT_LEFT** = ``6``
  93. The property will be binarly shifted to the left by the given value. Equivalent of doing ``<<``.
  94. .. _class_VisualScriptPropertySet_constant_ASSIGN_OP_SHIFT_RIGHT:
  95. .. rst-class:: classref-enumeration-constant
  96. :ref:`AssignOp<enum_VisualScriptPropertySet_AssignOp>` **ASSIGN_OP_SHIFT_RIGHT** = ``7``
  97. The property will be binarly shifted to the right by the given value. Equivalent of doing ``>>``.
  98. .. _class_VisualScriptPropertySet_constant_ASSIGN_OP_BIT_AND:
  99. .. rst-class:: classref-enumeration-constant
  100. :ref:`AssignOp<enum_VisualScriptPropertySet_AssignOp>` **ASSIGN_OP_BIT_AND** = ``8``
  101. A binary ``AND`` operation will be performed on the property. Equivalent of doing ``&=``.
  102. .. _class_VisualScriptPropertySet_constant_ASSIGN_OP_BIT_OR:
  103. .. rst-class:: classref-enumeration-constant
  104. :ref:`AssignOp<enum_VisualScriptPropertySet_AssignOp>` **ASSIGN_OP_BIT_OR** = ``9``
  105. A binary ``OR`` operation will be performed on the property. Equivalent of doing ``|=``.
  106. .. _class_VisualScriptPropertySet_constant_ASSIGN_OP_BIT_XOR:
  107. .. rst-class:: classref-enumeration-constant
  108. :ref:`AssignOp<enum_VisualScriptPropertySet_AssignOp>` **ASSIGN_OP_BIT_XOR** = ``10``
  109. A binary ``XOR`` operation will be performed on the property. Equivalent of doing ``^=``.
  110. .. rst-class:: classref-section-separator
  111. ----
  112. .. rst-class:: classref-descriptions-group
  113. Property Descriptions
  114. ---------------------
  115. .. _class_VisualScriptPropertySet_property_assign_op:
  116. .. rst-class:: classref-property
  117. :ref:`AssignOp<enum_VisualScriptPropertySet_AssignOp>` **assign_op** = ``0``
  118. .. rst-class:: classref-property-setget
  119. - void **set_assign_op** **(** :ref:`AssignOp<enum_VisualScriptPropertySet_AssignOp>` value **)**
  120. - :ref:`AssignOp<enum_VisualScriptPropertySet_AssignOp>` **get_assign_op** **(** **)**
  121. The additional operation to perform when assigning. See :ref:`AssignOp<enum_VisualScriptPropertySet_AssignOp>` for options.
  122. .. rst-class:: classref-item-separator
  123. ----
  124. .. _class_VisualScriptPropertySet_property_base_script:
  125. .. rst-class:: classref-property
  126. :ref:`String<class_String>` **base_script**
  127. .. rst-class:: classref-property-setget
  128. - void **set_base_script** **(** :ref:`String<class_String>` value **)**
  129. - :ref:`String<class_String>` **get_base_script** **(** **)**
  130. The script to be used when :ref:`set_mode<class_VisualScriptPropertySet_property_set_mode>` is set to :ref:`CALL_MODE_INSTANCE<class_VisualScriptPropertySet_constant_CALL_MODE_INSTANCE>`.
  131. .. rst-class:: classref-item-separator
  132. ----
  133. .. _class_VisualScriptPropertySet_property_base_type:
  134. .. rst-class:: classref-property
  135. :ref:`String<class_String>` **base_type** = ``"Object"``
  136. .. rst-class:: classref-property-setget
  137. - void **set_base_type** **(** :ref:`String<class_String>` value **)**
  138. - :ref:`String<class_String>` **get_base_type** **(** **)**
  139. The base type to be used when :ref:`set_mode<class_VisualScriptPropertySet_property_set_mode>` is set to :ref:`CALL_MODE_INSTANCE<class_VisualScriptPropertySet_constant_CALL_MODE_INSTANCE>`.
  140. .. rst-class:: classref-item-separator
  141. ----
  142. .. _class_VisualScriptPropertySet_property_basic_type:
  143. .. rst-class:: classref-property
  144. :ref:`Variant.Type<enum_@GlobalScope_Variant.Type>` **basic_type**
  145. .. rst-class:: classref-property-setget
  146. - void **set_basic_type** **(** :ref:`Variant.Type<enum_@GlobalScope_Variant.Type>` value **)**
  147. - :ref:`Variant.Type<enum_@GlobalScope_Variant.Type>` **get_basic_type** **(** **)**
  148. The type to be used when :ref:`set_mode<class_VisualScriptPropertySet_property_set_mode>` is set to :ref:`CALL_MODE_BASIC_TYPE<class_VisualScriptPropertySet_constant_CALL_MODE_BASIC_TYPE>`.
  149. .. rst-class:: classref-item-separator
  150. ----
  151. .. _class_VisualScriptPropertySet_property_index:
  152. .. rst-class:: classref-property
  153. :ref:`String<class_String>` **index**
  154. .. rst-class:: classref-property-setget
  155. - void **set_index** **(** :ref:`String<class_String>` value **)**
  156. - :ref:`String<class_String>` **get_index** **(** **)**
  157. The indexed name of the property to set. See :ref:`Object.set_indexed<class_Object_method_set_indexed>` for details.
  158. .. rst-class:: classref-item-separator
  159. ----
  160. .. _class_VisualScriptPropertySet_property_node_path:
  161. .. rst-class:: classref-property
  162. :ref:`NodePath<class_NodePath>` **node_path**
  163. .. rst-class:: classref-property-setget
  164. - void **set_base_path** **(** :ref:`NodePath<class_NodePath>` value **)**
  165. - :ref:`NodePath<class_NodePath>` **get_base_path** **(** **)**
  166. The node path to use when :ref:`set_mode<class_VisualScriptPropertySet_property_set_mode>` is set to :ref:`CALL_MODE_NODE_PATH<class_VisualScriptPropertySet_constant_CALL_MODE_NODE_PATH>`.
  167. .. rst-class:: classref-item-separator
  168. ----
  169. .. _class_VisualScriptPropertySet_property_property:
  170. .. rst-class:: classref-property
  171. :ref:`String<class_String>` **property** = ``""``
  172. .. rst-class:: classref-property-setget
  173. - void **set_property** **(** :ref:`String<class_String>` value **)**
  174. - :ref:`String<class_String>` **get_property** **(** **)**
  175. The name of the property to set. Changing this will clear :ref:`index<class_VisualScriptPropertySet_property_index>`.
  176. .. rst-class:: classref-item-separator
  177. ----
  178. .. _class_VisualScriptPropertySet_property_set_mode:
  179. .. rst-class:: classref-property
  180. :ref:`CallMode<enum_VisualScriptPropertySet_CallMode>` **set_mode** = ``0``
  181. .. rst-class:: classref-property-setget
  182. - void **set_call_mode** **(** :ref:`CallMode<enum_VisualScriptPropertySet_CallMode>` value **)**
  183. - :ref:`CallMode<enum_VisualScriptPropertySet_CallMode>` **get_call_mode** **(** **)**
  184. ``set_mode`` determines the target object on which the property will be set. See :ref:`CallMode<enum_VisualScriptPropertySet_CallMode>` for options.
  185. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  186. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  187. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  188. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`