diff --git a/tutorials/editor/docks.rst b/tutorials/editor/docks.rst new file mode 100644 index 00000000000..c0774cb9638 --- /dev/null +++ b/tutorials/editor/docks.rst @@ -0,0 +1,21 @@ +.. _doc_docks: + +Docks +----- + +Docks or tabs are positioned on the left and right sides of the viewport. +Their usage is covered in their respective pages. + +.. toctree:: + :maxdepth: 1 + :name: toc-editor-docks + + import_dock + filesystem_dock + inspector_dock + node_dock + history_dock + + +You can also customize the docks by moving, or resizing them. +Read :ref:`doc_customizing_editor` for more on this. diff --git a/tutorials/editor/filesystem_dock.rst b/tutorials/editor/filesystem_dock.rst new file mode 100644 index 00000000000..a5f9dd4aabf --- /dev/null +++ b/tutorials/editor/filesystem_dock.rst @@ -0,0 +1,72 @@ +.. _doc_filesystem_dock: + +FileSystem Dock +=============== + +FileSystem dock contains lists all resources available for the current project. +You can think it as a built-in file browser in the Godot's Editor. +The root folder is the :ref:`res:// <doc_filesystem>` folder. + +.. image:: img/filesystem_dock.webp + +The "<" and ">" arrows navigate between the previous and next selected file in the view history. +The text field next to the arrows shows the relative path to the selected file or folder. +Below this field is the location of all files and folders in the project. + +The button next to the relative path field switches through the look of the contents. +The square shows the resources in tree view, which the files and folders share the same location. +Clicking on this button changes the split mode of the folders and files. +Clicking once lists the folders above and the subfolders or the files inside +the folders below. Clicking it again moves the folders to the left, and the subfolders and +the files to the right. + +In any viewing mode, you can use the "Filter Files" bar to search for a file or folder. +The button next to this bar provides a set of sorting options for the contents. +You can sort the contents by name, type, or modification time, in ascending or descending order. + +If using a split mode, you can also change the look of thumbnails in the files section, by pressing +the button next to the sort button. + +The blue ``.tscn`` file (Scene File) in the file list means that this scene is the main scene +if the project. +You can right click on any other scene files and choose "Set As Main Scene" to change it. +This can also later be changed via navigating to `Project > Project Settings > Run`. +You can also `instantiate` the scene or create a new scene by `inheriting` it using the context +menu on the scene files. + +Hovering over a file gives information on the file size and the type. +Some resources can be dragged and dropped onto the 2D or 3D viewport if they are supported. +If a resource is accepted as a sub-resource, you can also drag it onto a sub-resource section +inside the Inspector dock. + +.. Refer to :ref:`doc_inspector_dock` + +Right-clicking on a folder or a file provides a set of options such as renaming, deleting, moving, +or duplicating. + +Some of the interesting options are the following: + +Note that, not all items will be visible for a single type of file. + +- **Edit Dependencies...**: Shows a window with files that this file depends on. If you have + missing dependencies, you can also pick replacements to fix them. +- **View Owners...**: Opens a window which shows the owners of a file. You can click on a result to + open it. +- **Create New**: Lets you create a new folder, scene, script, resource, or a text file inside a folder. +- **Copy Path**: Copies the relative path of the file or folder starting with ``res://``. +- **Copy Absolute Path**: Copies the absolute system path of a file or folder start. +- **Copy UID**: Copies the unique identifier of a resource if it has one. The path will start with ``uid://``. + The UID will not change when the item is renamed or moved. See :ref:`ResourceUID <class_ResourceUID>` for more. +- **Add to Favorites**: Adds the selected file or folder to the favorites which will can easily be seen + under `Favorites` section in the resource list. +- **Reimport**: If this file is a non-native resource, you can reimport them. + +If you right click on a folder, you will have options to expand a folder or the hierarchy, or collapse it. +Also, "Set Folder Color..." submenu will be visible to change the color of the folder. + +.. tip:: To move an item from one folder to another, you can drag and drop it directly onto + the destination folder. + +.. tip:: Double-clicking a file opens the file if it can be opened inside the Editor. + +.. seealso:: Refer to :ref:`doc_customizing_editor` for dock customization options. diff --git a/tutorials/editor/history_dock.rst b/tutorials/editor/history_dock.rst new file mode 100644 index 00000000000..ef2747cce08 --- /dev/null +++ b/tutorials/editor/history_dock.rst @@ -0,0 +1,26 @@ +.. _doc_history_dock: + +History Dock +============ + +If you are unhappy with a recent setting change you made in Godot, or you prefer the +previous value of a node property, Godot keeps a list of actions in the `History` dock. +This history of actions is separate for each scene and is remembered until you close +the project. + +.. image:: img/history_dock.webp + +If you click on an item, the project will be reverted to that state. If you do not +make any changes, you can change the state back and forth without losing anything. + +You can choose whether to display the `Scene` related actions and also include `Global` +changes, such as changing an editor setting in Godot's Editor. Global changes will be +displayed in blue text. + +.. warning:: The changes made in the script/text editor are not displayed here. + +.. tip:: Alternatively, you can use the `Scene` menu and select `Undo` or `Redo`, or use + the default :kbd:`Ctrl + Z` or :kbd:`Ctrl + Y` shortcuts (:kbd:`Cmd + Z` or + :kbd:`Cmd + Z` on Mac). + +.. seealso:: Refer to :ref:`doc_customizing_editor` for dock customization options. diff --git a/tutorials/editor/img/editor_ui_main_menus.webp b/tutorials/editor/img/editor_ui_main_menus.webp new file mode 100644 index 00000000000..5e86bcb4df8 Binary files /dev/null and b/tutorials/editor/img/editor_ui_main_menus.webp differ diff --git a/tutorials/editor/img/filesystem_dock.webp b/tutorials/editor/img/filesystem_dock.webp new file mode 100644 index 00000000000..3a2c3a8968b Binary files /dev/null and b/tutorials/editor/img/filesystem_dock.webp differ diff --git a/tutorials/editor/img/history_dock.webp b/tutorials/editor/img/history_dock.webp new file mode 100644 index 00000000000..a4bbb8545f7 Binary files /dev/null and b/tutorials/editor/img/history_dock.webp differ diff --git a/tutorials/editor/img/import_dock_ogg.webp b/tutorials/editor/img/import_dock_ogg.webp new file mode 100644 index 00000000000..d7f74a03a8f Binary files /dev/null and b/tutorials/editor/img/import_dock_ogg.webp differ diff --git a/tutorials/editor/img/node_dock.webp b/tutorials/editor/img/node_dock.webp new file mode 100644 index 00000000000..548cb72671e Binary files /dev/null and b/tutorials/editor/img/node_dock.webp differ diff --git a/tutorials/editor/img/node_dock_connection.webp b/tutorials/editor/img/node_dock_connection.webp new file mode 100644 index 00000000000..61fc2b6518e Binary files /dev/null and b/tutorials/editor/img/node_dock_connection.webp differ diff --git a/tutorials/editor/img/node_dock_signals.webp b/tutorials/editor/img/node_dock_signals.webp new file mode 100644 index 00000000000..fbb70fe21a4 Binary files /dev/null and b/tutorials/editor/img/node_dock_signals.webp differ diff --git a/tutorials/editor/img/overview_debug.webp b/tutorials/editor/img/overview_debug.webp new file mode 100644 index 00000000000..f19105210bd Binary files /dev/null and b/tutorials/editor/img/overview_debug.webp differ diff --git a/tutorials/editor/img/receiver.webp b/tutorials/editor/img/receiver.webp new file mode 100644 index 00000000000..467d4666abe Binary files /dev/null and b/tutorials/editor/img/receiver.webp differ diff --git a/tutorials/editor/img/signal.webp b/tutorials/editor/img/signal.webp new file mode 100644 index 00000000000..c81933e5376 Binary files /dev/null and b/tutorials/editor/img/signal.webp differ diff --git a/tutorials/editor/import_dock.rst b/tutorials/editor/import_dock.rst new file mode 100644 index 00000000000..d3da7755811 --- /dev/null +++ b/tutorials/editor/import_dock.rst @@ -0,0 +1,22 @@ +.. _doc_import_dock: + +Import Dock +=========== + +The Import dock allows you to change the importing parameters of non-native resources +before importing them into your project. + +By default, it is located next to the Scene Dock. + +.. figure:: img/import_dock_ogg.webp + :alt: Adjustable parameters while importing an OGG file + + Adjustable parameters while importing an OGG file + +It employs numerous parameters for different types, therefore the detailed usage is +explained in :ref:`doc_import_process`. + +To see in detail which parameters you can change, choose the respective type's class reference +from :ref:`ResourceImporter <class_ResourceImporter>`. + +.. seealso:: Refer to :ref:`doc_customizing_editor` for dock customization options. diff --git a/tutorials/editor/index.rst b/tutorials/editor/index.rst index c849a7f9462..e437c38c156 100644 --- a/tutorials/editor/index.rst +++ b/tutorials/editor/index.rst @@ -27,6 +27,7 @@ in other sections where appropriate. For example, the :ref:`animation editor script_editor default_key_mapping customizing_editor + docks XR editor --------- diff --git a/tutorials/editor/node_dock.rst b/tutorials/editor/node_dock.rst new file mode 100644 index 00000000000..f1936792024 --- /dev/null +++ b/tutorials/editor/node_dock.rst @@ -0,0 +1,100 @@ +.. _doc_node_dock: + +Node Dock +========= + +The Node dock has two tabs: + +.. image:: img/node_dock.webp + +**Signals** tab allows you work with node's signals and the behaviours when a specific +event happens. +**Groups** in Godot are similar to tagging nodes to call a method on all nodes belonging +to a group. + +Below, we will explain more about these two tabs. + +.. seealso:: Refer to :ref:`doc_customizing_editor` for dock customization options. + +Signals +------- + +The **Signals** tab lists the signals of the selected node in the Scene dock which the node can emit. +The list contains all node's own and the inherited signals. For example, if the selected +node is a :ref:`Button <class_Button>`, it contains the signal list from +:ref:`BaseButton <class_BaseButton>`, :ref:`Control <class_Control>`, +:ref:`CanvasItem <class_CanvasItem>`, :ref:`Node <class_Node>`, and :ref:`Object <class_Object>`. + +.. image:: img/node_dock_signals.webp + +.. |receiver| image:: img/receiver.webp +.. |signal| image:: img/signal.webp + +If a signal has one or more receivers, you'll see them just below the signal with the green +|receiver| icon. +If the signal is connected via this method, you will also see the same icon next to the receiver +function if you open the script in the text editor. + +Hovering over a signal name displays a description with information on when this signal is emitted. +Double-click on a signal depicted with the |signal| icon or select it, then press +the `Connect...` button to open the connection window. + +.. image:: img/node_dock_connection.webp + +In this window, `From Signal` is the signal selected to connect from. +`Connect to Node` is used to select an existing script from the list of nodes in the current scene +to create the method with the value of the `Receiver Method` field, or use the existing one. +By default, this name will be **_on_node_name_signal_name** and can be changed to your liking. + +.. note:: Note that this window does not create a new script file. + You need to attach a script to a node in advance to use it in this window. + You can identify the nodes with the script next to their names by the script icon. + +If you want to create a new receiver method or use an existing in the same node which the emits the signal, +you can press the "Go to Source" button to select that node. + +If you have a high number of nodes in the scene, you can use the `Filter Nodes` bar to +limit the nodes being displayed as you type. + +Selecting a node and pressing the `Pick` button opens another window and shows the list of +methods defined in the node's attached script. +By default, only the "Script Methods" and "Compatible Methods" are visible. You can disable +these options to get a list of all methods in the script or all methods of the +selected node's class. + +Pressing "Connect" button will create the method if it does not exist, and add the default +arguments to the script. + +.. seealso:: You can also connect signals via code. To see a comprehensive tutorial on signals, + refer to :ref:`doc_signals`. + +You can right click on signals on the Signals tab to connect another +method, disconnect all methods, copy its name, or to open its documentation using built-in +documentation viewer. +Similarly, you can right click on a receiving method to edit its parameters, go to the method, +or to disconnect. Pressing :kbd:`Delete` key after selecting a receiver method or using +the "Disconnect" button on the bottom right also disconnects the method. + +.. note:: Disconnected methods are not deleted from the script. + +You can also enable "Advanced" mode by checking it next to the receiver method. +This mode lets you add extra arbitrary call arguments with the defined types. +You can also specify the default values for these arguments. + +"Unbind Signal Arguments" field lets you select how many of the signal's `default` +arguments will be dropped by the emitter. +Default arguments of a signal can be seen inside brackets. +A value larger than zero (0) will start dropping the arguments from right. + + +"Deferred" option defers the signal only firing it at idle time. +"One Shot" option disconnects the signal after its first emission. + +Groups +------ + +The `Groups` tab lists the groups which the node is a part of. +Groups are basically tags which you can call methods on multiple objects +which belong to a group. + +Groups' behaviour is explained in :ref:`doc_groups`.