From f3cd7e380826d14ff7fb12f9ae73c2cd44b53713 Mon Sep 17 00:00:00 2001 From: Hugo Locurcio Date: Tue, 14 Apr 2020 22:09:21 +0200 Subject: [PATCH] Document how some editor classes should be accessed as singletons only This closes #37687. (cherry picked from commit a225265b0a7308f0856c953f57168c490d54995e) --- doc/classes/EditorFileSystem.xml | 1 + doc/classes/EditorInspector.xml | 3 ++- doc/classes/EditorInterface.xml | 1 + doc/classes/EditorResourcePreview.xml | 1 + doc/classes/EditorSelection.xml | 1 + doc/classes/EditorSettings.xml | 1 + doc/classes/ScriptEditor.xml | 1 + 7 files changed, 8 insertions(+), 1 deletion(-) diff --git a/doc/classes/EditorFileSystem.xml b/doc/classes/EditorFileSystem.xml index 9f994e9c7ee..aa4128fea91 100644 --- a/doc/classes/EditorFileSystem.xml +++ b/doc/classes/EditorFileSystem.xml @@ -5,6 +5,7 @@ This object holds information of all resources in the filesystem, their types, etc. + [b]Note:[/b] This class shouldn't be instantiated directly. Instead, access the singleton using [method EditorInterface.get_resource_filesystem]. diff --git a/doc/classes/EditorInspector.xml b/doc/classes/EditorInspector.xml index 3ed642a6a65..f503cb6a075 100644 --- a/doc/classes/EditorInspector.xml +++ b/doc/classes/EditorInspector.xml @@ -4,7 +4,8 @@ A tab used to edit properties of the selected node. - The editor inspector is by default located on the right-hand side of the editor. It's used to edit the properties of the selected node. For example, you can select a node such as Sprite2D then edit its transform through the inspector tool. The editor inspector is an essential tool in the game development workflow. + The editor inspector is by default located on the right-hand side of the editor. It's used to edit the properties of the selected node. For example, you can select a node such as [Sprite] then edit its transform through the inspector tool. The editor inspector is an essential tool in the game development workflow. + [b]Note:[/b] This class shouldn't be instantiated directly. Instead, access the singleton using [method EditorInterface.get_inspector]. diff --git a/doc/classes/EditorInterface.xml b/doc/classes/EditorInterface.xml index 91e3339e43c..8a07b25245a 100644 --- a/doc/classes/EditorInterface.xml +++ b/doc/classes/EditorInterface.xml @@ -5,6 +5,7 @@ EditorInterface gives you control over Godot editor's window. It allows customizing the window, saving and (re-)loading scenes, rendering mesh previews, inspecting and editing resources and objects, and provides access to [EditorSettings], [EditorFileSystem], [EditorResourcePreview], [ScriptEditor], the editor viewport, and information about scenes. + [b]Note:[/b] This class shouldn't be instantiated directly. Instead, access the singleton using [method EditorPlugin.get_editor_interface]. diff --git a/doc/classes/EditorResourcePreview.xml b/doc/classes/EditorResourcePreview.xml index c3a52fbc78a..d1776dc2374 100644 --- a/doc/classes/EditorResourcePreview.xml +++ b/doc/classes/EditorResourcePreview.xml @@ -5,6 +5,7 @@ This object is used to generate previews for resources of files. + [b]Note:[/b] This class shouldn't be instantiated directly. Instead, access the singleton using [method EditorInterface.get_resource_previewer]. diff --git a/doc/classes/EditorSelection.xml b/doc/classes/EditorSelection.xml index c097bfe18c2..1938a3eb122 100644 --- a/doc/classes/EditorSelection.xml +++ b/doc/classes/EditorSelection.xml @@ -5,6 +5,7 @@ This object manages the SceneTree selection in the editor. + [b]Note:[/b] This class shouldn't be instantiated directly. Instead, access the singleton using [method EditorInterface.get_selection]. diff --git a/doc/classes/EditorSettings.xml b/doc/classes/EditorSettings.xml index 1d6e86b968a..5a2a301ba53 100644 --- a/doc/classes/EditorSettings.xml +++ b/doc/classes/EditorSettings.xml @@ -11,6 +11,7 @@ settings.get(prop) list_of_settings = settings.get_property_list() [/codeblock] + [b]Note:[/b] This class shouldn't be instantiated directly. Instead, access the singleton using [method EditorInterface.get_editor_settings]. diff --git a/doc/classes/ScriptEditor.xml b/doc/classes/ScriptEditor.xml index 62ba839ed72..8c1c69f7376 100644 --- a/doc/classes/ScriptEditor.xml +++ b/doc/classes/ScriptEditor.xml @@ -4,6 +4,7 @@ Godot editor's script editor. + [b]Note:[/b] This class shouldn't be instantiated directly. Instead, access the singleton using [method EditorInterface.get_script_editor].