From dd6443193cbf249c686105c20481283ec63a5f45 Mon Sep 17 00:00:00 2001 From: A Thousand Ships <96648715+AThousandShips@users.noreply.github.com> Date: Fri, 21 Jun 2024 12:47:17 +0200 Subject: [PATCH] [Editor] Expose more editor settings to documentation Co-authored-by: Tomasz Chabora --- doc/classes/EditorSettings.xml | 168 ++++++++++++++++++ .../debug_adapter/debug_adapter_server.cpp | 1 + editor/debugger/editor_file_server.cpp | 3 - editor/editor_help.cpp | 2 - ...editor_native_shader_source_visualizer.cpp | 2 +- editor/editor_settings.cpp | 76 ++++++++ editor/export/editor_export_plugin.cpp | 5 - editor/export/editor_export_plugin.h | 2 - .../plugins/asset_library_editor_plugin.cpp | 3 +- editor/plugins/bone_map_editor_plugin.cpp | 6 - .../audio_stream_player_3d_gizmo_plugin.cpp | 2 +- .../plugins/gizmos/camera_3d_gizmo_plugin.cpp | 2 +- .../gizmos/cpu_particles_3d_gizmo_plugin.cpp | 2 +- editor/plugins/gizmos/decal_gizmo_plugin.cpp | 2 +- .../gizmos/fog_volume_gizmo_plugin.cpp | 2 +- .../gizmos/gpu_particles_3d_gizmo_plugin.cpp | 2 +- ...pu_particles_collision_3d_gizmo_plugin.cpp | 4 +- .../plugins/gizmos/joint_3d_gizmo_plugin.cpp | 4 +- .../gizmos/lightmap_gi_gizmo_plugin.cpp | 2 +- .../gizmos/lightmap_probe_gizmo_plugin.cpp | 2 +- .../occluder_instance_3d_gizmo_plugin.cpp | 2 +- .../gizmos/reflection_probe_gizmo_plugin.cpp | 2 +- ...ble_on_screen_notifier_3d_gizmo_plugin.cpp | 2 +- .../plugins/gizmos/voxel_gi_gizmo_plugin.cpp | 2 +- editor/plugins/node_3d_editor_plugin.cpp | 7 - editor/plugins/path_3d_editor_plugin.cpp | 7 +- editor/plugins/script_editor_plugin.cpp | 16 +- editor/plugins/skeleton_3d_editor_plugin.cpp | 7 - .../plugins/version_control_editor_plugin.cpp | 6 +- editor/scene_tree_dock.cpp | 4 - modules/csg/editor/csg_gizmos.cpp | 2 +- .../gdscript/editor/gdscript_highlighter.cpp | 1 + .../gdscript_language_server.cpp | 1 + .../gridmap/editor/grid_map_editor_plugin.cpp | 7 +- .../openxr/editor/openxr_select_runtime.cpp | 1 + platform/android/export/export.cpp | 1 + platform/ios/export/export.cpp | 1 + platform/macos/export/export.cpp | 1 + platform/web/export/export.cpp | 1 + platform/windows/export/export.cpp | 1 + 40 files changed, 283 insertions(+), 81 deletions(-) diff --git a/doc/classes/EditorSettings.xml b/doc/classes/EditorSettings.xml index 1de63b4a399..389d65e05a0 100644 --- a/doc/classes/EditorSettings.xml +++ b/doc/classes/EditorSettings.xml @@ -181,6 +181,9 @@ + + If [code]true[/code], the Asset Library uses multiple threads for its HTTP requests. This prevents the Asset Library from blocking the main thread for every loaded asset. + If [code]true[/code], automatically switches to the [b]Remote[/b] scene tree when running the project from the editor. If [code]false[/code], stays on the [b]Local[/b] scene tree when running the project from the editor. @@ -222,6 +225,12 @@ The tint intensity to use for the subresources background in the Inspector dock. The tint is used to distinguish between different subresources in the inspector. Higher values result in a more noticeable background color difference. + + If [code]true[/code], when a node is deleted with animation tracks referencing it, a confirmation dialog appears before the tracks are deleted. The dialog will appear even when using the "Delete (No Confirm)" shortcut. + + + If [code]true[/code], displays a confirmation dialog before left-clicking the "percent" icon next to a node name in the Scene tree dock. When clicked, this icon revokes the node's scene-unique name, which can impact the behavior of scripts that rely on this scene-unique name due to identifiers not being found anymore. + If [code]true[/code], the scene tree dock will automatically unfold nodes when a node that has folded parents is selected. @@ -327,6 +336,12 @@ If [code]true[/code], renders the grid on the YZ plane in perspective view. This can be useful for 3D side-scrolling games. + + Opacity of the default gizmo for moving, rotating, and scaling 3D nodes. + + + Size of the default gizmo for moving, rotating, and scaling 3D nodes. + If [code]true[/code], enables 3-button mouse emulation mode. This is useful on laptops when using a trackpad. When 3-button mouse emulation mode is enabled, the pan, zoom and orbit modifiers can always be used in the 3D editor viewport, even when not holding down any mouse button. @@ -355,6 +370,12 @@ The mouse button that needs to be held down to pan in the 3D editor viewport. + + If [code]true[/code], shows gizmos for moving and rotating the camera in the bottom corners of the 3D editor's viewport. Useful for devices that use touch screen. + + + If [code]true[/code], shows a small orientation gizmo in the top-right corner of the 3D editor's viewports. + If [code]true[/code], warps the mouse around the 3D viewport while panning in the 3D editor. This makes it possible to pan over a large area without having to exit panning and adjust the mouse cursor. @@ -391,12 +412,78 @@ The color to use for the AABB gizmo that displays the [GeometryInstance3D]'s custom [AABB]. + + The 3D editor gizmo color for [Camera3D]s. + + + The 3D editor gizmo color for CSG nodes (such as [CSGShape3D] or [CSGBox3D]). + + + The 3D editor gizmo color for [Decal] nodes. + + + The 3D editor gizmo color for [FogVolume] nodes. + The color override to use for 3D editor gizmos if the [Node3D] in question is part of an instantiated scene file (from the perspective of the current scene). The 3D editor gizmo color for [Joint3D]s and [PhysicalBone3D]s. + + Color for representing [member Joint3D.node_a] for some [Joint3D] types. + + + Color for representing [member Joint3D.node_b] for some [Joint3D] types. + + + Color of lines displayed in baked [LightmapGI] node's grid. + + + The 3D editor gizmo color used for [LightmapProbe] nodes. + + + The 3D editor gizmo color used for [OccluderInstance3D] nodes. + + + The 3D editor gizmo color used for [GPUParticlesAttractor3D] nodes. + + + The 3D editor gizmo color used for [GPUParticlesCollision3D] nodes. + + + The 3D editor gizmo color used for [CPUParticles3D] and [GPUParticles3D] nodes. + + + The 3D editor gizmo color used for [Path3D] tilt circles, which indicate the direction the [Curve3D] is tilted towards. + + + The 3D editor gizmo color used for [ReflectionProbe] nodes. + + + The 3D editor gizmo color used for the currently selected [Skeleton3D] bone. + + + The 3D editor gizmo color used for [Skeleton3D] nodes. + + + The 3D editor gizmo color used for [AudioStreamPlayer3D]'s emission angle. + + + The 3D editor gizmo color used for [VisibleOnScreenNotifier3D] and [VisibleOnScreenEnabler3D] nodes. + + + The 3D editor gizmo color used for [VoxelGI] nodes. + + + The length of [Skeleton3D] bone gizmos in the 3D editor. + + + The shape of [Skeleton3D] bone gizmos in the 3D editor. [b]Wire[/b] is a thin line, while [b]Octahedron[/b] is a set of lines that represent a thicker hollow line pointing in a specific direction (similar to most 3D animation software). + + + Size of the disk gizmo displayed when editing [Path3D]'s tilt handles. + If [code]true[/code], automatically updates animation tracks' target paths when renaming or reparenting nodes in the Scene tree dock. @@ -416,9 +503,26 @@ The modulate color to use for "past" frames displayed in the animation editor's onion skinning feature. + + + + + + + + + + Specifies the side of 3D editor's viewport where GridMap's mesh palette will appear. + + + Minimum width of GridMap's mesh palette side panel. + The maximum distance at which tiles can be placed on a GridMap, relative to the camera position (in 3D units). + + Texture size of mesh previews generated for GridMap's MeshLibrary. + The panning speed when using the mouse wheel or touchscreen events in the 2D editor. This setting does not apply to panning by holding down the middle or right mouse buttons. @@ -528,6 +632,13 @@ The size to use for port previews in the visual shader uniforms (toggled by clicking the "eye" icon next to an output). The value is defined in pixels at 100% zoom, and will scale with zoom automatically. + + Path to the SCP (secure copy) executable (used for remote deploy to desktop platforms). If left empty, the editor will attempt to run [code]scp[/code] from [code]PATH[/code]. + [b]Note:[/b] SCP is not the same as SFTP. Specifying the SFTP executable here will not work. + + + Path to the SSH executable (used for remote deploy to desktop platforms). If left empty, the editor will attempt to run [code]ssh[/code] from [code]PATH[/code]. + The folder where projects should be scanned for (recursively), in a way similar to the project manager's [b]Scan[/b] button. This can be set to the same value as [member filesystem/directories/default_project_path] for convenience. [b]Note:[/b] Setting this path to a folder with very large amounts of files/folders can slow down the project manager startup significantly. To keep the project manager quick to start up, it is recommended to set this value to a folder as "specific" as possible. @@ -573,6 +684,12 @@ The thumbnail size to use in the editor's file dialogs (in pixels). See also [member docks/filesystem/thumbnail_size]. + + Password used for file server when exporting project with remote file system. + + + Port used for file server when exporting project with remote file system. + The path to the directory containing the Blender executable used for converting the Blender 3D scene files [code].blend[/code] to glTF 2.0 format during import. Blender 3.0 or later is required. To enable this feature for your specific project, use [member ProjectSettings.filesystem/import/blender/enabled]. @@ -759,6 +876,12 @@ Depending on the platform and used renderer, the engine will fall back to [b]Enabled[/b] if the desired mode is not supported. [b]Note:[/b] V-Sync modes other than [b]Enabled[/b] are only supported in the Forward+ and Mobile rendering methods, not Compatibility. + + If [code]true[/code], when extending a script, the global class name of the script is inserted in the script creation dialog, if it exists. If [code]false[/code], the script's file path is always inserted. + + + If [code]true[/code], the Scene dock will display buttons to quickly add a root node to a newly created scene. + If [code]true[/code], automatically expands property groups in the Inspector dock when opening a scene that hasn't been opened previously. If [code]false[/code], all groups remain collapsed by default. @@ -1052,6 +1175,9 @@ The space to add between lines (in pixels). Greater line spacing can help improve readability at the cost of displaying fewer lines on screen. + + If [code]true[/code], tool scripts will be automatically soft-reloaded after they are saved. + If [code]true[/code], automatically reloads scripts in the editor when they have been modified and saved by external editors. @@ -1061,6 +1187,9 @@ If [code]true[/code], converts indentation to match the script editor's indentation settings when saving a script. See also [member text_editor/behavior/indent/type]. + + If [code]true[/code], opening a scene automatically opens the script attached to the root node, or the topmost node if the root has no script. + If [code]true[/code], reopens scripts that were opened in the last session when the editor is reopened on a given project. @@ -1148,6 +1277,15 @@ If [code]true[/code], performs string autocompletion with single quotes. If [code]false[/code], performs string autocompletion with double quotes (which matches the [url=$DOCS_URL/tutorials/scripting/gdscript/gdscript_styleguide.html]GDScript style guide[/url]). + + The command-line arguments to pass to the external text editor that is run when [member text_editor/external/use_external_editor] is [code]true[/code]. See also [member text_editor/external/exec_path]. + + + The path to the text editor executable used to edit text files if [member text_editor/external/use_external_editor] is [code]true[/code]. + + + If [code]true[/code], uses an external editor instead of the built-in Script Editor. See also [member text_editor/external/exec_path] and [member text_editor/external/exec_flags]. + Controls which multi-line code blocks should be displayed in the editor help. This setting does not affect single-line code literals in the editor help. @@ -1163,6 +1301,21 @@ If [code]true[/code], displays a table of contents at the left of the editor help (at the location where the members overview would appear when editing a script). + + If [code]true[/code], the script's method list in the Script Editor is sorted alphabetically. + + + If [code]true[/code], class reference pages are grouped together at the bottom of the Script Editor's script list. + + + Specifies how script paths should be displayed in Script Editor's script list. If using the "Name" option and some scripts share the same file name, more parts of their paths are revealed to avoid conflicts. + + + If [code]true[/code], the names of recently opened scripts in the Script Editor are highlighted with the accent color, with its intensity based on how recently they were opened. + + + How many script names can be highlighted at most, if [member text_editor/script_list/script_temperature_enabled] is [code]true[/code]. Scripts older than this value use the default font color. + If [code]true[/code], displays an overview of the current script's member variables and functions at the left of the script editor. See also [member text_editor/script_list/sort_members_outline_alphabetically]. @@ -1170,6 +1323,9 @@ If [code]true[/code], sorts the members outline (located at the left of the script editor) using alphabetical order. If [code]false[/code], sorts the members outline depending on the order in which members are found in the script. [b]Note:[/b] Only effective if [member text_editor/script_list/show_members_overview] is [code]true[/code]. + + Specifies sorting used for Script Editor's open script list. + The syntax theme to use in the script editor. You can save your own syntax theme from your current settings by using [b]File > Theme > Save As...[/b] at the top of the script editor. The syntax theme will then be available locally in the list of color themes. @@ -1294,6 +1450,18 @@ The script editor's color for words highlighted by selecting them. Only visible if [member text_editor/appearance/caret/highlight_all_occurrences] is [code]true[/code]. + + The vertical line separation used in text editors, in pixels. + + + Path to private SSH key file for the editor's Version Control integration credentials. + + + Path to public SSH key file for the editor's Version Control integration credentials. + + + Default username for editor's Version Control integration. + diff --git a/editor/debugger/debug_adapter/debug_adapter_server.cpp b/editor/debugger/debug_adapter/debug_adapter_server.cpp index 6041fec06ca..0f4be147cfd 100644 --- a/editor/debugger/debug_adapter/debug_adapter_server.cpp +++ b/editor/debugger/debug_adapter/debug_adapter_server.cpp @@ -38,6 +38,7 @@ int DebugAdapterServer::port_override = -1; DebugAdapterServer::DebugAdapterServer() { + // TODO: Move to editor_settings.cpp _EDITOR_DEF("network/debug_adapter/remote_port", remote_port); _EDITOR_DEF("network/debug_adapter/request_timeout", protocol._request_timeout); _EDITOR_DEF("network/debug_adapter/sync_breakpoints", protocol._sync_breakpoints); diff --git a/editor/debugger/editor_file_server.cpp b/editor/debugger/editor_file_server.cpp index 1092b070542..116e6681ae7 100644 --- a/editor/debugger/editor_file_server.cpp +++ b/editor/debugger/editor_file_server.cpp @@ -271,9 +271,6 @@ void EditorFileServer::stop() { EditorFileServer::EditorFileServer() { server.instantiate(); - - EDITOR_DEF("filesystem/file_server/port", 6010); - EDITOR_DEF("filesystem/file_server/password", ""); } EditorFileServer::~EditorFileServer() { diff --git a/editor/editor_help.cpp b/editor/editor_help.cpp index f5f7b8f51cf..cfe257fcfc8 100644 --- a/editor/editor_help.cpp +++ b/editor/editor_help.cpp @@ -3134,8 +3134,6 @@ void EditorHelp::init_gdext_pointers() { EditorHelp::EditorHelp() { set_custom_minimum_size(Size2(150 * EDSCALE, 0)); - EDITOR_DEF("text_editor/help/sort_functions_alphabetically", true); - class_desc = memnew(RichTextLabel); class_desc->set_tab_size(8); add_child(class_desc); diff --git a/editor/editor_native_shader_source_visualizer.cpp b/editor/editor_native_shader_source_visualizer.cpp index 3d7d37c94e9..9ebf7d680e8 100644 --- a/editor/editor_native_shader_source_visualizer.cpp +++ b/editor/editor_native_shader_source_visualizer.cpp @@ -98,7 +98,7 @@ void EditorNativeShaderSourceVisualizer::_inspect_shader(RID p_shader) { code_edit->set_syntax_highlighter(syntax_highlighter); code_edit->add_theme_font_override(SceneStringName(font), get_theme_font("source", EditorStringName(EditorFonts))); code_edit->add_theme_font_size_override(SceneStringName(font_size), get_theme_font_size("source_size", EditorStringName(EditorFonts))); - code_edit->add_theme_constant_override("line_spacing", EDITOR_DEF("text_editor/theme/line_spacing", 6)); + code_edit->add_theme_constant_override("line_spacing", EDITOR_GET("text_editor/theme/line_spacing")); // Appearance: Caret code_edit->set_caret_type((TextEdit::CaretType)EDITOR_GET("text_editor/appearance/caret/type").operator int()); diff --git a/editor/editor_settings.cpp b/editor/editor_settings.cpp index d0c89c49c48..96a7700c34a 100644 --- a/editor/editor_settings.cpp +++ b/editor/editor_settings.cpp @@ -400,6 +400,9 @@ void EditorSettings::_load_defaults(Ref p_extra_config) { EDITOR_SETTING_USAGE(Variant::STRING, PROPERTY_HINT_ENUM, "interface/editor/editor_language", best, lang_hint, PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED); } + // Asset library + _initial_set("asset_library/use_threads", true); + /* Interface */ // Editor @@ -481,6 +484,10 @@ void EditorSettings::_load_defaults(Ref p_extra_config) { EDITOR_SETTING(Variant::INT, PROPERTY_HINT_ENUM, "interface/editor/vsync_mode", 1, "Disabled,Enabled,Adaptive,Mailbox") EDITOR_SETTING(Variant::BOOL, PROPERTY_HINT_NONE, "interface/editor/update_continuously", false, "") + _initial_set("interface/editors/show_scene_tree_root_selection", true); + _initial_set("interface/editors/derive_script_globals_by_name", true); + _initial_set("docks/scene_tree/ask_before_revoking_unique_name", true); + // Inspector EDITOR_SETTING(Variant::INT, PROPERTY_HINT_RANGE, "interface/inspector/max_array_dictionary_items_per_page", 20, "10,100,1") EDITOR_SETTING(Variant::BOOL, PROPERTY_HINT_NONE, "interface/inspector/show_low_level_opentype_features", false, "") @@ -571,6 +578,10 @@ void EditorSettings::_load_defaults(Ref p_extra_config) { _initial_set("filesystem/on_save/compress_binary_resources", true); _initial_set("filesystem/on_save/safe_save_on_backup_then_rename", true); + // EditorFileServer + _initial_set("filesystem/file_server/port", 6010); + _initial_set("filesystem/file_server/password", ""); + // File dialog _initial_set("filesystem/file_dialog/show_hidden_files", false); EDITOR_SETTING(Variant::INT, PROPERTY_HINT_ENUM, "filesystem/file_dialog/display_mode", 0, "Thumbnails,List") @@ -588,6 +599,7 @@ void EditorSettings::_load_defaults(Ref p_extra_config) { /* Docks */ // SceneTree + _initial_set("docks/scene_tree/ask_before_deleting_related_animation_tracks", true); _initial_set("docks/scene_tree/start_create_dialog_fully_expanded", false); _initial_set("docks/scene_tree/auto_expand_to_selected", true); _initial_set("docks/scene_tree/center_node_on_reparent", false); @@ -605,6 +617,7 @@ void EditorSettings::_load_defaults(Ref p_extra_config) { /* Text editor */ // Theme + _initial_set("text_editor/theme/line_spacing", 6); EDITOR_SETTING(Variant::STRING, PROPERTY_HINT_ENUM, "text_editor/theme/color_theme", "Default", "Default,Godot 2,Custom") // Theme: Highlighting @@ -669,10 +682,19 @@ void EditorSettings::_load_defaults(Ref p_extra_config) { _initial_set("text_editor/behavior/files/restore_scripts_on_load", true); _initial_set("text_editor/behavior/files/convert_indent_on_save", true); _initial_set("text_editor/behavior/files/auto_reload_scripts_on_external_change", false); + _initial_set("text_editor/behavior/files/auto_reload_and_parse_scripts_on_save", true); + _initial_set("text_editor/behavior/files/open_dominant_script_on_scene_change", false); // Script list _initial_set("text_editor/script_list/show_members_overview", true); _initial_set("text_editor/script_list/sort_members_outline_alphabetically", false); + _initial_set("text_editor/script_list/script_temperature_enabled", true); + _initial_set("text_editor/script_list/script_temperature_history_size", 15); + _initial_set("text_editor/script_list/group_help_pages", true); + EDITOR_SETTING(Variant::INT, PROPERTY_HINT_ENUM, "text_editor/script_list/sort_scripts_by", 0, "Name,Path,None"); + EDITOR_SETTING(Variant::INT, PROPERTY_HINT_ENUM, "text_editor/script_list/list_script_names_as", 0, "Name,Parent Directory And Name,Full Path"); + EDITOR_SETTING(Variant::STRING, PROPERTY_HINT_GLOBAL_FILE, "text_editor/external/exec_path", "", ""); + EDITOR_SETTING(Variant::STRING, PROPERTY_HINT_PLACEHOLDER_TEXT, "text_editor/external/exec_flags", "{file}", "Call flags with placeholders: {project}, {file}, {col}, {line}."); // Completion EDITOR_SETTING(Variant::FLOAT, PROPERTY_HINT_RANGE, "text_editor/completion/idle_parse_delay", 1.5, "0.1,10,0.01") @@ -687,17 +709,28 @@ void EditorSettings::_load_defaults(Ref p_extra_config) { _initial_set("text_editor/completion/use_single_quotes", false); _initial_set("text_editor/completion/colorize_suggestions", true); + // External editor (ScriptEditorPlugin) + _initial_set("text_editor/external/use_external_editor", false); + _initial_set("text_editor/external/exec_path", ""); + // Help _initial_set("text_editor/help/show_help_index", true); EDITOR_SETTING(Variant::INT, PROPERTY_HINT_RANGE, "text_editor/help/help_font_size", 16, "8,48,1") EDITOR_SETTING(Variant::INT, PROPERTY_HINT_RANGE, "text_editor/help/help_source_font_size", 15, "8,48,1") EDITOR_SETTING(Variant::INT, PROPERTY_HINT_RANGE, "text_editor/help/help_title_font_size", 23, "8,64,1") EDITOR_SETTING(Variant::INT, PROPERTY_HINT_ENUM, "text_editor/help/class_reference_examples", 0, "GDScript,C#,GDScript and C#") + _initial_set("text_editor/help/sort_functions_alphabetically", true); /* Editors */ // GridMap + // GridMapEditor _initial_set("editors/grid_map/pick_distance", 5000.0); + _initial_set("editors/grid_map/palette_min_width", 230); + set_restart_if_changed("editors/grid_map/palette_min_width", true); + _initial_set("editors/grid_map/preview_size", 64); + // GridMapEditorPlugin + EDITOR_SETTING(Variant::INT, PROPERTY_HINT_ENUM, "editors/grid_map/editor_side", 1, "Left,Right"); // 3D EDITOR_SETTING(Variant::COLOR, PROPERTY_HINT_NONE, "editors/3d/primary_grid_color", Color(0.56, 0.56, 0.56, 0.5), "") @@ -708,6 +741,28 @@ void EditorSettings::_load_defaults(Ref p_extra_config) { EDITOR_SETTING_USAGE(Variant::COLOR, PROPERTY_HINT_NONE, "editors/3d_gizmos/gizmo_colors/instantiated", Color(0.7, 0.7, 0.7, 0.6), "", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED) EDITOR_SETTING_USAGE(Variant::COLOR, PROPERTY_HINT_NONE, "editors/3d_gizmos/gizmo_colors/joint", Color(0.5, 0.8, 1), "", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED) EDITOR_SETTING_USAGE(Variant::COLOR, PROPERTY_HINT_NONE, "editors/3d_gizmos/gizmo_colors/aabb", Color(0.28, 0.8, 0.82), "", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED) + EDITOR_SETTING_USAGE(Variant::COLOR, PROPERTY_HINT_NONE, "editors/3d_gizmos/gizmo_colors/stream_player_3d", Color(0.4, 0.8, 1), "", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED) + EDITOR_SETTING_USAGE(Variant::COLOR, PROPERTY_HINT_NONE, "editors/3d_gizmos/gizmo_colors/camera", Color(0.8, 0.4, 0.8), "", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED) + EDITOR_SETTING_USAGE(Variant::COLOR, PROPERTY_HINT_NONE, "editors/3d_gizmos/gizmo_colors/decal", Color(0.6, 0.5, 1.0), "", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED) + EDITOR_SETTING_USAGE(Variant::COLOR, PROPERTY_HINT_NONE, "editors/3d_gizmos/gizmo_colors/fog_volume", Color(0.5, 0.7, 1), "", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED) + EDITOR_SETTING_USAGE(Variant::COLOR, PROPERTY_HINT_NONE, "editors/3d_gizmos/gizmo_colors/particles", Color(0.8, 0.7, 0.4), "", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED) + EDITOR_SETTING_USAGE(Variant::COLOR, PROPERTY_HINT_NONE, "editors/3d_gizmos/gizmo_colors/particle_attractor", Color(1, 0.7, 0.5), "", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED) + EDITOR_SETTING_USAGE(Variant::COLOR, PROPERTY_HINT_NONE, "editors/3d_gizmos/gizmo_colors/particle_collision", Color(0.5, 0.7, 1), "", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED) + EDITOR_SETTING_USAGE(Variant::COLOR, PROPERTY_HINT_NONE, "editors/3d_gizmos/gizmo_colors/joint_body_a", Color(0.6, 0.8, 1), "", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED) + EDITOR_SETTING_USAGE(Variant::COLOR, PROPERTY_HINT_NONE, "editors/3d_gizmos/gizmo_colors/joint_body_b", Color(0.6, 0.9, 1), "", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED) + EDITOR_SETTING_USAGE(Variant::COLOR, PROPERTY_HINT_NONE, "editors/3d_gizmos/gizmo_colors/lightmap_lines", Color(0.5, 0.6, 1), "", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED) + EDITOR_SETTING_USAGE(Variant::COLOR, PROPERTY_HINT_NONE, "editors/3d_gizmos/gizmo_colors/lightprobe_lines", Color(0.5, 0.6, 1), "", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED) + EDITOR_SETTING_USAGE(Variant::COLOR, PROPERTY_HINT_NONE, "editors/3d_gizmos/gizmo_colors/occluder", Color(0.8, 0.5, 1), "", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED) + EDITOR_SETTING_USAGE(Variant::COLOR, PROPERTY_HINT_NONE, "editors/3d_gizmos/gizmo_colors/reflection_probe", Color(0.6, 1, 0.5), "", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED) + EDITOR_SETTING_USAGE(Variant::COLOR, PROPERTY_HINT_NONE, "editors/3d_gizmos/gizmo_colors/visibility_notifier", Color(0.8, 0.5, 0.7), "", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED) + EDITOR_SETTING_USAGE(Variant::COLOR, PROPERTY_HINT_NONE, "editors/3d_gizmos/gizmo_colors/voxel_gi", Color(0.5, 1, 0.6), "", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED) + EDITOR_SETTING_USAGE(Variant::COLOR, PROPERTY_HINT_NONE, "editors/3d_gizmos/gizmo_colors/path_tilt", Color(1.0, 1.0, 0.4, 0.9), "", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED) + EDITOR_SETTING_USAGE(Variant::COLOR, PROPERTY_HINT_NONE, "editors/3d_gizmos/gizmo_colors/skeleton", Color(1, 0.8, 0.4), "", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED) + EDITOR_SETTING_USAGE(Variant::COLOR, PROPERTY_HINT_NONE, "editors/3d_gizmos/gizmo_colors/selected_bone", Color(0.8, 0.3, 0.0), "", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED) + EDITOR_SETTING_USAGE(Variant::COLOR, PROPERTY_HINT_NONE, "editors/3d_gizmos/gizmo_colors/csg", Color(0.0, 0.4, 1, 0.15), "", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED) + _initial_set("editors/3d_gizmos/gizmo_settings/bone_axis_length", (float)0.1); + EDITOR_SETTING(Variant::INT, PROPERTY_HINT_ENUM, "editors/3d_gizmos/gizmo_settings/bone_shape", 1, "Wire,Octahedron"); + EDITOR_SETTING_USAGE(Variant::FLOAT, PROPERTY_HINT_NONE, "editors/3d_gizmos/gizmo_settings/path3d_tilt_disk_size", 0.8, "", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED) // If a line is a multiple of this, it uses the primary grid color. // Use a power of 2 value by default as it's more common to use powers of 2 in level design. @@ -750,6 +805,8 @@ void EditorSettings::_load_defaults(Ref p_extra_config) { EDITOR_SETTING(Variant::FLOAT, PROPERTY_HINT_RANGE, "editors/3d/navigation_feel/orbit_inertia", 0.0, "0,1,0.001") EDITOR_SETTING(Variant::FLOAT, PROPERTY_HINT_RANGE, "editors/3d/navigation_feel/translation_inertia", 0.05, "0,1,0.001") EDITOR_SETTING(Variant::FLOAT, PROPERTY_HINT_RANGE, "editors/3d/navigation_feel/zoom_inertia", 0.05, "0,1,0.001") + _initial_set("editors/3d/navigation/show_viewport_rotation_gizmo", true); + _initial_set("editors/3d/navigation/show_viewport_navigation_gizmo", DisplayServer::get_singleton()->is_touchscreen_available()); // 3D: Freelook EDITOR_SETTING(Variant::INT, PROPERTY_HINT_ENUM, "editors/3d/freelook/freelook_navigation_scheme", 0, "Default,Partially Axis-Locked (id Tech),Fully Axis-Locked (Minecraft)") @@ -759,6 +816,10 @@ void EditorSettings::_load_defaults(Ref p_extra_config) { EDITOR_SETTING(Variant::INT, PROPERTY_HINT_ENUM, "editors/3d/freelook/freelook_activation_modifier", 0, "None,Shift,Alt,Meta,Ctrl") _initial_set("editors/3d/freelook/freelook_speed_zoom_link", false); + // 3D: Manipulator + EDITOR_SETTING(Variant::INT, PROPERTY_HINT_RANGE, "editors/3d/manipulator_gizmo_size", 80, "16,160,1"); + EDITOR_SETTING_USAGE(Variant::FLOAT, PROPERTY_HINT_RANGE, "editors/3d/manipulator_gizmo_opacity", 0.9, "0,1,0.01", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED) + // 2D _initial_set("editors/2d/grid_color", Color(1.0, 1.0, 1.0, 0.07)); _initial_set("editors/2d/guides_color", Color(0.6, 0.0, 0.8)); @@ -774,6 +835,12 @@ void EditorSettings::_load_defaults(Ref p_extra_config) { _initial_set("editors/2d/use_integer_zoom_by_default", false); EDITOR_SETTING(Variant::FLOAT, PROPERTY_HINT_RANGE, "editors/2d/zoom_speed_factor", 1.1, "1.01,2,0.01") + // Bone mapper (BoneMapEditorPlugin) + _initial_set("editors/bone_mapper/handle_colors/unset", Color(0.3, 0.3, 0.3)); + _initial_set("editors/bone_mapper/handle_colors/set", Color(0.1, 0.6, 0.25)); + _initial_set("editors/bone_mapper/handle_colors/missing", Color(0.8, 0.2, 0.8)); + _initial_set("editors/bone_mapper/handle_colors/error", Color(0.8, 0.2, 0.2)); + // Panning // Enum should be in sync with ControlScheme in ViewPanner. EDITOR_SETTING(Variant::INT, PROPERTY_HINT_ENUM, "editors/panning/2d_editor_panning_scheme", 0, "Scroll Zooms,Scroll Pans"); @@ -814,6 +881,10 @@ void EditorSettings::_load_defaults(Ref p_extra_config) { EDITOR_SETTING(Variant::INT, PROPERTY_HINT_ENUM, "editors/visual_editors/grid_pattern", 1, "Lines,Dots") EDITOR_SETTING(Variant::INT, PROPERTY_HINT_RANGE, "editors/visual_editors/visual_shader/port_preview_size", 160, "100,400,0.01") + // Export (EditorExportPlugin) + _initial_set("export/ssh/ssh", ""); + _initial_set("export/ssh/scp", ""); + /* Run */ // Window placement @@ -880,6 +951,11 @@ void EditorSettings::_load_defaults(Ref p_extra_config) { EDITOR_SETTING(Variant::FLOAT, PROPERTY_HINT_RANGE, "debugger/remote_inspect_refresh_interval", 0.2, "0.02,10,0.01,or_greater") EDITOR_SETTING(Variant::BOOL, PROPERTY_HINT_NONE, "debugger/profile_native_calls", false, "") + // Version control (VersionControlEditorPlugin) + _initial_set("version_control/username", ""); + _initial_set("version_control/ssh_public_key_path", ""); + _initial_set("version_control/ssh_private_key_path", ""); + /* Extra config */ EDITOR_SETTING_USAGE(Variant::BOOL, PROPERTY_HINT_NONE, "input/buffering/agile_event_flushing", false, "", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED) diff --git a/editor/export/editor_export_plugin.cpp b/editor/export/editor_export_plugin.cpp index 6bb21d7fd4b..3f1b8aa8634 100644 --- a/editor/export/editor_export_plugin.cpp +++ b/editor/export/editor_export_plugin.cpp @@ -364,8 +364,3 @@ void EditorExportPlugin::_bind_methods() { GDVIRTUAL_BIND(_get_android_manifest_application_element_contents, "platform", "debug"); GDVIRTUAL_BIND(_get_android_manifest_element_contents, "platform", "debug"); } - -EditorExportPlugin::EditorExportPlugin() { - EDITOR_DEF("export/ssh/ssh", ""); - EDITOR_DEF("export/ssh/scp", ""); -} diff --git a/editor/export/editor_export_plugin.h b/editor/export/editor_export_plugin.h index 7a355614c75..ae186d4425c 100644 --- a/editor/export/editor_export_plugin.h +++ b/editor/export/editor_export_plugin.h @@ -183,8 +183,6 @@ public: String get_ios_cpp_code() const; const Vector &get_macos_plugin_files() const; Variant get_option(const StringName &p_name) const; - - EditorExportPlugin(); }; #endif // EDITOR_EXPORT_PLUGIN_H diff --git a/editor/plugins/asset_library_editor_plugin.cpp b/editor/plugins/asset_library_editor_plugin.cpp index f31346fe675..af4b3a1643b 100644 --- a/editor/plugins/asset_library_editor_plugin.cpp +++ b/editor/plugins/asset_library_editor_plugin.cpp @@ -47,7 +47,7 @@ #include "scene/resources/image_texture.h" static inline void setup_http_request(HTTPRequest *request) { - request->set_use_threads(EDITOR_DEF("asset_library/use_threads", true)); + request->set_use_threads(EDITOR_GET("asset_library/use_threads")); const String proxy_host = EDITOR_GET("network/http_proxy/host"); const int proxy_port = EDITOR_GET("network/http_proxy/port"); @@ -703,6 +703,7 @@ void EditorAssetLibrary::_notification(int p_what) { } void EditorAssetLibrary::_update_repository_options() { + // TODO: Move to editor_settings.cpp Dictionary default_urls; default_urls["godotengine.org (Official)"] = "https://godotengine.org/asset-library/api"; Dictionary available_urls = _EDITOR_DEF("asset_library/available_urls", default_urls, true); diff --git a/editor/plugins/bone_map_editor_plugin.cpp b/editor/plugins/bone_map_editor_plugin.cpp index 32ff478c335..d81ec217056 100644 --- a/editor/plugins/bone_map_editor_plugin.cpp +++ b/editor/plugins/bone_map_editor_plugin.cpp @@ -1477,12 +1477,6 @@ void EditorInspectorPluginBoneMap::parse_begin(Object *p_object) { } BoneMapEditorPlugin::BoneMapEditorPlugin() { - // Register properties in editor settings. - EDITOR_DEF("editors/bone_mapper/handle_colors/unset", Color(0.3, 0.3, 0.3)); - EDITOR_DEF("editors/bone_mapper/handle_colors/set", Color(0.1, 0.6, 0.25)); - EDITOR_DEF("editors/bone_mapper/handle_colors/missing", Color(0.8, 0.2, 0.8)); - EDITOR_DEF("editors/bone_mapper/handle_colors/error", Color(0.8, 0.2, 0.2)); - Ref inspector_plugin; inspector_plugin.instantiate(); add_inspector_plugin(inspector_plugin); diff --git a/editor/plugins/gizmos/audio_stream_player_3d_gizmo_plugin.cpp b/editor/plugins/gizmos/audio_stream_player_3d_gizmo_plugin.cpp index 9d4b5e9d70e..577f2b6b8e2 100644 --- a/editor/plugins/gizmos/audio_stream_player_3d_gizmo_plugin.cpp +++ b/editor/plugins/gizmos/audio_stream_player_3d_gizmo_plugin.cpp @@ -38,7 +38,7 @@ #include "scene/3d/audio_stream_player_3d.h" AudioStreamPlayer3DGizmoPlugin::AudioStreamPlayer3DGizmoPlugin() { - Color gizmo_color = EDITOR_DEF_RST("editors/3d_gizmos/gizmo_colors/stream_player_3d", Color(0.4, 0.8, 1)); + Color gizmo_color = EDITOR_GET("editors/3d_gizmos/gizmo_colors/stream_player_3d"); create_icon_material("stream_player_3d_icon", EditorNode::get_singleton()->get_editor_theme()->get_icon(SNAME("Gizmo3DSamplePlayer"), EditorStringName(EditorIcons))); create_material("stream_player_3d_material_primary", gizmo_color); diff --git a/editor/plugins/gizmos/camera_3d_gizmo_plugin.cpp b/editor/plugins/gizmos/camera_3d_gizmo_plugin.cpp index 8d0222215c6..63a48d4165d 100644 --- a/editor/plugins/gizmos/camera_3d_gizmo_plugin.cpp +++ b/editor/plugins/gizmos/camera_3d_gizmo_plugin.cpp @@ -39,7 +39,7 @@ #include "scene/3d/camera_3d.h" Camera3DGizmoPlugin::Camera3DGizmoPlugin() { - Color gizmo_color = EDITOR_DEF_RST("editors/3d_gizmos/gizmo_colors/camera", Color(0.8, 0.4, 0.8)); + Color gizmo_color = EDITOR_GET("editors/3d_gizmos/gizmo_colors/camera"); create_material("camera_material", gizmo_color); create_icon_material("camera_icon", EditorNode::get_singleton()->get_editor_theme()->get_icon(SNAME("GizmoCamera3D"), EditorStringName(EditorIcons))); diff --git a/editor/plugins/gizmos/cpu_particles_3d_gizmo_plugin.cpp b/editor/plugins/gizmos/cpu_particles_3d_gizmo_plugin.cpp index fe5d8e92d18..2a5d8cb2a96 100644 --- a/editor/plugins/gizmos/cpu_particles_3d_gizmo_plugin.cpp +++ b/editor/plugins/gizmos/cpu_particles_3d_gizmo_plugin.cpp @@ -37,7 +37,7 @@ #include "scene/3d/cpu_particles_3d.h" CPUParticles3DGizmoPlugin::CPUParticles3DGizmoPlugin() { - Color gizmo_color = EDITOR_DEF("editors/3d_gizmos/gizmo_colors/particles", Color(0.8, 0.7, 0.4)); + Color gizmo_color = EDITOR_GET("editors/3d_gizmos/gizmo_colors/particles"); create_material("particles_material", gizmo_color); gizmo_color.a = MAX((gizmo_color.a - 0.2) * 0.02, 0.0); create_material("particles_solid_material", gizmo_color); diff --git a/editor/plugins/gizmos/decal_gizmo_plugin.cpp b/editor/plugins/gizmos/decal_gizmo_plugin.cpp index f2b44790eed..b619c3a1dd9 100644 --- a/editor/plugins/gizmos/decal_gizmo_plugin.cpp +++ b/editor/plugins/gizmos/decal_gizmo_plugin.cpp @@ -40,7 +40,7 @@ DecalGizmoPlugin::DecalGizmoPlugin() { helper.instantiate(); - Color gizmo_color = EDITOR_DEF_RST("editors/3d_gizmos/gizmo_colors/decal", Color(0.6, 0.5, 1.0)); + Color gizmo_color = EDITOR_GET("editors/3d_gizmos/gizmo_colors/decal"); create_icon_material("decal_icon", EditorNode::get_singleton()->get_editor_theme()->get_icon(SNAME("GizmoDecal"), EditorStringName(EditorIcons))); diff --git a/editor/plugins/gizmos/fog_volume_gizmo_plugin.cpp b/editor/plugins/gizmos/fog_volume_gizmo_plugin.cpp index dd91d7dfe3e..5c2f942519d 100644 --- a/editor/plugins/gizmos/fog_volume_gizmo_plugin.cpp +++ b/editor/plugins/gizmos/fog_volume_gizmo_plugin.cpp @@ -40,7 +40,7 @@ FogVolumeGizmoPlugin::FogVolumeGizmoPlugin() { helper.instantiate(); - Color gizmo_color = EDITOR_DEF_RST("editors/3d_gizmos/gizmo_colors/fog_volume", Color(0.5, 0.7, 1)); + Color gizmo_color = EDITOR_GET("editors/3d_gizmos/gizmo_colors/fog_volume"); create_material("shape_material", gizmo_color); gizmo_color.a = 0.15; create_material("shape_material_internal", gizmo_color); diff --git a/editor/plugins/gizmos/gpu_particles_3d_gizmo_plugin.cpp b/editor/plugins/gizmos/gpu_particles_3d_gizmo_plugin.cpp index 39bfed93b0a..d2a90ae57cc 100644 --- a/editor/plugins/gizmos/gpu_particles_3d_gizmo_plugin.cpp +++ b/editor/plugins/gizmos/gpu_particles_3d_gizmo_plugin.cpp @@ -38,7 +38,7 @@ #include "scene/3d/gpu_particles_3d.h" GPUParticles3DGizmoPlugin::GPUParticles3DGizmoPlugin() { - Color gizmo_color = EDITOR_DEF_RST("editors/3d_gizmos/gizmo_colors/particles", Color(0.8, 0.7, 0.4)); + Color gizmo_color = EDITOR_GET("editors/3d_gizmos/gizmo_colors/particles"); create_material("particles_material", gizmo_color); gizmo_color.a = MAX((gizmo_color.a - 0.2) * 0.02, 0.0); create_icon_material("particles_icon", EditorNode::get_singleton()->get_editor_theme()->get_icon(SNAME("GizmoGPUParticles3D"), EditorStringName(EditorIcons))); diff --git a/editor/plugins/gizmos/gpu_particles_collision_3d_gizmo_plugin.cpp b/editor/plugins/gizmos/gpu_particles_collision_3d_gizmo_plugin.cpp index 6f20a534591..78acbc4d23d 100644 --- a/editor/plugins/gizmos/gpu_particles_collision_3d_gizmo_plugin.cpp +++ b/editor/plugins/gizmos/gpu_particles_collision_3d_gizmo_plugin.cpp @@ -39,12 +39,12 @@ GPUParticlesCollision3DGizmoPlugin::GPUParticlesCollision3DGizmoPlugin() { helper.instantiate(); - Color gizmo_color_attractor = EDITOR_DEF_RST("editors/3d_gizmos/gizmo_colors/particle_attractor", Color(1, 0.7, 0.5)); + Color gizmo_color_attractor = EDITOR_GET("editors/3d_gizmos/gizmo_colors/particle_attractor"); create_material("shape_material_attractor", gizmo_color_attractor); gizmo_color_attractor.a = 0.15; create_material("shape_material_attractor_internal", gizmo_color_attractor); - Color gizmo_color_collision = EDITOR_DEF_RST("editors/3d_gizmos/gizmo_colors/particle_collision", Color(0.5, 0.7, 1)); + Color gizmo_color_collision = EDITOR_GET("editors/3d_gizmos/gizmo_colors/particle_collision"); create_material("shape_material_collision", gizmo_color_collision); gizmo_color_collision.a = 0.15; create_material("shape_material_collision_internal", gizmo_color_collision); diff --git a/editor/plugins/gizmos/joint_3d_gizmo_plugin.cpp b/editor/plugins/gizmos/joint_3d_gizmo_plugin.cpp index c277ec8cd32..8c0192a9619 100644 --- a/editor/plugins/gizmos/joint_3d_gizmo_plugin.cpp +++ b/editor/plugins/gizmos/joint_3d_gizmo_plugin.cpp @@ -280,8 +280,8 @@ void JointGizmosDrawer::draw_cone(const Transform3D &p_offset, const Basis &p_ba Joint3DGizmoPlugin::Joint3DGizmoPlugin() { create_material("joint_material", EDITOR_GET("editors/3d_gizmos/gizmo_colors/joint")); - create_material("joint_body_a_material", EDITOR_DEF_RST("editors/3d_gizmos/gizmo_colors/joint_body_a", Color(0.6, 0.8, 1))); - create_material("joint_body_b_material", EDITOR_DEF_RST("editors/3d_gizmos/gizmo_colors/joint_body_b", Color(0.6, 0.9, 1))); + create_material("joint_body_a_material", EDITOR_GET("editors/3d_gizmos/gizmo_colors/joint_body_a")); + create_material("joint_body_b_material", EDITOR_GET("editors/3d_gizmos/gizmo_colors/joint_body_b")); update_timer = memnew(Timer); update_timer->set_name("JointGizmoUpdateTimer"); diff --git a/editor/plugins/gizmos/lightmap_gi_gizmo_plugin.cpp b/editor/plugins/gizmos/lightmap_gi_gizmo_plugin.cpp index 64913dc7793..748f770d4db 100644 --- a/editor/plugins/gizmos/lightmap_gi_gizmo_plugin.cpp +++ b/editor/plugins/gizmos/lightmap_gi_gizmo_plugin.cpp @@ -37,7 +37,7 @@ #include "scene/3d/lightmap_gi.h" LightmapGIGizmoPlugin::LightmapGIGizmoPlugin() { - Color gizmo_color = EDITOR_DEF_RST("editors/3d_gizmos/gizmo_colors/lightmap_lines", Color(0.5, 0.6, 1)); + Color gizmo_color = EDITOR_GET("editors/3d_gizmos/gizmo_colors/lightmap_lines"); gizmo_color.a = 0.1; create_material("lightmap_lines", gizmo_color); diff --git a/editor/plugins/gizmos/lightmap_probe_gizmo_plugin.cpp b/editor/plugins/gizmos/lightmap_probe_gizmo_plugin.cpp index 5fd8ad22356..cc8649d2d10 100644 --- a/editor/plugins/gizmos/lightmap_probe_gizmo_plugin.cpp +++ b/editor/plugins/gizmos/lightmap_probe_gizmo_plugin.cpp @@ -39,7 +39,7 @@ LightmapProbeGizmoPlugin::LightmapProbeGizmoPlugin() { create_icon_material("lightmap_probe_icon", EditorNode::get_singleton()->get_editor_theme()->get_icon(SNAME("GizmoLightmapProbe"), EditorStringName(EditorIcons))); - Color gizmo_color = EDITOR_DEF_RST("editors/3d_gizmos/gizmo_colors/lightprobe_lines", Color(0.5, 0.6, 1)); + Color gizmo_color = EDITOR_GET("editors/3d_gizmos/gizmo_colors/lightprobe_lines"); gizmo_color.a = 0.3; create_material("lightprobe_lines", gizmo_color); diff --git a/editor/plugins/gizmos/occluder_instance_3d_gizmo_plugin.cpp b/editor/plugins/gizmos/occluder_instance_3d_gizmo_plugin.cpp index d6f649ab9c3..29f060d7950 100644 --- a/editor/plugins/gizmos/occluder_instance_3d_gizmo_plugin.cpp +++ b/editor/plugins/gizmos/occluder_instance_3d_gizmo_plugin.cpp @@ -36,7 +36,7 @@ #include "scene/3d/occluder_instance_3d.h" OccluderInstance3DGizmoPlugin::OccluderInstance3DGizmoPlugin() { - create_material("line_material", EDITOR_DEF_RST("editors/3d_gizmos/gizmo_colors/occluder", Color(0.8, 0.5, 1))); + create_material("line_material", EDITOR_GET("editors/3d_gizmos/gizmo_colors/occluder")); create_handle_material("handles"); } diff --git a/editor/plugins/gizmos/reflection_probe_gizmo_plugin.cpp b/editor/plugins/gizmos/reflection_probe_gizmo_plugin.cpp index eb7e668f41c..7b91dac2ebb 100644 --- a/editor/plugins/gizmos/reflection_probe_gizmo_plugin.cpp +++ b/editor/plugins/gizmos/reflection_probe_gizmo_plugin.cpp @@ -40,7 +40,7 @@ ReflectionProbeGizmoPlugin::ReflectionProbeGizmoPlugin() { helper.instantiate(); - Color gizmo_color = EDITOR_DEF_RST("editors/3d_gizmos/gizmo_colors/reflection_probe", Color(0.6, 1, 0.5)); + Color gizmo_color = EDITOR_GET("editors/3d_gizmos/gizmo_colors/reflection_probe"); create_material("reflection_probe_material", gizmo_color); diff --git a/editor/plugins/gizmos/visible_on_screen_notifier_3d_gizmo_plugin.cpp b/editor/plugins/gizmos/visible_on_screen_notifier_3d_gizmo_plugin.cpp index d3ae823fdc5..2d40e66811c 100644 --- a/editor/plugins/gizmos/visible_on_screen_notifier_3d_gizmo_plugin.cpp +++ b/editor/plugins/gizmos/visible_on_screen_notifier_3d_gizmo_plugin.cpp @@ -36,7 +36,7 @@ #include "scene/3d/visible_on_screen_notifier_3d.h" VisibleOnScreenNotifier3DGizmoPlugin::VisibleOnScreenNotifier3DGizmoPlugin() { - Color gizmo_color = EDITOR_DEF_RST("editors/3d_gizmos/gizmo_colors/visibility_notifier", Color(0.8, 0.5, 0.7)); + Color gizmo_color = EDITOR_GET("editors/3d_gizmos/gizmo_colors/visibility_notifier"); create_material("visibility_notifier_material", gizmo_color); gizmo_color.a = 0.1; create_material("visibility_notifier_solid_material", gizmo_color); diff --git a/editor/plugins/gizmos/voxel_gi_gizmo_plugin.cpp b/editor/plugins/gizmos/voxel_gi_gizmo_plugin.cpp index 8d09400f787..0123b9d84a1 100644 --- a/editor/plugins/gizmos/voxel_gi_gizmo_plugin.cpp +++ b/editor/plugins/gizmos/voxel_gi_gizmo_plugin.cpp @@ -41,7 +41,7 @@ VoxelGIGizmoPlugin::VoxelGIGizmoPlugin() { helper.instantiate(); - Color gizmo_color = EDITOR_DEF_RST("editors/3d_gizmos/gizmo_colors/voxel_gi", Color(0.5, 1, 0.6)); + Color gizmo_color = EDITOR_GET("editors/3d_gizmos/gizmo_colors/voxel_gi"); create_material("voxel_gi_material", gizmo_color); diff --git a/editor/plugins/node_3d_editor_plugin.cpp b/editor/plugins/node_3d_editor_plugin.cpp index f58dfbb5a55..d0d4f6098c8 100644 --- a/editor/plugins/node_3d_editor_plugin.cpp +++ b/editor/plugins/node_3d_editor_plugin.cpp @@ -8999,13 +8999,6 @@ Node3DEditor::Node3DEditor() { set_process_shortcut_input(true); add_to_group(SceneStringName(_spatial_editor_group)); - EDITOR_DEF("editors/3d/manipulator_gizmo_size", 80); - EditorSettings::get_singleton()->add_property_hint(PropertyInfo(Variant::INT, "editors/3d/manipulator_gizmo_size", PROPERTY_HINT_RANGE, "16,160,1")); - EDITOR_DEF("editors/3d/manipulator_gizmo_opacity", 0.9); - EditorSettings::get_singleton()->add_property_hint(PropertyInfo(Variant::FLOAT, "editors/3d/manipulator_gizmo_opacity", PROPERTY_HINT_RANGE, "0,1,0.01")); - EDITOR_DEF("editors/3d/navigation/show_viewport_rotation_gizmo", true); - EDITOR_DEF("editors/3d/navigation/show_viewport_navigation_gizmo", DisplayServer::get_singleton()->is_touchscreen_available()); - current_hover_gizmo_handle = -1; current_hover_gizmo_handle_secondary = false; { diff --git a/editor/plugins/path_3d_editor_plugin.cpp b/editor/plugins/path_3d_editor_plugin.cpp index 890035e6a65..4fdcb796969 100644 --- a/editor/plugins/path_3d_editor_plugin.cpp +++ b/editor/plugins/path_3d_editor_plugin.cpp @@ -817,7 +817,10 @@ void Path3DEditorPlugin::_bind_methods() { Path3DEditorPlugin::Path3DEditorPlugin() { singleton = this; - disk_size = EDITOR_DEF_RST("editors/3d_gizmos/gizmo_settings/path3d_tilt_disk_size", 0.8); + mirror_handle_angle = true; + mirror_handle_length = true; + + disk_size = EDITOR_GET("editors/3d_gizmos/gizmo_settings/path3d_tilt_disk_size"); Ref gizmo_plugin = memnew(Path3DGizmoPlugin(disk_size)); Node3DEditor::get_singleton()->add_gizmo_plugin(gizmo_plugin); @@ -1061,7 +1064,7 @@ int Path3DGizmoPlugin::get_priority() const { Path3DGizmoPlugin::Path3DGizmoPlugin(float p_disk_size) { Color path_color = SceneTree::get_singleton()->get_debug_paths_color(); - Color path_tilt_color = EDITOR_DEF_RST("editors/3d_gizmos/gizmo_colors/path_tilt", Color(1.0, 1.0, 0.4, 0.9)); + Color path_tilt_color = EDITOR_GET("editors/3d_gizmos/gizmo_colors/path_tilt"); disk_size = p_disk_size; create_material("path_material", path_color); diff --git a/editor/plugins/script_editor_plugin.cpp b/editor/plugins/script_editor_plugin.cpp index 253005c5ced..25198e00bf1 100644 --- a/editor/plugins/script_editor_plugin.cpp +++ b/editor/plugins/script_editor_plugin.cpp @@ -4624,21 +4624,7 @@ ScriptEditorPlugin::ScriptEditorPlugin() { window_wrapper->hide(); window_wrapper->connect("window_visibility_changed", callable_mp(this, &ScriptEditorPlugin::_window_visibility_changed)); - EDITOR_GET("text_editor/behavior/files/auto_reload_scripts_on_external_change"); - ScriptServer::set_reload_scripts_on_save(EDITOR_DEF("text_editor/behavior/files/auto_reload_and_parse_scripts_on_save", true)); - EDITOR_DEF("text_editor/behavior/files/open_dominant_script_on_scene_change", false); - EDITOR_DEF("text_editor/external/use_external_editor", false); - EDITOR_DEF("text_editor/external/exec_path", ""); - EDITOR_DEF("text_editor/script_list/script_temperature_enabled", true); - EDITOR_DEF("text_editor/script_list/script_temperature_history_size", 15); - EDITOR_DEF("text_editor/script_list/group_help_pages", true); - EditorSettings::get_singleton()->add_property_hint(PropertyInfo(Variant::INT, "text_editor/script_list/sort_scripts_by", PROPERTY_HINT_ENUM, "Name,Path,None")); - EDITOR_DEF("text_editor/script_list/sort_scripts_by", 0); - EditorSettings::get_singleton()->add_property_hint(PropertyInfo(Variant::INT, "text_editor/script_list/list_script_names_as", PROPERTY_HINT_ENUM, "Name,Parent Directory And Name,Full Path")); - EDITOR_DEF("text_editor/script_list/list_script_names_as", 0); - EditorSettings::get_singleton()->add_property_hint(PropertyInfo(Variant::STRING, "text_editor/external/exec_path", PROPERTY_HINT_GLOBAL_FILE)); - EDITOR_DEF("text_editor/external/exec_flags", "{file}"); - EditorSettings::get_singleton()->add_property_hint(PropertyInfo(Variant::STRING, "text_editor/external/exec_flags", PROPERTY_HINT_PLACEHOLDER_TEXT, "Call flags with placeholders: {project}, {file}, {col}, {line}.")); + ScriptServer::set_reload_scripts_on_save(EDITOR_GET("text_editor/behavior/files/auto_reload_and_parse_scripts_on_save")); } ScriptEditorPlugin::~ScriptEditorPlugin() { diff --git a/editor/plugins/skeleton_3d_editor_plugin.cpp b/editor/plugins/skeleton_3d_editor_plugin.cpp index 9fc88b3a6ad..99cb03cdcd3 100644 --- a/editor/plugins/skeleton_3d_editor_plugin.cpp +++ b/editor/plugins/skeleton_3d_editor_plugin.cpp @@ -1379,13 +1379,6 @@ void fragment() { } )"); selection_materials.selected_mat->set_shader(selected_sh); - - // Register properties in editor settings. - EDITOR_DEF_RST("editors/3d_gizmos/gizmo_colors/skeleton", Color(1, 0.8, 0.4)); - EDITOR_DEF_RST("editors/3d_gizmos/gizmo_colors/selected_bone", Color(0.8, 0.3, 0.0)); - EDITOR_DEF("editors/3d_gizmos/gizmo_settings/bone_axis_length", (float)0.1); - EDITOR_DEF("editors/3d_gizmos/gizmo_settings/bone_shape", 1); - EditorSettings::get_singleton()->add_property_hint(PropertyInfo(Variant::INT, "editors/3d_gizmos/gizmo_settings/bone_shape", PROPERTY_HINT_ENUM, "Wire,Octahedron")); } Skeleton3DGizmoPlugin::~Skeleton3DGizmoPlugin() { diff --git a/editor/plugins/version_control_editor_plugin.cpp b/editor/plugins/version_control_editor_plugin.cpp index 1df84cb0a77..4f0df1d5fcd 100644 --- a/editor/plugins/version_control_editor_plugin.cpp +++ b/editor/plugins/version_control_editor_plugin.cpp @@ -1032,7 +1032,7 @@ VersionControlEditorPlugin::VersionControlEditorPlugin() { set_up_username = memnew(LineEdit); set_up_username->set_h_size_flags(Control::SIZE_EXPAND_FILL); - set_up_username->set_text(EDITOR_DEF("version_control/username", "")); + set_up_username->set_text(EDITOR_GET("version_control/username")); set_up_username->connect(SceneStringName(text_changed), callable_mp(this, &VersionControlEditorPlugin::_update_set_up_warning)); set_up_username_input->add_child(set_up_username); @@ -1068,7 +1068,7 @@ VersionControlEditorPlugin::VersionControlEditorPlugin() { set_up_ssh_public_key_path = memnew(LineEdit); set_up_ssh_public_key_path->set_h_size_flags(Control::SIZE_EXPAND_FILL); - set_up_ssh_public_key_path->set_text(EDITOR_DEF("version_control/ssh_public_key_path", "")); + set_up_ssh_public_key_path->set_text(EDITOR_GET("version_control/ssh_public_key_path")); set_up_ssh_public_key_path->connect(SceneStringName(text_changed), callable_mp(this, &VersionControlEditorPlugin::_update_set_up_warning)); set_up_ssh_public_key_input_hbc->add_child(set_up_ssh_public_key_path); @@ -1101,7 +1101,7 @@ VersionControlEditorPlugin::VersionControlEditorPlugin() { set_up_ssh_private_key_path = memnew(LineEdit); set_up_ssh_private_key_path->set_h_size_flags(Control::SIZE_EXPAND_FILL); - set_up_ssh_private_key_path->set_text(EDITOR_DEF("version_control/ssh_private_key_path", "")); + set_up_ssh_private_key_path->set_text(EDITOR_GET("version_control/ssh_private_key_path")); set_up_ssh_private_key_path->connect(SceneStringName(text_changed), callable_mp(this, &VersionControlEditorPlugin::_update_set_up_warning)); set_up_ssh_private_key_input_hbc->add_child(set_up_ssh_private_key_path); diff --git a/editor/scene_tree_dock.cpp b/editor/scene_tree_dock.cpp index 9f56c586a29..62706a6ae83 100644 --- a/editor/scene_tree_dock.cpp +++ b/editor/scene_tree_dock.cpp @@ -4683,10 +4683,6 @@ SceneTreeDock::SceneTreeDock(Node *p_scene_root, EditorSelection *p_editor_selec set_process_input(true); set_process(true); - EDITOR_DEF("interface/editors/show_scene_tree_root_selection", true); - EDITOR_DEF("interface/editors/derive_script_globals_by_name", true); - EDITOR_DEF("docks/scene_tree/ask_before_deleting_related_animation_tracks", true); - EDITOR_DEF("docks/scene_tree/ask_before_revoking_unique_name", true); EDITOR_DEF("_use_favorites_root_selection", false); Resource::_update_configuration_warning = _update_configuration_warning; diff --git a/modules/csg/editor/csg_gizmos.cpp b/modules/csg/editor/csg_gizmos.cpp index 3712441e516..95ffeed6c31 100644 --- a/modules/csg/editor/csg_gizmos.cpp +++ b/modules/csg/editor/csg_gizmos.cpp @@ -173,7 +173,7 @@ CSGShapeEditor::CSGShapeEditor() { CSGShape3DGizmoPlugin::CSGShape3DGizmoPlugin() { helper.instantiate(); - Color gizmo_color = EDITOR_DEF_RST("editors/3d_gizmos/gizmo_colors/csg", Color(0.0, 0.4, 1, 0.15)); + Color gizmo_color = EDITOR_GET("editors/3d_gizmos/gizmo_colors/csg"); create_material("shape_union_material", gizmo_color); create_material("shape_union_solid_material", gizmo_color); gizmo_color.invert(); diff --git a/modules/gdscript/editor/gdscript_highlighter.cpp b/modules/gdscript/editor/gdscript_highlighter.cpp index eecce70202b..d765cfa1ea4 100644 --- a/modules/gdscript/editor/gdscript_highlighter.cpp +++ b/modules/gdscript/editor/gdscript_highlighter.cpp @@ -852,6 +852,7 @@ void GDScriptSyntaxHighlighter::_update_cache() { comment_marker_colors[COMMENT_MARKER_NOTICE] = Color(0.24, 0.54, 0.09); } + // TODO: Move to editor_settings.cpp EDITOR_DEF("text_editor/theme/highlighting/gdscript/function_definition_color", function_definition_color); EDITOR_DEF("text_editor/theme/highlighting/gdscript/global_function_color", global_function_color); EDITOR_DEF("text_editor/theme/highlighting/gdscript/node_path_color", node_path_color); diff --git a/modules/gdscript/language_server/gdscript_language_server.cpp b/modules/gdscript/language_server/gdscript_language_server.cpp index 3df26ea5760..731988148dd 100644 --- a/modules/gdscript/language_server/gdscript_language_server.cpp +++ b/modules/gdscript/language_server/gdscript_language_server.cpp @@ -39,6 +39,7 @@ int GDScriptLanguageServer::port_override = -1; GDScriptLanguageServer::GDScriptLanguageServer() { + // TODO: Move to editor_settings.cpp _EDITOR_DEF("network/language_server/remote_host", host); _EDITOR_DEF("network/language_server/remote_port", port); _EDITOR_DEF("network/language_server/enable_smart_resolve", true); diff --git a/modules/gridmap/editor/grid_map_editor_plugin.cpp b/modules/gridmap/editor/grid_map_editor_plugin.cpp index 6b010335e66..1c658b9e9b4 100644 --- a/modules/gridmap/editor/grid_map_editor_plugin.cpp +++ b/modules/gridmap/editor/grid_map_editor_plugin.cpp @@ -1199,7 +1199,7 @@ GridMapEditor::GridMapEditor() { ED_SHORTCUT("grid_map/clear_selection", TTR("Clear Selection"), Key::KEY_DELETE); ED_SHORTCUT("grid_map/fill_selection", TTR("Fill Selection"), KeyModifierMask::CTRL + Key::F); - int mw = EDITOR_DEF("editors/grid_map/palette_min_width", 230); + int mw = EDITOR_GET("editors/grid_map/palette_min_width"); Control *ec = memnew(Control); ec->set_custom_minimum_size(Size2(mw, 0) * EDSCALE); add_child(ec); @@ -1309,8 +1309,6 @@ GridMapEditor::GridMapEditor() { size_slider->connect(SceneStringName(value_changed), callable_mp(this, &GridMapEditor::_icon_size_changed)); add_child(size_slider); - EDITOR_DEF("editors/grid_map/preview_size", 64); - mesh_library_palette = memnew(ItemList); mesh_library_palette->set_auto_translate_mode(AUTO_TRANSLATE_MODE_DISABLED); add_child(mesh_library_palette); @@ -1533,9 +1531,6 @@ void GridMapEditorPlugin::make_visible(bool p_visible) { } GridMapEditorPlugin::GridMapEditorPlugin() { - EDITOR_DEF("editors/grid_map/editor_side", 1); - EditorSettings::get_singleton()->add_property_hint(PropertyInfo(Variant::INT, "editors/grid_map/editor_side", PROPERTY_HINT_ENUM, "Left,Right")); - grid_map_editor = memnew(GridMapEditor); switch ((int)EDITOR_GET("editors/grid_map/editor_side")) { case 0: { // Left. diff --git a/modules/openxr/editor/openxr_select_runtime.cpp b/modules/openxr/editor/openxr_select_runtime.cpp index 4d95b079e22..4a2a87cb886 100644 --- a/modules/openxr/editor/openxr_select_runtime.cpp +++ b/modules/openxr/editor/openxr_select_runtime.cpp @@ -119,6 +119,7 @@ OpenXRSelectRuntime::OpenXRSelectRuntime() { default_runtimes["SteamVR"] = "~/.steam/steam/steamapps/common/SteamVR/steamxr_linux64.json"; #endif + // TODO: Move to editor_settings.cpp EDITOR_DEF_RST("xr/openxr/runtime_paths", default_runtimes); set_flat(true); diff --git a/platform/android/export/export.cpp b/platform/android/export/export.cpp index 3f4624d09c3..1bc600c56f0 100644 --- a/platform/android/export/export.cpp +++ b/platform/android/export/export.cpp @@ -42,6 +42,7 @@ void register_android_exporter_types() { } void register_android_exporter() { + // TODO: Move to editor_settings.cpp EDITOR_DEF("export/android/debug_keystore", EditorPaths::get_singleton()->get_debug_keystore_path()); EditorSettings::get_singleton()->add_property_hint(PropertyInfo(Variant::STRING, "export/android/debug_keystore", PROPERTY_HINT_GLOBAL_FILE, "*.keystore,*.jks")); EDITOR_DEF("export/android/debug_keystore_user", DEFAULT_ANDROID_KEYSTORE_DEBUG_USER); diff --git a/platform/ios/export/export.cpp b/platform/ios/export/export.cpp index 98cc80e4a0e..5e9ca3e025d 100644 --- a/platform/ios/export/export.cpp +++ b/platform/ios/export/export.cpp @@ -39,6 +39,7 @@ void register_ios_exporter_types() { } void register_ios_exporter() { + // TODO: Move to editor_settings.cpp #ifdef MACOS_ENABLED EDITOR_DEF("export/ios/ios_deploy", ""); EditorSettings::get_singleton()->add_property_hint(PropertyInfo(Variant::STRING, "export/ios/ios_deploy", PROPERTY_HINT_GLOBAL_FILE, "*")); diff --git a/platform/macos/export/export.cpp b/platform/macos/export/export.cpp index 8930974df9c..df31ccfb564 100644 --- a/platform/macos/export/export.cpp +++ b/platform/macos/export/export.cpp @@ -37,6 +37,7 @@ void register_macos_exporter_types() { } void register_macos_exporter() { + // TODO: Move to editor_settings.cpp #ifndef ANDROID_ENABLED EDITOR_DEF("export/macos/rcodesign", ""); #ifdef WINDOWS_ENABLED diff --git a/platform/web/export/export.cpp b/platform/web/export/export.cpp index 306ec624a05..ee6d02e68f5 100644 --- a/platform/web/export/export.cpp +++ b/platform/web/export/export.cpp @@ -40,6 +40,7 @@ void register_web_exporter_types() { } void register_web_exporter() { + // TODO: Move to editor_settings.cpp EDITOR_DEF("export/web/http_host", "localhost"); EDITOR_DEF("export/web/http_port", 8060); EDITOR_DEF("export/web/use_tls", false); diff --git a/platform/windows/export/export.cpp b/platform/windows/export/export.cpp index 7a65f74f0d6..a062963c2e5 100644 --- a/platform/windows/export/export.cpp +++ b/platform/windows/export/export.cpp @@ -39,6 +39,7 @@ void register_windows_exporter_types() { } void register_windows_exporter() { + // TODO: Move to editor_settings.cpp #ifndef ANDROID_ENABLED EDITOR_DEF("export/windows/rcedit", ""); EditorSettings::get_singleton()->add_property_hint(PropertyInfo(Variant::STRING, "export/windows/rcedit", PROPERTY_HINT_GLOBAL_FILE, "*.exe"));