classref: Sync with current master branch (f87858a8f)

This commit is contained in:
Yuri Sizov
2022-12-05 20:38:58 +03:00
parent 913ff5e602
commit a7745c4cc4
843 changed files with 158186 additions and 80821 deletions

View File

@@ -14,6 +14,8 @@ EditorScript
Base script that can be used to add extension functions to the editor.
.. rst-class:: classref-introduction-group
Description
-----------
@@ -54,51 +56,76 @@ Scripts extending this class and implementing its :ref:`_run<class_EditorScript_
\ **Note:** EditorScript is :ref:`RefCounted<class_RefCounted>`, meaning it is destroyed when nothing references it. This can cause errors during asynchronous operations if there are no references to the script.
.. rst-class:: classref-reftable-group
Methods
-------
+-----------------------------------------------+--------------------------------------------------------------------------------------------------------+
| void | :ref:`_run<class_EditorScript_method__run>` **(** **)** |virtual| |
+-----------------------------------------------+--------------------------------------------------------------------------------------------------------+
| void | :ref:`add_root_node<class_EditorScript_method_add_root_node>` **(** :ref:`Node<class_Node>` node **)** |
+-----------------------------------------------+--------------------------------------------------------------------------------------------------------+
| :ref:`EditorInterface<class_EditorInterface>` | :ref:`get_editor_interface<class_EditorScript_method_get_editor_interface>` **(** **)** |
+-----------------------------------------------+--------------------------------------------------------------------------------------------------------+
| :ref:`Node<class_Node>` | :ref:`get_scene<class_EditorScript_method_get_scene>` **(** **)** |
+-----------------------------------------------+--------------------------------------------------------------------------------------------------------+
.. table::
:widths: auto
+-----------------------------------------------+--------------------------------------------------------------------------------------------------------+
| void | :ref:`_run<class_EditorScript_method__run>` **(** **)** |virtual| |
+-----------------------------------------------+--------------------------------------------------------------------------------------------------------+
| void | :ref:`add_root_node<class_EditorScript_method_add_root_node>` **(** :ref:`Node<class_Node>` node **)** |
+-----------------------------------------------+--------------------------------------------------------------------------------------------------------+
| :ref:`EditorInterface<class_EditorInterface>` | :ref:`get_editor_interface<class_EditorScript_method_get_editor_interface>` **(** **)** |
+-----------------------------------------------+--------------------------------------------------------------------------------------------------------+
| :ref:`Node<class_Node>` | :ref:`get_scene<class_EditorScript_method_get_scene>` **(** **)** |
+-----------------------------------------------+--------------------------------------------------------------------------------------------------------+
.. rst-class:: classref-section-separator
----
.. rst-class:: classref-descriptions-group
Method Descriptions
-------------------
.. _class_EditorScript_method__run:
- void **_run** **(** **)** |virtual|
.. rst-class:: classref-method
void **_run** **(** **)** |virtual|
This method is executed by the Editor when **File > Run** is used.
.. rst-class:: classref-item-separator
----
.. _class_EditorScript_method_add_root_node:
- void **add_root_node** **(** :ref:`Node<class_Node>` node **)**
.. rst-class:: classref-method
void **add_root_node** **(** :ref:`Node<class_Node>` node **)**
Adds ``node`` as a child of the root node in the editor context.
\ **Warning:** The implementation of this method is currently disabled.
.. rst-class:: classref-item-separator
----
.. _class_EditorScript_method_get_editor_interface:
- :ref:`EditorInterface<class_EditorInterface>` **get_editor_interface** **(** **)**
.. rst-class:: classref-method
:ref:`EditorInterface<class_EditorInterface>` **get_editor_interface** **(** **)**
Returns the :ref:`EditorInterface<class_EditorInterface>` singleton instance.
.. rst-class:: classref-item-separator
----
.. _class_EditorScript_method_get_scene:
- :ref:`Node<class_Node>` **get_scene** **(** **)**
.. rst-class:: classref-method
:ref:`Node<class_Node>` **get_scene** **(** **)**
Returns the Editor's currently active scene.