class_object.rst 37 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418
  1. .. Generated automatically by doc/tools/makerst.py in Godot's source tree.
  2. .. DO NOT EDIT THIS FILE, but the Object.xml source instead.
  3. .. The source is found in doc/classes or modules/<name>/doc_classes.
  4. .. _class_Object:
  5. Object
  6. ======
  7. **Inherited By:** :ref:`Reference<class_Reference>`, :ref:`Physics2DServer<class_Physics2DServer>`, :ref:`MainLoop<class_MainLoop>`, :ref:`PhysicsDirectBodyState<class_PhysicsDirectBodyState>`, :ref:`Input<class_Input>`, :ref:`Node<class_Node>`, :ref:`Geometry<class_Geometry>`, :ref:`ARVRPositionalTracker<class_ARVRPositionalTracker>`, :ref:`TreeItem<class_TreeItem>`, :ref:`JavaScript<class_JavaScript>`, :ref:`ARVRServer<class_ARVRServer>`, :ref:`PhysicsDirectSpaceState<class_PhysicsDirectSpaceState>`, :ref:`ProjectSettings<class_ProjectSettings>`, :ref:`Engine<class_Engine>`, :ref:`Physics2DDirectSpaceState<class_Physics2DDirectSpaceState>`, :ref:`InputMap<class_InputMap>`, :ref:`UndoRedo<class_UndoRedo>`, :ref:`PhysicsServer<class_PhysicsServer>`, :ref:`ResourceSaver<class_ResourceSaver>`, :ref:`Performance<class_Performance>`, :ref:`ResourceLoader<class_ResourceLoader>`, :ref:`JSON<class_JSON>`, :ref:`AudioServer<class_AudioServer>`, :ref:`IP<class_IP>`, :ref:`ClassDB<class_ClassDB>`, :ref:`VisualServer<class_VisualServer>`, :ref:`OS<class_OS>`, :ref:`GodotSharp<class_GodotSharp>`, :ref:`EditorSelection<class_EditorSelection>`, :ref:`Physics2DDirectBodyState<class_Physics2DDirectBodyState>`, :ref:`VisualScriptEditor<class_VisualScriptEditor>`, :ref:`TranslationServer<class_TranslationServer>`, :ref:`EditorFileSystemDirectory<class_EditorFileSystemDirectory>`
  8. **Category:** Core
  9. Brief Description
  10. -----------------
  11. Base class for all non built-in types.
  12. Methods
  13. -------
  14. +------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  15. | :ref:`Variant<class_Variant>` | :ref:`_get<class_Object__get>` **(** :ref:`String<class_String>` property **)** virtual |
  16. +------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  17. | :ref:`Array<class_Array>` | :ref:`_get_property_list<class_Object__get_property_list>` **(** **)** virtual |
  18. +------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  19. | void | :ref:`_init<class_Object__init>` **(** **)** virtual |
  20. +------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  21. | void | :ref:`_notification<class_Object__notification>` **(** :ref:`int<class_int>` what **)** virtual |
  22. +------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  23. | :ref:`bool<class_bool>` | :ref:`_set<class_Object__set>` **(** :ref:`String<class_String>` property, :ref:`Variant<class_Variant>` value **)** virtual |
  24. +------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  25. | void | :ref:`add_user_signal<class_Object_add_user_signal>` **(** :ref:`String<class_String>` signal, :ref:`Array<class_Array>` arguments=[ ] **)** |
  26. +------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  27. | :ref:`Variant<class_Variant>` | :ref:`call<class_Object_call>` **(** :ref:`String<class_String>` method **)** vararg |
  28. +------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  29. | :ref:`Variant<class_Variant>` | :ref:`call_deferred<class_Object_call_deferred>` **(** :ref:`String<class_String>` method **)** vararg |
  30. +------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  31. | :ref:`Variant<class_Variant>` | :ref:`callv<class_Object_callv>` **(** :ref:`String<class_String>` method, :ref:`Array<class_Array>` arg_array **)** |
  32. +------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  33. | :ref:`bool<class_bool>` | :ref:`can_translate_messages<class_Object_can_translate_messages>` **(** **)** const |
  34. +------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  35. | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`connect<class_Object_connect>` **(** :ref:`String<class_String>` signal, :ref:`Object<class_Object>` target, :ref:`String<class_String>` method, :ref:`Array<class_Array>` binds=[ ], :ref:`int<class_int>` flags=0 **)** |
  36. +------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  37. | void | :ref:`disconnect<class_Object_disconnect>` **(** :ref:`String<class_String>` signal, :ref:`Object<class_Object>` target, :ref:`String<class_String>` method **)** |
  38. +------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  39. | :ref:`Variant<class_Variant>` | :ref:`emit_signal<class_Object_emit_signal>` **(** :ref:`String<class_String>` signal **)** vararg |
  40. +------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  41. | void | :ref:`free<class_Object_free>` **(** **)** |
  42. +------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  43. | :ref:`Variant<class_Variant>` | :ref:`get<class_Object_get>` **(** :ref:`String<class_String>` property **)** const |
  44. +------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  45. | :ref:`String<class_String>` | :ref:`get_class<class_Object_get_class>` **(** **)** const |
  46. +------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  47. | :ref:`Array<class_Array>` | :ref:`get_incoming_connections<class_Object_get_incoming_connections>` **(** **)** const |
  48. +------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  49. | :ref:`Variant<class_Variant>` | :ref:`get_indexed<class_Object_get_indexed>` **(** :ref:`NodePath<class_NodePath>` property **)** const |
  50. +------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  51. | :ref:`int<class_int>` | :ref:`get_instance_id<class_Object_get_instance_id>` **(** **)** const |
  52. +------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  53. | :ref:`Variant<class_Variant>` | :ref:`get_meta<class_Object_get_meta>` **(** :ref:`String<class_String>` name **)** const |
  54. +------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  55. | :ref:`PoolStringArray<class_PoolStringArray>` | :ref:`get_meta_list<class_Object_get_meta_list>` **(** **)** const |
  56. +------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  57. | :ref:`Array<class_Array>` | :ref:`get_method_list<class_Object_get_method_list>` **(** **)** const |
  58. +------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  59. | :ref:`Array<class_Array>` | :ref:`get_property_list<class_Object_get_property_list>` **(** **)** const |
  60. +------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  61. | :ref:`Reference<class_Reference>` | :ref:`get_script<class_Object_get_script>` **(** **)** const |
  62. +------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  63. | :ref:`Array<class_Array>` | :ref:`get_signal_connection_list<class_Object_get_signal_connection_list>` **(** :ref:`String<class_String>` signal **)** const |
  64. +------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  65. | :ref:`Array<class_Array>` | :ref:`get_signal_list<class_Object_get_signal_list>` **(** **)** const |
  66. +------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  67. | :ref:`bool<class_bool>` | :ref:`has_meta<class_Object_has_meta>` **(** :ref:`String<class_String>` name **)** const |
  68. +------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  69. | :ref:`bool<class_bool>` | :ref:`has_method<class_Object_has_method>` **(** :ref:`String<class_String>` method **)** const |
  70. +------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  71. | :ref:`bool<class_bool>` | :ref:`has_user_signal<class_Object_has_user_signal>` **(** :ref:`String<class_String>` signal **)** const |
  72. +------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  73. | :ref:`bool<class_bool>` | :ref:`is_blocking_signals<class_Object_is_blocking_signals>` **(** **)** const |
  74. +------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  75. | :ref:`bool<class_bool>` | :ref:`is_class<class_Object_is_class>` **(** :ref:`String<class_String>` type **)** const |
  76. +------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  77. | :ref:`bool<class_bool>` | :ref:`is_connected<class_Object_is_connected>` **(** :ref:`String<class_String>` signal, :ref:`Object<class_Object>` target, :ref:`String<class_String>` method **)** const |
  78. +------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  79. | :ref:`bool<class_bool>` | :ref:`is_queued_for_deletion<class_Object_is_queued_for_deletion>` **(** **)** const |
  80. +------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  81. | void | :ref:`notification<class_Object_notification>` **(** :ref:`int<class_int>` what, :ref:`bool<class_bool>` reversed=false **)** |
  82. +------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  83. | void | :ref:`property_list_changed_notify<class_Object_property_list_changed_notify>` **(** **)** |
  84. +------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  85. | void | :ref:`set<class_Object_set>` **(** :ref:`String<class_String>` property, :ref:`Variant<class_Variant>` value **)** |
  86. +------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  87. | void | :ref:`set_block_signals<class_Object_set_block_signals>` **(** :ref:`bool<class_bool>` enable **)** |
  88. +------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  89. | void | :ref:`set_deferred<class_Object_set_deferred>` **(** :ref:`String<class_String>` property, :ref:`Variant<class_Variant>` value **)** |
  90. +------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  91. | void | :ref:`set_indexed<class_Object_set_indexed>` **(** :ref:`NodePath<class_NodePath>` property, :ref:`Variant<class_Variant>` value **)** |
  92. +------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  93. | void | :ref:`set_message_translation<class_Object_set_message_translation>` **(** :ref:`bool<class_bool>` enable **)** |
  94. +------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  95. | void | :ref:`set_meta<class_Object_set_meta>` **(** :ref:`String<class_String>` name, :ref:`Variant<class_Variant>` value **)** |
  96. +------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  97. | void | :ref:`set_script<class_Object_set_script>` **(** :ref:`Reference<class_Reference>` script **)** |
  98. +------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  99. | :ref:`String<class_String>` | :ref:`tr<class_Object_tr>` **(** :ref:`String<class_String>` message **)** const |
  100. +------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  101. Signals
  102. -------
  103. .. _class_Object_script_changed:
  104. - **script_changed** **(** **)**
  105. Emitted whenever the script of the Object is changed.
  106. Enumerations
  107. ------------
  108. .. _enum_Object_ConnectFlags:
  109. enum **ConnectFlags**:
  110. - **CONNECT_DEFERRED** = **1** --- Connect a signal in deferred mode. This way, signal emissions are stored in a queue, then set on idle time.
  111. - **CONNECT_PERSIST** = **2** --- Persisting connections are saved when the object is serialized to file.
  112. - **CONNECT_ONESHOT** = **4** --- One shot connections disconnect themselves after emission.
  113. - **CONNECT_REFERENCE_COUNTED** = **8**
  114. Constants
  115. ---------
  116. - **NOTIFICATION_POSTINITIALIZE** = **0** --- Called right when the object is initialized. Not available in script.
  117. - **NOTIFICATION_PREDELETE** = **1** --- Called before the object is about to be deleted.
  118. Description
  119. -----------
  120. Base class for all non built-in types. Everything not a built-in type starts the inheritance chain from this class.
  121. Objects do not manage memory, if inheriting from one the object will most likely have to be deleted manually (call the :ref:`free<class_Object_free>` function from the script or delete from C++).
  122. Some derivatives add memory management, such as :ref:`Reference<class_Reference>` (which keeps a reference count and deletes itself automatically when no longer referenced) and :ref:`Node<class_Node>`, which deletes the children tree when deleted.
  123. Objects export properties, which are mainly useful for storage and editing, but not really so much in programming. Properties are exported in :ref:`_get_property_list<class_Object__get_property_list>` and handled in :ref:`_get<class_Object__get>` and :ref:`_set<class_Object__set>`. However, scripting languages and C++ have simpler means to export them.
  124. Objects also receive notifications (:ref:`_notification<class_Object__notification>`). Notifications are a simple way to notify the object about simple events, so they can all be handled together.
  125. Method Descriptions
  126. -------------------
  127. .. _class_Object__get:
  128. - :ref:`Variant<class_Variant>` **_get** **(** :ref:`String<class_String>` property **)** virtual
  129. Returns the given property. Returns ``null`` if the ``property`` does not exist.
  130. .. _class_Object__get_property_list:
  131. - :ref:`Array<class_Array>` **_get_property_list** **(** **)** virtual
  132. Returns the object's property list as an :ref:`Array<class_Array>` of dictionaries. Dictionaries must contain: name:String, type:int (see TYPE\_\* enum in :ref:`@GlobalScope<class_@GlobalScope>`) and optionally: hint:int (see PROPERTY_HINT\_\* in :ref:`@GlobalScope<class_@GlobalScope>`), hint_string:String, usage:int (see PROPERTY_USAGE\_\* in :ref:`@GlobalScope<class_@GlobalScope>`).
  133. .. _class_Object__init:
  134. - void **_init** **(** **)** virtual
  135. The virtual method called upon initialization.
  136. .. _class_Object__notification:
  137. - void **_notification** **(** :ref:`int<class_int>` what **)** virtual
  138. Notify the object internally using an ID.
  139. .. _class_Object__set:
  140. - :ref:`bool<class_bool>` **_set** **(** :ref:`String<class_String>` property, :ref:`Variant<class_Variant>` value **)** virtual
  141. Sets a property. Returns ``true`` if the ``property`` exists.
  142. .. _class_Object_add_user_signal:
  143. - void **add_user_signal** **(** :ref:`String<class_String>` signal, :ref:`Array<class_Array>` arguments=[ ] **)**
  144. Adds a user-defined ``signal``. Arguments are optional, but can be added as an :ref:`Array<class_Array>` of dictionaries, each containing "name" and "type" (from :ref:`@GlobalScope<class_@GlobalScope>` TYPE\_\*).
  145. .. _class_Object_call:
  146. - :ref:`Variant<class_Variant>` **call** **(** :ref:`String<class_String>` method **)** vararg
  147. Calls the ``method`` on the object and returns a result. Pass parameters as a comma separated list.
  148. .. _class_Object_call_deferred:
  149. - :ref:`Variant<class_Variant>` **call_deferred** **(** :ref:`String<class_String>` method **)** vararg
  150. Calls the ``method`` on the object during idle time and returns a result. Pass parameters as a comma separated list.
  151. .. _class_Object_callv:
  152. - :ref:`Variant<class_Variant>` **callv** **(** :ref:`String<class_String>` method, :ref:`Array<class_Array>` arg_array **)**
  153. Calls the ``method`` on the object and returns a result. Pass parameters as an :ref:`Array<class_Array>`.
  154. .. _class_Object_can_translate_messages:
  155. - :ref:`bool<class_bool>` **can_translate_messages** **(** **)** const
  156. Returns ``true`` if the object can translate strings.
  157. .. _class_Object_connect:
  158. - :ref:`Error<enum_@GlobalScope_Error>` **connect** **(** :ref:`String<class_String>` signal, :ref:`Object<class_Object>` target, :ref:`String<class_String>` method, :ref:`Array<class_Array>` binds=[ ], :ref:`int<class_int>` flags=0 **)**
  159. Connects a ``signal`` to a ``method`` on a ``target`` object. Pass optional ``binds`` to the call. Use ``flags`` to set deferred or one shot connections. See ``CONNECT_*`` constants. A ``signal`` can only be connected once to a ``method``. It will throw an error if already connected. To avoid this, first use :ref:`is_connected<class_Object_is_connected>` to check for existing connections.
  160. .. _class_Object_disconnect:
  161. - void **disconnect** **(** :ref:`String<class_String>` signal, :ref:`Object<class_Object>` target, :ref:`String<class_String>` method **)**
  162. Disconnects a ``signal`` from a ``method`` on the given ``target``.
  163. .. _class_Object_emit_signal:
  164. - :ref:`Variant<class_Variant>` **emit_signal** **(** :ref:`String<class_String>` signal **)** vararg
  165. Emits the given ``signal``.
  166. .. _class_Object_free:
  167. - void **free** **(** **)**
  168. Deletes the object from memory.
  169. .. _class_Object_get:
  170. - :ref:`Variant<class_Variant>` **get** **(** :ref:`String<class_String>` property **)** const
  171. Returns a :ref:`Variant<class_Variant>` for a ``property``.
  172. .. _class_Object_get_class:
  173. - :ref:`String<class_String>` **get_class** **(** **)** const
  174. Returns the object's class as a :ref:`String<class_String>`.
  175. .. _class_Object_get_incoming_connections:
  176. - :ref:`Array<class_Array>` **get_incoming_connections** **(** **)** const
  177. Returns an :ref:`Array<class_Array>` of dictionaries with information about signals that are connected to the object.
  178. Inside each :ref:`Dictionary<class_Dictionary>` there are 3 fields:
  179. - "source" is a reference to signal emitter.
  180. - "signal_name" is name of connected signal.
  181. - "method_name" is a name of method to which signal is connected.
  182. .. _class_Object_get_indexed:
  183. - :ref:`Variant<class_Variant>` **get_indexed** **(** :ref:`NodePath<class_NodePath>` property **)** const
  184. Get indexed object property by String.
  185. Property indices get accessed with colon separation, for example: ``position:x``
  186. .. _class_Object_get_instance_id:
  187. - :ref:`int<class_int>` **get_instance_id** **(** **)** const
  188. Returns the object's unique instance ID.
  189. .. _class_Object_get_meta:
  190. - :ref:`Variant<class_Variant>` **get_meta** **(** :ref:`String<class_String>` name **)** const
  191. Returns the object's metadata for the given ``name``.
  192. .. _class_Object_get_meta_list:
  193. - :ref:`PoolStringArray<class_PoolStringArray>` **get_meta_list** **(** **)** const
  194. Returns the object's metadata as a :ref:`PoolStringArray<class_PoolStringArray>`.
  195. .. _class_Object_get_method_list:
  196. - :ref:`Array<class_Array>` **get_method_list** **(** **)** const
  197. Returns the object's methods and their signatures as an :ref:`Array<class_Array>`.
  198. .. _class_Object_get_property_list:
  199. - :ref:`Array<class_Array>` **get_property_list** **(** **)** const
  200. Returns the list of properties as an :ref:`Array<class_Array>` of dictionaries. Dictionaries contain: name:String, type:int (see TYPE\_\* enum in :ref:`@GlobalScope<class_@GlobalScope>`) and optionally: hint:int (see PROPERTY_HINT\_\* in :ref:`@GlobalScope<class_@GlobalScope>`), hint_string:String, usage:int (see PROPERTY_USAGE\_\* in :ref:`@GlobalScope<class_@GlobalScope>`).
  201. .. _class_Object_get_script:
  202. - :ref:`Reference<class_Reference>` **get_script** **(** **)** const
  203. Returns the object's :ref:`Script<class_Script>` or ``null`` if one doesn't exist.
  204. .. _class_Object_get_signal_connection_list:
  205. - :ref:`Array<class_Array>` **get_signal_connection_list** **(** :ref:`String<class_String>` signal **)** const
  206. Returns an :ref:`Array<class_Array>` of connections for the given ``signal``.
  207. .. _class_Object_get_signal_list:
  208. - :ref:`Array<class_Array>` **get_signal_list** **(** **)** const
  209. Returns the list of signals as an :ref:`Array<class_Array>` of dictionaries.
  210. .. _class_Object_has_meta:
  211. - :ref:`bool<class_bool>` **has_meta** **(** :ref:`String<class_String>` name **)** const
  212. Returns ``true`` if a metadata is found with the given ``name``.
  213. .. _class_Object_has_method:
  214. - :ref:`bool<class_bool>` **has_method** **(** :ref:`String<class_String>` method **)** const
  215. Returns ``true`` if the object contains the given ``method``.
  216. .. _class_Object_has_user_signal:
  217. - :ref:`bool<class_bool>` **has_user_signal** **(** :ref:`String<class_String>` signal **)** const
  218. Returns ``true`` if the given user-defined ``signal`` exists.
  219. .. _class_Object_is_blocking_signals:
  220. - :ref:`bool<class_bool>` **is_blocking_signals** **(** **)** const
  221. Returns ``true`` if signal emission blocking is enabled.
  222. .. _class_Object_is_class:
  223. - :ref:`bool<class_bool>` **is_class** **(** :ref:`String<class_String>` type **)** const
  224. Returns ``true`` if the object inherits from the given ``type``.
  225. .. _class_Object_is_connected:
  226. - :ref:`bool<class_bool>` **is_connected** **(** :ref:`String<class_String>` signal, :ref:`Object<class_Object>` target, :ref:`String<class_String>` method **)** const
  227. Returns ``true`` if a connection exists for a given ``signal``, ``target``, and ``method``.
  228. .. _class_Object_is_queued_for_deletion:
  229. - :ref:`bool<class_bool>` **is_queued_for_deletion** **(** **)** const
  230. Returns ``true`` if the ``queue_free`` method was called for the object.
  231. .. _class_Object_notification:
  232. - void **notification** **(** :ref:`int<class_int>` what, :ref:`bool<class_bool>` reversed=false **)**
  233. Notify the object of something.
  234. .. _class_Object_property_list_changed_notify:
  235. - void **property_list_changed_notify** **(** **)**
  236. .. _class_Object_set:
  237. - void **set** **(** :ref:`String<class_String>` property, :ref:`Variant<class_Variant>` value **)**
  238. Set property into the object.
  239. .. _class_Object_set_block_signals:
  240. - void **set_block_signals** **(** :ref:`bool<class_bool>` enable **)**
  241. If set to true, signal emission is blocked.
  242. .. _class_Object_set_deferred:
  243. - void **set_deferred** **(** :ref:`String<class_String>` property, :ref:`Variant<class_Variant>` value **)**
  244. .. _class_Object_set_indexed:
  245. - void **set_indexed** **(** :ref:`NodePath<class_NodePath>` property, :ref:`Variant<class_Variant>` value **)**
  246. .. _class_Object_set_message_translation:
  247. - void **set_message_translation** **(** :ref:`bool<class_bool>` enable **)**
  248. Define whether the object can translate strings (with calls to :ref:`tr<class_Object_tr>`). Default is true.
  249. .. _class_Object_set_meta:
  250. - void **set_meta** **(** :ref:`String<class_String>` name, :ref:`Variant<class_Variant>` value **)**
  251. Set a metadata into the object. Metadata is serialized. Metadata can be *anything*.
  252. .. _class_Object_set_script:
  253. - void **set_script** **(** :ref:`Reference<class_Reference>` script **)**
  254. Set a script into the object, scripts extend the object functionality.
  255. .. _class_Object_tr:
  256. - :ref:`String<class_String>` **tr** **(** :ref:`String<class_String>` message **)** const
  257. Translate a message. Only works if message translation is enabled (which it is by default). See :ref:`set_message_translation<class_Object_set_message_translation>`.