diff --git a/core/config/project_settings.cpp b/core/config/project_settings.cpp index 123e01860e8..ac5499d7095 100644 --- a/core/config/project_settings.cpp +++ b/core/config/project_settings.cpp @@ -1270,6 +1270,10 @@ ProjectSettings::ProjectSettings() { GLOBAL_DEF("application/config/custom_user_dir_name", ""); GLOBAL_DEF("application/config/project_settings_override", ""); + GLOBAL_DEF("application/run/main_loop_type", "SceneTree"); + GLOBAL_DEF("application/config/auto_accept_quit", true); + GLOBAL_DEF("application/config/quit_on_go_back", true); + // The default window size is tuned to: // - Have a 16:9 aspect ratio, // - Have both dimensions divisible by 8 to better play along with video recording, @@ -1314,12 +1318,17 @@ ProjectSettings::ProjectSettings() { // Keep the enum values in sync with the `DisplayServer::ScreenOrientation` enum. custom_prop_info["display/window/handheld/orientation"] = PropertyInfo(Variant::INT, "display/window/handheld/orientation", PROPERTY_HINT_ENUM, "Landscape,Portrait,Reverse Landscape,Reverse Portrait,Sensor Landscape,Sensor Portrait,Sensor"); + GLOBAL_DEF("display/window/subwindows/embed_subwindows", true); // Keep the enum values in sync with the `DisplayServer::VSyncMode` enum. custom_prop_info["display/window/vsync/vsync_mode"] = PropertyInfo(Variant::INT, "display/window/vsync/vsync_mode", PROPERTY_HINT_ENUM, "Disabled,Enabled,Adaptive,Mailbox"); custom_prop_info["rendering/driver/threads/thread_model"] = PropertyInfo(Variant::INT, "rendering/driver/threads/thread_model", PROPERTY_HINT_ENUM, "Single-Unsafe,Single-Safe,Multi-Threaded"); GLOBAL_DEF("physics/2d/run_on_separate_thread", false); GLOBAL_DEF("physics/3d/run_on_separate_thread", false); + GLOBAL_DEF_BASIC(PropertyInfo(Variant::STRING, "display/window/stretch/mode", PROPERTY_HINT_ENUM, "disabled,canvas_items,viewport"), "disabled"); + GLOBAL_DEF_BASIC(PropertyInfo(Variant::STRING, "display/window/stretch/aspect", PROPERTY_HINT_ENUM, "ignore,keep,keep_width,keep_height,expand"), "keep"); + GLOBAL_DEF_BASIC(PropertyInfo(Variant::FLOAT, "display/window/stretch/scale", PROPERTY_HINT_RANGE, "0.5,8.0,0.01"), 1.0); + GLOBAL_DEF(PropertyInfo(Variant::INT, "debug/settings/profiler/max_functions", PROPERTY_HINT_RANGE, "128,65535,1"), 16384); GLOBAL_DEF(PropertyInfo(Variant::BOOL, "compression/formats/zstd/long_distance_matching"), Compression::zstd_long_distance_matching); @@ -1339,11 +1348,17 @@ ProjectSettings::ProjectSettings() { GLOBAL_DEF(PropertyInfo(Variant::INT, "gui/timers/incremental_search_max_interval_msec", PROPERTY_HINT_RANGE, "0,10000,1,or_greater"), 2000); + GLOBAL_DEF_BASIC("gui/common/snap_controls_to_pixels", true); + GLOBAL_DEF_BASIC("gui/fonts/dynamic_fonts/use_oversampling", true); + GLOBAL_DEF("rendering/rendering_device/staging_buffer/block_size_kb", 256); GLOBAL_DEF("rendering/rendering_device/staging_buffer/max_size_mb", 128); GLOBAL_DEF("rendering/rendering_device/staging_buffer/texture_upload_region_size_px", 64); GLOBAL_DEF("rendering/rendering_device/vulkan/max_descriptors_per_pool", 64); + GLOBAL_DEF_BASIC(PropertyInfo(Variant::INT, "rendering/textures/canvas_textures/default_texture_filter", PROPERTY_HINT_ENUM, "Nearest,Linear,Linear Mipmap,Nearest Mipmap"), 1); + GLOBAL_DEF_BASIC(PropertyInfo(Variant::INT, "rendering/textures/canvas_textures/default_texture_repeat", PROPERTY_HINT_ENUM, "Disable,Enable,Mirror"), 0); + // These properties will not show up in the dialog nor in the documentation. If you want to exclude whole groups, see _get_property_list() method. GLOBAL_DEF_INTERNAL("application/config/features", PackedStringArray()); GLOBAL_DEF_INTERNAL("internationalization/locale/translation_remaps", PackedStringArray()); diff --git a/doc/classes/ProjectSettings.xml b/doc/classes/ProjectSettings.xml index cf24126584d..66ad1e12d13 100644 --- a/doc/classes/ProjectSettings.xml +++ b/doc/classes/ProjectSettings.xml @@ -241,6 +241,9 @@ If [code]true[/code], applies linear filtering when scaling the image (recommended for high-resolution artwork). If [code]false[/code], uses nearest-neighbor interpolation (recommended for pixel art). + + If [code]true[/code], the application automatically accepts quitting requests. + This user directory is used for storing persistent data ([code]user://[/code] filesystem). If a custom directory name is defined, this name will be appended to the system-specific user data directory (same parent folder as the Godot configuration folder documented in [method OS.get_user_data_dir]). The [member application/config/use_custom_user_dir] setting must be enabled for this to take effect. @@ -265,6 +268,9 @@ Specifies a file to override project settings. For example: [code]user://custom_settings.cfg[/code]. See "Overriding" in the [ProjectSettings] class description at the top for more information. [b]Note:[/b] Regardless of this setting's value, [code]res://override.cfg[/code] will still be read to override the project settings. + + If [code]true[/code], the application quits automatically when navigating back (e.g. using the system "Back" button on Android). + If [code]true[/code], the project will save user data to its own user directory. If [member application/config/custom_user_dir_name] is empty, [code]<OS user data directory>/<project name>[/code] directory will be used. If [code]false[/code], the project will save user data to [code]<OS user data directory>/Godot/app_userdata/<project name>[/code]. See also [url=$DOCS_URL/tutorials/io/data_paths.html#accessing-persistent-user-data-user]File paths in Godot projects[/url]. This setting is only effective on desktop platforms. @@ -305,6 +311,9 @@ Amount of sleeping between frames when the low-processor usage mode is enabled (in microseconds). Higher values will result in lower CPU usage. + + The name of the type implementing the engine's main loop. + Path to the main scene file that will be loaded when the project runs. @@ -698,6 +707,15 @@ On desktop platforms, overrides the game's initial window width. See also [member display/window/size/window_height_override], [member display/window/size/viewport_width] and [member display/window/size/viewport_height]. [b]Note:[/b] By default, or when set to [code]0[/code], the initial window width is the viewport [member display/window/size/viewport_width]. This setting is ignored on iOS, Android, and Web. + + + + + + + + If [code]true[/code] subwindows are embedded in the main window. + Sets the V-Sync mode for the main game window. See [enum DisplayServer.VSyncMode] for possible values and how they affect the behavior of your application. @@ -712,6 +730,14 @@ Directory that contains the [code].sln[/code] file. By default, the [code].sln[/code] files is in the root of the project directory, next to the [code]project.godot[/code] and [code].csproj[/code] files. Changing this value allows setting up a multi-project scenario where there are multiple [code].csproj[/code]. Keep in mind that the Godot project is considered one of the C# projects in the workspace and it's root directory should contain the [code]project.godot[/code] and [code].csproj[/code] next to each other. + + If [code]true[/code] text resources are converted to binary format on export. + + + + + If [code]true[/code] importing of resources is run on multiple threads. + If [code]true[/code], requests V-Sync to be disabled when writing a movie (similar to setting [member display/window/vsync/vsync_mode] to [b]Disabled[/b]). This can speed up video writing if the hardware is fast enough to render, encode and save the video at a framerate higher than the monitor's refresh rate. [b]Note:[/b] [member editor/movie_writer/disable_vsync] has no effect if the operating system or graphics driver forces V-Sync with no way for applications to disable it. @@ -767,6 +793,10 @@ Search path for project-specific script templates. Godot will search for script templates both in the editor-specific path and in this project-specific path. + + + + If [code]true[/code], Blender 3D scene files with the [code].blend[/code] extension will be imported by converting them to glTF 2.0. This requires configuring a path to a Blender executable in the editor settings at [code]filesystem/import/blender/blender3_path[/code]. Blender 3.0 or later is required. @@ -790,6 +820,8 @@ Default value for [member ScrollContainer.scroll_deadzone], which will be used for all [ScrollContainer]s unless overridden. + + If [code]true[/code], swaps [b]Cancel[/b] and [b]OK[/b] buttons in dialogs on Windows and UWP to follow interface conventions. [method DisplayServer.get_swap_cancel_ok] can be used to query whether buttons are swapped at run-time. [b]Note:[/b] This doesn't affect native dialogs such as the ones spawned by [method DisplayServer.dialog_show]. @@ -797,6 +829,8 @@ Maximum undo/redo history size for [TextEdit] fields. + + Path to a custom [Theme] resource file to use for the project ([code].theme[/code] or generic [code].tres[/code]/[code].res[/code] extension). @@ -2312,6 +2346,12 @@ Lower-end override for [member rendering/shading/overrides/force_vertex_shading] on mobile devices, due to performance concerns or driver support. [b]Note:[/b] This setting currently has no effect, as vertex shading is not implemented yet. + + The default texture filtering mode to use on [CanvasItem]s. + + + The default texture repeating mode to use on [CanvasItem]s. + The filtering quality to use for [Decal] nodes. When using one of the anisotropic filtering modes, the anisotropic filtering level is controlled by [member rendering/textures/default_filters/anisotropic_filtering_level]. diff --git a/doc/classes/SceneTree.xml b/doc/classes/SceneTree.xml index c88acd8950a..2921117b8b9 100644 --- a/doc/classes/SceneTree.xml +++ b/doc/classes/SceneTree.xml @@ -218,7 +218,7 @@ - If [code]true[/code], the application automatically accepts quitting. + If [code]true[/code], the application automatically accepts quitting requests. For mobile platforms, see [member quit_on_go_back]. @@ -249,7 +249,7 @@ - [method Node._process], [method Node._physics_process] and [method Node._input] will not be called anymore in nodes. - If [code]true[/code], the application quits automatically on going back (e.g. on Android). + If [code]true[/code], the application quits automatically when navigating back (e.g. using the system "Back" button on Android). To handle 'Go Back' button when this option is disabled, use [constant DisplayServer.WINDOW_EVENT_GO_BACK_REQUEST]. diff --git a/editor/editor_file_system.cpp b/editor/editor_file_system.cpp index b37d12e5eee..58080c08ae8 100644 --- a/editor/editor_file_system.cpp +++ b/editor/editor_file_system.cpp @@ -2568,8 +2568,7 @@ void EditorFileSystem::remove_import_format_support_query(Refparent = nullptr; diff --git a/editor/export/editor_export.cpp b/editor/export/editor_export.cpp index bc429e1111d..299523b3685 100644 --- a/editor/export/editor_export.cpp +++ b/editor/export/editor_export.cpp @@ -374,8 +374,6 @@ EditorExport::EditorExport() { singleton = this; set_process(true); - - GLOBAL_DEF("editor/export/convert_text_resources_to_binary", true); } EditorExport::~EditorExport() { diff --git a/editor/plugins/version_control_editor_plugin.cpp b/editor/plugins/version_control_editor_plugin.cpp index c404e12d394..1964835e24c 100644 --- a/editor/plugins/version_control_editor_plugin.cpp +++ b/editor/plugins/version_control_editor_plugin.cpp @@ -57,8 +57,8 @@ void VersionControlEditorPlugin::_create_vcs_metadata_files() { void VersionControlEditorPlugin::_notification(int p_what) { if (p_what == NOTIFICATION_READY) { - String installed_plugin = GLOBAL_DEF("editor/version_control/plugin_name", ""); - bool has_autoload_enable = GLOBAL_DEF("editor/version_control/autoload_on_startup", false); + String installed_plugin = GLOBAL_GET("editor/version_control/plugin_name"); + bool has_autoload_enable = GLOBAL_GET("editor/version_control/autoload_on_startup"); if (installed_plugin != "" && has_autoload_enable) { if (_load_plugin(installed_plugin)) { diff --git a/editor/register_editor_types.cpp b/editor/register_editor_types.cpp index d9138128cde..44624d201bf 100644 --- a/editor/register_editor_types.cpp +++ b/editor/register_editor_types.cpp @@ -221,6 +221,14 @@ void register_editor_types() { GLOBAL_DEF("editor/naming/default_signal_callback_name", "_on_{node_name}_{signal_name}"); GLOBAL_DEF("editor/naming/default_signal_callback_to_self_name", "_on_{signal_name}"); GLOBAL_DEF(PropertyInfo(Variant::INT, "editor/naming/scene_name_casing", PROPERTY_HINT_ENUM, "Auto,PascalCase,snake_case"), EditorNode::SCENE_NAME_CASING_SNAKE_CASE); + + GLOBAL_DEF("editor/import/reimport_missing_imported_files", true); + GLOBAL_DEF("editor/import/use_multiple_threads", true); + + GLOBAL_DEF("editor/export/convert_text_resources_to_binary", true); + + GLOBAL_DEF("editor/version_control/plugin_name", ""); + GLOBAL_DEF("editor/version_control/autoload_on_startup", false); } void unregister_editor_types() { diff --git a/main/main.cpp b/main/main.cpp index f4d2dbef52b..4ff83527e13 100644 --- a/main/main.cpp +++ b/main/main.cpp @@ -2630,7 +2630,7 @@ bool Main::start() { if (editor) { main_loop = memnew(SceneTree); } - String main_loop_type = GLOBAL_DEF("application/run/main_loop_type", "SceneTree"); + String main_loop_type = GLOBAL_GET("application/run/main_loop_type"); if (!script.is_empty()) { Ref