class_visualscriptpropertyget.rst 7.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174
  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/VisualScriptPropertyGet.xml.
  6. .. _class_VisualScriptPropertyGet:
  7. VisualScriptPropertyGet
  8. =======================
  9. **Inherits:** :ref:`VisualScriptNode<class_VisualScriptNode>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
  10. A Visual Script node returning a value of a property from an :ref:`Object<class_Object>`.
  11. Description
  12. -----------
  13. ``VisualScriptPropertyGet`` can return a value of any property from the current object or other objects.
  14. Properties
  15. ----------
  16. +--------------------------------------------------------+------------------------------------------------------------------------+---------------+
  17. | :ref:`String<class_String>` | :ref:`base_script<class_VisualScriptPropertyGet_property_base_script>` | |
  18. +--------------------------------------------------------+------------------------------------------------------------------------+---------------+
  19. | :ref:`StringName<class_StringName>` | :ref:`base_type<class_VisualScriptPropertyGet_property_base_type>` | ``&"Object"`` |
  20. +--------------------------------------------------------+------------------------------------------------------------------------+---------------+
  21. | :ref:`Variant.Type<enum_@GlobalScope_Variant.Type>` | :ref:`basic_type<class_VisualScriptPropertyGet_property_basic_type>` | |
  22. +--------------------------------------------------------+------------------------------------------------------------------------+---------------+
  23. | :ref:`StringName<class_StringName>` | :ref:`index<class_VisualScriptPropertyGet_property_index>` | |
  24. +--------------------------------------------------------+------------------------------------------------------------------------+---------------+
  25. | :ref:`NodePath<class_NodePath>` | :ref:`node_path<class_VisualScriptPropertyGet_property_node_path>` | |
  26. +--------------------------------------------------------+------------------------------------------------------------------------+---------------+
  27. | :ref:`StringName<class_StringName>` | :ref:`property<class_VisualScriptPropertyGet_property_property>` | ``&""`` |
  28. +--------------------------------------------------------+------------------------------------------------------------------------+---------------+
  29. | :ref:`CallMode<enum_VisualScriptPropertyGet_CallMode>` | :ref:`set_mode<class_VisualScriptPropertyGet_property_set_mode>` | ``0`` |
  30. +--------------------------------------------------------+------------------------------------------------------------------------+---------------+
  31. Enumerations
  32. ------------
  33. .. _enum_VisualScriptPropertyGet_CallMode:
  34. .. _class_VisualScriptPropertyGet_constant_CALL_MODE_SELF:
  35. .. _class_VisualScriptPropertyGet_constant_CALL_MODE_NODE_PATH:
  36. .. _class_VisualScriptPropertyGet_constant_CALL_MODE_INSTANCE:
  37. .. _class_VisualScriptPropertyGet_constant_CALL_MODE_BASIC_TYPE:
  38. enum **CallMode**:
  39. - **CALL_MODE_SELF** = **0** --- The property will be retrieved from this :ref:`Object<class_Object>`.
  40. - **CALL_MODE_NODE_PATH** = **1** --- The property will be retrieved from the given :ref:`Node<class_Node>` in the scene tree.
  41. - **CALL_MODE_INSTANCE** = **2** --- The property will be retrieved from an instanced node with the given type and script.
  42. - **CALL_MODE_BASIC_TYPE** = **3** --- The property will be retrieved from a GDScript basic type (e.g. :ref:`Vector2<class_Vector2>`).
  43. Property Descriptions
  44. ---------------------
  45. .. _class_VisualScriptPropertyGet_property_base_script:
  46. - :ref:`String<class_String>` **base_script**
  47. +----------+------------------------+
  48. | *Setter* | set_base_script(value) |
  49. +----------+------------------------+
  50. | *Getter* | get_base_script() |
  51. +----------+------------------------+
  52. The script to be used when :ref:`set_mode<class_VisualScriptPropertyGet_property_set_mode>` is set to :ref:`CALL_MODE_INSTANCE<class_VisualScriptPropertyGet_constant_CALL_MODE_INSTANCE>`.
  53. ----
  54. .. _class_VisualScriptPropertyGet_property_base_type:
  55. - :ref:`StringName<class_StringName>` **base_type**
  56. +-----------+----------------------+
  57. | *Default* | ``&"Object"`` |
  58. +-----------+----------------------+
  59. | *Setter* | set_base_type(value) |
  60. +-----------+----------------------+
  61. | *Getter* | get_base_type() |
  62. +-----------+----------------------+
  63. The base type to be used when :ref:`set_mode<class_VisualScriptPropertyGet_property_set_mode>` is set to :ref:`CALL_MODE_INSTANCE<class_VisualScriptPropertyGet_constant_CALL_MODE_INSTANCE>`.
  64. ----
  65. .. _class_VisualScriptPropertyGet_property_basic_type:
  66. - :ref:`Variant.Type<enum_@GlobalScope_Variant.Type>` **basic_type**
  67. +----------+-----------------------+
  68. | *Setter* | set_basic_type(value) |
  69. +----------+-----------------------+
  70. | *Getter* | get_basic_type() |
  71. +----------+-----------------------+
  72. The type to be used when :ref:`set_mode<class_VisualScriptPropertyGet_property_set_mode>` is set to :ref:`CALL_MODE_BASIC_TYPE<class_VisualScriptPropertyGet_constant_CALL_MODE_BASIC_TYPE>`.
  73. ----
  74. .. _class_VisualScriptPropertyGet_property_index:
  75. - :ref:`StringName<class_StringName>` **index**
  76. +----------+------------------+
  77. | *Setter* | set_index(value) |
  78. +----------+------------------+
  79. | *Getter* | get_index() |
  80. +----------+------------------+
  81. The indexed name of the property to retrieve. See :ref:`Object.get_indexed<class_Object_method_get_indexed>` for details.
  82. ----
  83. .. _class_VisualScriptPropertyGet_property_node_path:
  84. - :ref:`NodePath<class_NodePath>` **node_path**
  85. +----------+----------------------+
  86. | *Setter* | set_base_path(value) |
  87. +----------+----------------------+
  88. | *Getter* | get_base_path() |
  89. +----------+----------------------+
  90. The node path to use when :ref:`set_mode<class_VisualScriptPropertyGet_property_set_mode>` is set to :ref:`CALL_MODE_NODE_PATH<class_VisualScriptPropertyGet_constant_CALL_MODE_NODE_PATH>`.
  91. ----
  92. .. _class_VisualScriptPropertyGet_property_property:
  93. - :ref:`StringName<class_StringName>` **property**
  94. +-----------+---------------------+
  95. | *Default* | ``&""`` |
  96. +-----------+---------------------+
  97. | *Setter* | set_property(value) |
  98. +-----------+---------------------+
  99. | *Getter* | get_property() |
  100. +-----------+---------------------+
  101. The name of the property to retrieve. Changing this will clear :ref:`index<class_VisualScriptPropertyGet_property_index>`.
  102. ----
  103. .. _class_VisualScriptPropertyGet_property_set_mode:
  104. - :ref:`CallMode<enum_VisualScriptPropertyGet_CallMode>` **set_mode**
  105. +-----------+----------------------+
  106. | *Default* | ``0`` |
  107. +-----------+----------------------+
  108. | *Setter* | set_call_mode(value) |
  109. +-----------+----------------------+
  110. | *Getter* | get_call_mode() |
  111. +-----------+----------------------+
  112. ``set_mode`` determines the target object from which the property will be retrieved. See :ref:`CallMode<enum_VisualScriptPropertyGet_CallMode>` for options.
  113. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  114. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  115. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  116. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  117. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  118. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`