From f41485fb88d2072a9cf693b1f955121559ef6da9 Mon Sep 17 00:00:00 2001 From: Lukas Tenbrink Date: Thu, 28 Aug 2025 13:40:32 +0200 Subject: [PATCH] Remove the architecture documentation for the editor (keeping it in the docs). Only the style guide remains on this site. --- engine/editor/creating_icons.rst | 94 ------------------- engine/editor/index.rst | 12 --- .../introduction_to_editor_development.rst | 88 ----------------- .../editor_style_guide.rst | 0 engine/guidelines/index.rst | 1 + index.rst | 1 - 6 files changed, 1 insertion(+), 195 deletions(-) delete mode 100644 engine/editor/creating_icons.rst delete mode 100644 engine/editor/index.rst delete mode 100644 engine/editor/introduction_to_editor_development.rst rename engine/{editor => guidelines}/editor_style_guide.rst (100%) diff --git a/engine/editor/creating_icons.rst b/engine/editor/creating_icons.rst deleted file mode 100644 index 374db2f..0000000 --- a/engine/editor/creating_icons.rst +++ /dev/null @@ -1,94 +0,0 @@ -.. _doc_editor_icons: - -Editor icons -============ - -When a new class is created and exposed to scripting, the editor's interface -will display it with a default icon representing the base class it inherits -from. In most cases, it's still recommended to create icons for new classes to -improve the user experience. - -Creating icons -~~~~~~~~~~~~~~ - -To create new icons, you first need a vector graphics editor installed. -For instance, you can use the open source `Inkscape `_ editor. - -Clone the ``godot`` repository containing all the editor icons: - -.. code-block:: bash - - git clone https://github.com/godotengine/godot.git - -The icons must be created in a vector graphics editor in SVG format. There are -two main requirements to follow: - -- Icons must be 16×16. In Inkscape, you can configure the document size in - **File > Document Properties**. -- Lines should be snapped to pixels whenever possible to remain crisp at lower DPI. - You can create a 16×16 grid in Inkscape to make this easier. - -Once you're satisfied with the icon's design, save the icon in the cloned -repository's ``editor/icons`` folder. The icon name should match the intended -name in a case-sensitive manner. For example, to create an icon for -CPUParticles2D, name the file ``CPUParticles2D.svg``. - -Color conversion for light editor themes -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -If the user has configured their editor to use a light theme, Godot will -convert the icon's colors based on a -`set of predefined color mappings `__. -This is to ensure the icon always displays with a sufficient contrast rate. -Try to restrict your icon's color palette to colors found in the list above. -Otherwise, your icon may become difficult to read on a light background. - -.. note:: - To enable color conversion for light editor themes: - 1. :ui:`Import > Import As > Texture2D` - 2. Set ``editor/convert_colors_with_editor_theme`` to ``true`` - -Icon optimization -~~~~~~~~~~~~~~~~~ - -Because the editor renders SVGs once at load time, they need to be small -in size so they can be efficiently parsed. When the -:ref:`pre-commit hook ` runs, it automatically optimizes -the SVG using `svgo `_. - -.. note:: - - While this optimization step won't impact the icon's quality noticeably, it - will still remove editor-only information such as guides. Therefore, it's - recommended to keep the source SVG around if you need to make further - changes. - -Integrating and sharing the icons -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -If you're contributing to the engine itself, you should make a pull request to -add optimized icons to ``editor/icons`` in the main repository. Recompile the -engine to make it pick up new icons for classes. - -It's also possible to create custom icons within a module. If you're creating -your own module and don't plan to integrate it with Godot, you don't need to -make a separate pull request for your icons to be available within the editor -as they can be self-contained. - -For specific instructions on how to create module icons, refer to -:ref:`Creating custom module icons`. - -Troubleshooting -~~~~~~~~~~~~~~~ - -If icons don't appear in the editor, make sure that: - -1. Each icon's filename matches the naming requirement as described previously. - -2. ``modules/svg`` is enabled (it should be enabled by default). Without it, - icons won't appear in the editor at all. - -References -~~~~~~~~~~ - -- `editor/icons `__ diff --git a/engine/editor/index.rst b/engine/editor/index.rst deleted file mode 100644 index 081fd47..0000000 --- a/engine/editor/index.rst +++ /dev/null @@ -1,12 +0,0 @@ -:allow_comments: False - -Contributing to the editor -========================== - -.. toctree:: - :maxdepth: 1 - :name: toc-devel-editor - - introduction_to_editor_development - creating_icons - editor_style_guide diff --git a/engine/editor/introduction_to_editor_development.rst b/engine/editor/introduction_to_editor_development.rst deleted file mode 100644 index f5d23b0..0000000 --- a/engine/editor/introduction_to_editor_development.rst +++ /dev/null @@ -1,88 +0,0 @@ -.. _doc_introduction_to_editor_development: - -Introduction to editor development -================================== - -On this page, you will learn: - -- The **design decisions** behind the Godot editor. -- How to work efficiently on the Godot editor's C++ code. - -This guide is aimed at current or future engine contributors. -To create editor plugins in GDScript, see :ref:`doc_making_plugins` instead. - -.. seealso:: - - If you are new to Godot, we recommended you to read - :ref:`doc_godot_design_philosophy` before continuing. Since the Godot editor - is a Godot project written in C++, much of the engine's philosophy applies - to the editor. - -Technical choices ------------------ - -The Godot editor is drawn using Godot's renderer and -:ref:`UI system `. It does *not* rely on a toolkit -such as GTK or Qt. This is similar in spirit to software like Blender. -While using toolkits makes it easier to achieve a "native" appearance, they are -also quite heavy and their licensing is not compatible with Godot's. - -The editor is fully written in C++. It can't contain any GDScript or C# code. - -Directory structure -------------------- - -The editor's code is fully self-contained in the -`editor/ `__ folder -of the Godot source repository. - -Some editor functionality is also implemented via -:ref:`modules `. Some of these are only enabled in -editor builds to decrease the binary size of export templates. See the -`modules/ `__ folder -in the Godot source repository. - -Some important files in the editor are: - -- `editor/editor_node.cpp `__: - Main editor initialization file. Effectively the "main scene" of the editor. -- `editor/project_manager.cpp `__: - Main Project Manager initialization file. Effectively the "main scene" of the Project Manager. -- `editor/plugins/canvas_item_editor_plugin.cpp `__: - The 2D editor viewport and related functionality (toolbar at the top, editing modes, overlaid helpers/panels, …). -- `editor/plugins/node_3d_editor_plugin.cpp `__: - The 3D editor viewport and related functionality (toolbar at the top, editing modes, overlaid panels, …). -- `editor/plugins/node_3d_editor_gizmos.cpp `__: - Where the 3D editor gizmos are defined and drawn. - This file doesn't have a 2D counterpart as 2D gizmos are drawn by the nodes themselves. - -Editor dependencies in ``scene/`` files ---------------------------------------- - -When working on an editor feature, you may have to modify files in -Godot's GUI nodes, which you can find in the ``scene/`` folder. - -One rule to keep in mind is that you must **not** introduce new dependencies to -``editor/`` includes in other folders such as ``scene/``. This applies even if -you use ``#ifdef TOOLS_ENABLED``. - -To make the codebase easier to follow and more self-contained, the allowed -dependency order is: - -- ``editor/`` -> ``scene/`` -> ``servers/`` -> ``core/`` - -This means that files in ``editor/`` can depend on includes from ``scene/``, -``servers/``, and ``core/``. But, for example, while ``scene/`` can depend on includes -from ``servers/`` and ``core/``, it cannot depend on includes from ``editor/``. - -Currently, there are some dependencies to ``editor/`` includes in ``scene/`` -files, but -`they are in the process of being removed `__. - -Development tips ----------------- - -To iterate quickly on the editor, we recommend to set up a test project and -:ref:`open it from the command line ` after compiling -the editor. This way, you don't have to go through the Project Manager every -time you start Godot. diff --git a/engine/editor/editor_style_guide.rst b/engine/guidelines/editor_style_guide.rst similarity index 100% rename from engine/editor/editor_style_guide.rst rename to engine/guidelines/editor_style_guide.rst diff --git a/engine/guidelines/index.rst b/engine/guidelines/index.rst index 0fa5663..9b308f2 100644 --- a/engine/guidelines/index.rst +++ b/engine/guidelines/index.rst @@ -10,6 +10,7 @@ This section explains guidelines for contributing to the engine. best_practices cpp_usage_guidelines code_style + editor_style_guide .. _doc_handling_compatibility_breakages: diff --git a/index.rst b/index.rst index 126b80f..822b3ca 100644 --- a/index.rst +++ b/index.rst @@ -55,7 +55,6 @@ for your topic of interest. You can also use the search function in the top-left engine/introduction engine/guidelines/index - engine/editor/index engine/unit_tests .. toctree::