class_visualscriptpropertyset.rst 11 KB

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