diff options
author | reduz <reduzio@gmail.com> | 2021-02-17 13:44:49 -0300 |
---|---|---|
committer | reduz <reduzio@gmail.com> | 2021-02-18 11:23:34 -0300 |
commit | 64140eaf4254a9d2e1fcd87451560f13959f1d24 (patch) | |
tree | 206f18b3f17f5c68b664ba008f2403275b1fd583 | |
parent | 8eaea1db5336cab62cf469c9860f18d69b4be929 (diff) |
Reorganize Project Settings
-Advanced Settings toggle also hides advanced properties when disabled
-Simplified Advanced Bar (errors were just plain redundant)
-Reorganized rendering quality settings.
-Reorganized miscelaneous settings for clean up.
64 files changed, 544 insertions, 497 deletions
diff --git a/core/config/project_settings.cpp b/core/config/project_settings.cpp index b4ca31d77a..541dbfa212 100644 --- a/core/config/project_settings.cpp +++ b/core/config/project_settings.cpp @@ -124,6 +124,11 @@ void ProjectSettings::set_restart_if_changed(const String &p_name, bool p_restar props[p_name].restart_if_changed = p_restart; } +void ProjectSettings::set_as_basic(const String &p_name, bool p_basic) { + ERR_FAIL_COND_MSG(!props.has(p_name), "Request for nonexistent project setting: " + p_name + "."); + props[p_name].basic = p_basic; +} + void ProjectSettings::set_ignore_value_in_docs(const String &p_name, bool p_ignore) { ERR_FAIL_COND_MSG(!props.has(p_name), "Request for nonexistent project setting: " + p_name + "."); #ifdef DEBUG_METHODS_ENABLED @@ -269,6 +274,10 @@ void ProjectSettings::_get_property_list(List<PropertyInfo> *p_list) const { vc.flags = PROPERTY_USAGE_EDITOR | PROPERTY_USAGE_STORAGE; } + if (v->basic) { + vc.flags |= PROPERTY_USAGE_EDITOR_BASIC_SETTING; + } + if (v->restart_if_changed) { vc.flags |= PROPERTY_USAGE_RESTART_IF_CHANGED; } @@ -278,7 +287,7 @@ void ProjectSettings::_get_property_list(List<PropertyInfo> *p_list) const { for (Set<_VCSort>::Element *E = vclist.front(); E; E = E->next()) { String prop_info_name = E->get().name; int dot = prop_info_name.find("."); - if (dot != -1) { + if (dot != -1 && !custom_prop_info.has(prop_info_name)) { prop_info_name = prop_info_name.substr(0, dot); } @@ -908,7 +917,7 @@ Error ProjectSettings::save_custom(const String &p_path, const CustomMap &p_cust } } -Variant _GLOBAL_DEF(const String &p_var, const Variant &p_default, bool p_restart_if_changed, bool p_ignore_value_in_docs) { +Variant _GLOBAL_DEF(const String &p_var, const Variant &p_default, bool p_restart_if_changed, bool p_ignore_value_in_docs, bool p_basic) { Variant ret; if (!ProjectSettings::get_singleton()->has_setting(p_var)) { ProjectSettings::get_singleton()->set(p_var, p_default); @@ -917,6 +926,7 @@ Variant _GLOBAL_DEF(const String &p_var, const Variant &p_default, bool p_restar ProjectSettings::get_singleton()->set_initial_value(p_var, p_default); ProjectSettings::get_singleton()->set_builtin_order(p_var); + ProjectSettings::get_singleton()->set_as_basic(p_var, p_basic); ProjectSettings::get_singleton()->set_restart_if_changed(p_var, p_restart_if_changed); ProjectSettings::get_singleton()->set_ignore_value_in_docs(p_var, p_ignore_value_in_docs); return ret; @@ -1058,18 +1068,18 @@ ProjectSettings::ProjectSettings() { Ref<InputEventKey> key; Ref<InputEventJoypadButton> joyb; - GLOBAL_DEF("application/config/name", ""); - GLOBAL_DEF("application/config/description", ""); + GLOBAL_DEF_BASIC("application/config/name", ""); + GLOBAL_DEF_BASIC("application/config/description", ""); custom_prop_info["application/config/description"] = PropertyInfo(Variant::STRING, "application/config/description", PROPERTY_HINT_MULTILINE_TEXT); - GLOBAL_DEF("application/run/main_scene", ""); + GLOBAL_DEF_BASIC("application/run/main_scene", ""); custom_prop_info["application/run/main_scene"] = PropertyInfo(Variant::STRING, "application/run/main_scene", PROPERTY_HINT_FILE, "*.tscn,*.scn,*.res"); GLOBAL_DEF("application/run/disable_stdout", false); GLOBAL_DEF("application/run/disable_stderr", false); GLOBAL_DEF("application/config/use_custom_user_dir", false); GLOBAL_DEF("application/config/custom_user_dir_name", ""); GLOBAL_DEF("application/config/project_settings_override", ""); - GLOBAL_DEF("audio/default_bus_layout", "res://default_bus_layout.tres"); - custom_prop_info["audio/default_bus_layout"] = PropertyInfo(Variant::STRING, "audio/default_bus_layout", PROPERTY_HINT_FILE, "*.tres"); + GLOBAL_DEF_BASIC("audio/buses/default_bus_layout", "res://default_bus_layout.tres"); + custom_prop_info["audio/buses/default_bus_layout"] = PropertyInfo(Variant::STRING, "audio/buses/default_bus_layout", PROPERTY_HINT_FILE, "*.tres"); PackedStringArray extensions = PackedStringArray(); extensions.push_back("gd"); @@ -1078,11 +1088,11 @@ ProjectSettings::ProjectSettings() { } extensions.push_back("shader"); - GLOBAL_DEF("editor/search_in_file_extensions", extensions); - custom_prop_info["editor/search_in_file_extensions"] = PropertyInfo(Variant::PACKED_STRING_ARRAY, "editor/search_in_file_extensions"); + GLOBAL_DEF("editor/script/search_in_file_extensions", extensions); + custom_prop_info["editor/script/search_in_file_extensions"] = PropertyInfo(Variant::PACKED_STRING_ARRAY, "editor/script/search_in_file_extensions"); - GLOBAL_DEF("editor/script_templates_search_path", "res://script_templates"); - custom_prop_info["editor/script_templates_search_path"] = PropertyInfo(Variant::STRING, "editor/script_templates_search_path", PROPERTY_HINT_DIR); + GLOBAL_DEF("editor/script/templates_search_path", "res://script_templates"); + custom_prop_info["editor/script/templates_search_path"] = PropertyInfo(Variant::STRING, "editor/script/templates_search_path", PROPERTY_HINT_DIR); action = Dictionary(); action["deadzone"] = Variant(0.5f); @@ -1243,7 +1253,7 @@ ProjectSettings::ProjectSettings() { input_presets.push_back("input/ui_end"); custom_prop_info["display/window/handheld/orientation"] = PropertyInfo(Variant::STRING, "display/window/handheld/orientation", PROPERTY_HINT_ENUM, "landscape,portrait,reverse_landscape,reverse_portrait,sensor_landscape,sensor_portrait,sensor"); - custom_prop_info["rendering/threads/thread_model"] = PropertyInfo(Variant::INT, "rendering/threads/thread_model", PROPERTY_HINT_ENUM, "Single-Unsafe,Single-Safe,Multi-Threaded"); + 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_thread", false); GLOBAL_DEF("physics/3d/run_on_thread", false); diff --git a/core/config/project_settings.h b/core/config/project_settings.h index 645506f302..2b230e06f9 100644 --- a/core/config/project_settings.h +++ b/core/config/project_settings.h @@ -58,6 +58,7 @@ protected: struct VariantContainer { int order = 0; bool persist = false; + bool basic = false; Variant variant; Variant initial; bool hide_from_editor = false; @@ -128,6 +129,7 @@ public: String globalize_path(const String &p_path) const; void set_initial_value(const String &p_name, const Variant &p_value); + void set_as_basic(const String &p_name, bool p_basic); void set_restart_if_changed(const String &p_name, bool p_restart); void set_ignore_value_in_docs(const String &p_name, bool p_ignore); bool get_ignore_value_in_docs(const String &p_name) const; @@ -174,11 +176,16 @@ public: }; //not a macro any longer -Variant _GLOBAL_DEF(const String &p_var, const Variant &p_default, bool p_restart_if_changed = false, bool p_ignore_value_in_docs = false); +Variant _GLOBAL_DEF(const String &p_var, const Variant &p_default, bool p_restart_if_changed = false, bool p_ignore_value_in_docs = false, bool p_basic = false); #define GLOBAL_DEF(m_var, m_value) _GLOBAL_DEF(m_var, m_value) #define GLOBAL_DEF_RST(m_var, m_value) _GLOBAL_DEF(m_var, m_value, true) #define GLOBAL_DEF_NOVAL(m_var, m_value) _GLOBAL_DEF(m_var, m_value, false, true) #define GLOBAL_DEF_RST_NOVAL(m_var, m_value) _GLOBAL_DEF(m_var, m_value, true, true) #define GLOBAL_GET(m_var) ProjectSettings::get_singleton()->get(m_var) +#define GLOBAL_DEF_BASIC(m_var, m_value) _GLOBAL_DEF(m_var, m_value, false, false, true) +#define GLOBAL_DEF_RST_BASIC(m_var, m_value) _GLOBAL_DEF(m_var, m_value, true, false, true) +#define GLOBAL_DEF_NOVAL_BASIC(m_var, m_value) _GLOBAL_DEF(m_var, m_value, false, true, true) +#define GLOBAL_DEF_RST_NOVAL_BASIC(m_var, m_value) _GLOBAL_DEF(m_var, m_value, true, true, true) + #endif // PROJECT_SETTINGS_H diff --git a/core/io/resource_loader.cpp b/core/io/resource_loader.cpp index 588af0f0ae..b34a083f1e 100644 --- a/core/io/resource_loader.cpp +++ b/core/io/resource_loader.cpp @@ -968,11 +968,11 @@ void ResourceLoader::reload_translation_remaps() { } void ResourceLoader::load_translation_remaps() { - if (!ProjectSettings::get_singleton()->has_setting("locale/translation_remaps")) { + if (!ProjectSettings::get_singleton()->has_setting("internationalization/locale/translation_remaps")) { return; } - Dictionary remaps = ProjectSettings::get_singleton()->get("locale/translation_remaps"); + Dictionary remaps = ProjectSettings::get_singleton()->get("internationalization/locale/translation_remaps"); List<Variant> keys; remaps.get_key_list(&keys); for (List<Variant>::Element *E = keys.front(); E; E = E->next()) { diff --git a/core/object/object.h b/core/object/object.h index b695ce9bc3..5021fa47a1 100644 --- a/core/object/object.h +++ b/core/object/object.h @@ -125,6 +125,7 @@ enum PropertyUsageFlags { PROPERTY_USAGE_KEYING_INCREMENTS = 1 << 25, // Used in inspector to increment property when keyed in animation player PROPERTY_USAGE_DEFERRED_SET_RESOURCE = 1 << 26, // when loading, the resource for this property can be set at the end of loading PROPERTY_USAGE_EDITOR_INSTANTIATE_OBJECT = 1 << 27, // For Object properties, instantiate them when creating in editor. + PROPERTY_USAGE_EDITOR_BASIC_SETTING = 1 << 28, //for project or editor settings, show when basic settings are selected PROPERTY_USAGE_DEFAULT = PROPERTY_USAGE_STORAGE | PROPERTY_USAGE_EDITOR | PROPERTY_USAGE_NETWORK, PROPERTY_USAGE_DEFAULT_INTL = PROPERTY_USAGE_STORAGE | PROPERTY_USAGE_EDITOR | PROPERTY_USAGE_NETWORK | PROPERTY_USAGE_INTERNATIONALIZED, diff --git a/core/string/translation.cpp b/core/string/translation.cpp index 5337d46aa3..0901944360 100644 --- a/core/string/translation.cpp +++ b/core/string/translation.cpp @@ -1191,14 +1191,14 @@ bool TranslationServer::_load_translations(const String &p_from) { } void TranslationServer::setup() { - String test = GLOBAL_DEF("locale/test", ""); + String test = GLOBAL_DEF("internationalization/locale/test", ""); test = test.strip_edges(); if (test != "") { set_locale(test); } else { set_locale(OS::get_singleton()->get_locale()); } - fallback = GLOBAL_DEF("locale/fallback", "en"); + fallback = GLOBAL_DEF("internationalization/locale/fallback", "en"); #ifdef TOOLS_ENABLED { String options = ""; @@ -1210,7 +1210,7 @@ void TranslationServer::setup() { options += locale_list[idx]; idx++; } - ProjectSettings::get_singleton()->set_custom_property_info("locale/fallback", PropertyInfo(Variant::STRING, "locale/fallback", PROPERTY_HINT_ENUM, options)); + ProjectSettings::get_singleton()->set_custom_property_info("internationalization/locale/fallback", PropertyInfo(Variant::STRING, "internationalization/locale/fallback", PROPERTY_HINT_ENUM, options)); } #endif } @@ -1307,11 +1307,11 @@ void TranslationServer::_bind_methods() { void TranslationServer::load_translations() { String locale = get_locale(); - _load_translations("locale/translations"); //all - _load_translations("locale/translations_" + locale.substr(0, 2)); + _load_translations("internationalization/locale/translations"); //all + _load_translations("internationalization/locale/translations_" + locale.substr(0, 2)); if (locale.substr(0, 2) != locale) { - _load_translations("locale/translations_" + locale); + _load_translations("internationalization/locale/translations_" + locale); } } diff --git a/drivers/alsa/audio_driver_alsa.cpp b/drivers/alsa/audio_driver_alsa.cpp index 3fd85733e0..bc6079f314 100644 --- a/drivers/alsa/audio_driver_alsa.cpp +++ b/drivers/alsa/audio_driver_alsa.cpp @@ -44,7 +44,7 @@ extern int initialize_pulse(); #endif Error AudioDriverALSA::init_device() { - mix_rate = GLOBAL_GET("audio/mix_rate"); + mix_rate = GLOBAL_GET("audio/driver/mix_rate"); speaker_mode = SPEAKER_MODE_STEREO; channels = 2; @@ -110,7 +110,7 @@ Error AudioDriverALSA::init_device() { // In ALSA the period size seems to be the one that will determine the actual latency // Ref: https://www.alsa-project.org/main/index.php/FramesPeriods unsigned int periods = 2; - int latency = GLOBAL_GET("audio/output_latency"); + int latency = GLOBAL_GET("audio/driver/output_latency"); buffer_frames = closest_power_of_2(latency * mix_rate / 1000); buffer_size = buffer_frames * periods; period_size = buffer_frames; diff --git a/drivers/coreaudio/audio_driver_coreaudio.cpp b/drivers/coreaudio/audio_driver_coreaudio.cpp index 6f88107086..baa60f5526 100644 --- a/drivers/coreaudio/audio_driver_coreaudio.cpp +++ b/drivers/coreaudio/audio_driver_coreaudio.cpp @@ -116,7 +116,7 @@ Error AudioDriverCoreAudio::init() { break; } - mix_rate = GLOBAL_GET("audio/mix_rate"); + mix_rate = GLOBAL_GET("audio/driver/mix_rate"); zeromem(&strdesc, sizeof(strdesc)); strdesc.mFormatID = kAudioFormatLinearPCM; @@ -131,7 +131,7 @@ Error AudioDriverCoreAudio::init() { result = AudioUnitSetProperty(audio_unit, kAudioUnitProperty_StreamFormat, kAudioUnitScope_Input, kOutputBus, &strdesc, sizeof(strdesc)); ERR_FAIL_COND_V(result != noErr, FAILED); - int latency = GLOBAL_GET("audio/output_latency"); + int latency = GLOBAL_GET("audio/driver/output_latency"); // Sample rate is independent of channels (ref: https://stackoverflow.com/questions/11048825/audio-sample-frequency-rely-on-channels) buffer_frames = closest_power_of_2(latency * mix_rate / 1000); @@ -157,7 +157,7 @@ Error AudioDriverCoreAudio::init() { result = AudioUnitInitialize(audio_unit); ERR_FAIL_COND_V(result != noErr, FAILED); - if (GLOBAL_GET("audio/enable_audio_input")) { + if (GLOBAL_GET("audio/driver/enable_input")) { return capture_init(); } return OK; @@ -403,7 +403,7 @@ Error AudioDriverCoreAudio::capture_init() { break; } - mix_rate = GLOBAL_GET("audio/mix_rate"); + mix_rate = GLOBAL_GET("audio/driver/mix_rate"); zeromem(&strdesc, sizeof(strdesc)); strdesc.mFormatID = kAudioFormatLinearPCM; diff --git a/drivers/pulseaudio/audio_driver_pulseaudio.cpp b/drivers/pulseaudio/audio_driver_pulseaudio.cpp index 2a0828ef0f..01bed4e735 100644 --- a/drivers/pulseaudio/audio_driver_pulseaudio.cpp +++ b/drivers/pulseaudio/audio_driver_pulseaudio.cpp @@ -179,7 +179,7 @@ Error AudioDriverPulseAudio::init_device() { break; } - int latency = GLOBAL_GET("audio/output_latency"); + int latency = GLOBAL_GET("audio/driver/output_latency"); buffer_frames = closest_power_of_2(latency * mix_rate / 1000); pa_buffer_size = buffer_frames * pa_map.channels; @@ -241,7 +241,7 @@ Error AudioDriverPulseAudio::init() { thread_exited = false; exit_thread = false; - mix_rate = GLOBAL_GET("audio/mix_rate"); + mix_rate = GLOBAL_GET("audio/driver/mix_rate"); pa_ml = pa_mainloop_new(); ERR_FAIL_COND_V(pa_ml == nullptr, ERR_CANT_OPEN); diff --git a/drivers/wasapi/audio_driver_wasapi.cpp b/drivers/wasapi/audio_driver_wasapi.cpp index f2d541754f..43c8722b06 100644 --- a/drivers/wasapi/audio_driver_wasapi.cpp +++ b/drivers/wasapi/audio_driver_wasapi.cpp @@ -387,7 +387,7 @@ Error AudioDriverWASAPI::finish_capture_device() { } Error AudioDriverWASAPI::init() { - mix_rate = GLOBAL_GET("audio/mix_rate"); + mix_rate = GLOBAL_GET("audio/driver/mix_rate"); Error err = init_render_device(); if (err != OK) { diff --git a/drivers/xaudio2/audio_driver_xaudio2.cpp b/drivers/xaudio2/audio_driver_xaudio2.cpp index 1bb8da769b..1c7bf5d6c6 100644 --- a/drivers/xaudio2/audio_driver_xaudio2.cpp +++ b/drivers/xaudio2/audio_driver_xaudio2.cpp @@ -44,12 +44,12 @@ Error AudioDriverXAudio2::init() { pcm_open = false; samples_in = nullptr; - mix_rate = GLOBAL_GET("audio/mix_rate"); + mix_rate = GLOBAL_GET("audio/driver/mix_rate"); // FIXME: speaker_mode seems unused in the Xaudio2 driver so far speaker_mode = SPEAKER_MODE_STEREO; channels = 2; - int latency = GLOBAL_GET("audio/output_latency"); + int latency = GLOBAL_GET("audio/driver/output_latency"); buffer_size = closest_power_of_2(latency * mix_rate / 1000); samples_in = memnew_arr(int32_t, buffer_size * channels); diff --git a/editor/dependency_editor.cpp b/editor/dependency_editor.cpp index 2780b74469..25e155aafe 100644 --- a/editor/dependency_editor.cpp +++ b/editor/dependency_editor.cpp @@ -480,8 +480,8 @@ void DependencyRemoveDialog::ok_pressed() { if (files_to_delete[i] == String(ProjectSettings::get_singleton()->get("application/boot_splash/image"))) { ProjectSettings::get_singleton()->set("application/boot_splash/image", ""); } - if (files_to_delete[i] == String(ProjectSettings::get_singleton()->get("rendering/environment/default_environment"))) { - ProjectSettings::get_singleton()->set("rendering/environment/default_environment", ""); + if (files_to_delete[i] == String(ProjectSettings::get_singleton()->get("rendering/environment/defaults/default_environment"))) { + ProjectSettings::get_singleton()->set("rendering/environment/defaults/default_environment", ""); } if (files_to_delete[i] == String(ProjectSettings::get_singleton()->get("display/mouse_cursor/custom_image"))) { ProjectSettings::get_singleton()->set("display/mouse_cursor/custom_image", ""); @@ -492,8 +492,8 @@ void DependencyRemoveDialog::ok_pressed() { if (files_to_delete[i] == String(ProjectSettings::get_singleton()->get("gui/theme/custom_font"))) { ProjectSettings::get_singleton()->set("gui/theme/custom_font", ""); } - if (files_to_delete[i] == String(ProjectSettings::get_singleton()->get("audio/default_bus_layout"))) { - ProjectSettings::get_singleton()->set("audio/default_bus_layout", ""); + if (files_to_delete[i] == String(ProjectSettings::get_singleton()->get("audio/buses/default_bus_layout"))) { + ProjectSettings::get_singleton()->set("audio/buses/default_bus_layout", ""); } String path = OS::get_singleton()->get_resource_dir() + files_to_delete[i].replace_first("res://", "/"); diff --git a/editor/editor_audio_buses.cpp b/editor/editor_audio_buses.cpp index 69a13957e6..9a826ab106 100644 --- a/editor/editor_audio_buses.cpp +++ b/editor/editor_audio_buses.cpp @@ -1191,7 +1191,7 @@ void EditorAudioBuses::_load_layout() { } void EditorAudioBuses::_load_default_layout() { - String layout_path = ProjectSettings::get_singleton()->get("audio/default_bus_layout"); + String layout_path = ProjectSettings::get_singleton()->get("audio/buses/default_bus_layout"); Ref<AudioBusLayout> state = ResourceLoader::load(layout_path, "", ResourceFormatLoader::CACHE_MODE_IGNORE); if (state.is_null()) { @@ -1257,7 +1257,7 @@ EditorAudioBuses::EditorAudioBuses() { add_child(top_hb); file = memnew(Label); - String layout_path = ProjectSettings::get_singleton()->get("audio/default_bus_layout"); + String layout_path = ProjectSettings::get_singleton()->get("audio/buses/default_bus_layout"); file->set_text(String(TTR("Layout")) + ": " + layout_path.get_file()); file->set_clip_text(true); file->set_h_size_flags(SIZE_EXPAND_FILL); @@ -1313,7 +1313,7 @@ EditorAudioBuses::EditorAudioBuses() { set_v_size_flags(SIZE_EXPAND_FILL); - edited_path = ProjectSettings::get_singleton()->get("audio/default_bus_layout"); + edited_path = ProjectSettings::get_singleton()->get("audio/buses/default_bus_layout"); file_dialog = memnew(EditorFileDialog); List<String> ext; diff --git a/editor/editor_export.cpp b/editor/editor_export.cpp index 24256b843e..949306de42 100644 --- a/editor/editor_export.cpp +++ b/editor/editor_export.cpp @@ -1403,9 +1403,9 @@ void EditorExport::add_export_preset(const Ref<EditorExportPreset> &p_preset, in } String EditorExportPlatform::test_etc2() const { - String driver = ProjectSettings::get_singleton()->get("rendering/quality/driver/driver_name"); - bool etc_supported = ProjectSettings::get_singleton()->get("rendering/vram_compression/import_etc"); - bool etc2_supported = ProjectSettings::get_singleton()->get("rendering/vram_compression/import_etc2"); + String driver = ProjectSettings::get_singleton()->get("rendering/driver/driver_name"); + bool etc_supported = ProjectSettings::get_singleton()->get("rendering/textures/vram_compression/import_etc"); + bool etc2_supported = ProjectSettings::get_singleton()->get("rendering/textures/vram_compression/import_etc2"); if (driver == "GLES2" && !etc_supported) { return TTR("Target platform requires 'ETC' texture compression for GLES2. Enable 'Import Etc' in Project Settings."); @@ -1417,9 +1417,9 @@ String EditorExportPlatform::test_etc2() const { } String EditorExportPlatform::test_etc2_or_pvrtc() const { - String driver = ProjectSettings::get_singleton()->get("rendering/quality/driver/driver_name"); - bool etc2_supported = ProjectSettings::get_singleton()->get("rendering/vram_compression/import_etc2"); - bool pvrtc_supported = ProjectSettings::get_singleton()->get("rendering/vram_compression/import_pvrtc"); + String driver = ProjectSettings::get_singleton()->get("rendering/driver/driver_name"); + bool etc2_supported = ProjectSettings::get_singleton()->get("rendering/textures/vram_compression/import_etc2"); + bool pvrtc_supported = ProjectSettings::get_singleton()->get("rendering/textures/vram_compression/import_pvrtc"); if (driver == "GLES2" && !pvrtc_supported) { return TTR("Target platform requires 'PVRTC' texture compression for GLES2. Enable 'Import Pvrtc' in Project Settings."); @@ -1902,7 +1902,7 @@ void EditorExportTextSceneToBinaryPlugin::_export_file(const String &p_path, con return; } - bool convert = GLOBAL_GET("editor/convert_text_resources_to_binary_on_export"); + bool convert = GLOBAL_GET("editor/export/convert_text_resources_to_binary"); if (!convert) { return; } @@ -1922,5 +1922,5 @@ void EditorExportTextSceneToBinaryPlugin::_export_file(const String &p_path, con } EditorExportTextSceneToBinaryPlugin::EditorExportTextSceneToBinaryPlugin() { - GLOBAL_DEF("editor/convert_text_resources_to_binary_on_export", false); + GLOBAL_DEF("editor/export/convert_text_resources_to_binary", false); } diff --git a/editor/editor_file_system.cpp b/editor/editor_file_system.cpp index 4b68de26e7..093c6f4279 100644 --- a/editor/editor_file_system.cpp +++ b/editor/editor_file_system.cpp @@ -2067,7 +2067,7 @@ void EditorFileSystem::_update_extensions() { EditorFileSystem::EditorFileSystem() { ResourceLoader::import = _resource_import; - reimport_on_missing_imported_files = GLOBAL_DEF("editor/reimport_missing_imported_files", true); + reimport_on_missing_imported_files = GLOBAL_DEF("editor/import/reimport_missing_imported_files", true); singleton = this; filesystem = memnew(EditorFileSystemDirectory); //like, empty diff --git a/editor/editor_inspector.cpp b/editor/editor_inspector.cpp index a7f808f63a..60071f6263 100644 --- a/editor/editor_inspector.cpp +++ b/editor/editor_inspector.cpp @@ -1689,7 +1689,7 @@ void EditorInspector::update_tree() { bool valid = true; //if no properties in category, skip while (N) { - if (N->get().usage & PROPERTY_USAGE_EDITOR) { + if (N->get().usage & PROPERTY_USAGE_EDITOR && (!restrict_to_basic || (N->get().usage & PROPERTY_USAGE_EDITOR_BASIC_SETTING))) { break; } if (N->get().usage & PROPERTY_USAGE_CATEGORY) { @@ -1757,7 +1757,7 @@ void EditorInspector::update_tree() { continue; - } else if (!(p.usage & PROPERTY_USAGE_EDITOR) || _is_property_disabled_by_feature_profile(p.name)) { + } else if (!(p.usage & PROPERTY_USAGE_EDITOR) || _is_property_disabled_by_feature_profile(p.name) || (restrict_to_basic && !(p.usage & PROPERTY_USAGE_EDITOR_BASIC_SETTING))) { continue; } @@ -2620,6 +2620,11 @@ void EditorInspector::_update_script_class_properties(const Object &p_object, Li r_list.erase(bottom); } +void EditorInspector::set_restrict_to_basic_settings(bool p_restrict) { + restrict_to_basic = p_restrict; + update_tree(); +} + void EditorInspector::_bind_methods() { ClassDB::bind_method("_edit_request_change", &EditorInspector::_edit_request_change); diff --git a/editor/editor_inspector.h b/editor/editor_inspector.h index b98801975f..18250780be 100644 --- a/editor/editor_inspector.h +++ b/editor/editor_inspector.h @@ -313,6 +313,8 @@ class EditorInspector : public ScrollContainer { String property_prefix; //used for sectioned inspector String object_class; + bool restrict_to_basic = false; + void _edit_set(const String &p_name, const Variant &p_value, bool p_refresh_all, const String &p_changed_field); void _property_changed(const String &p_path, const Variant &p_value, const String &p_name = "", bool p_changing = false); @@ -400,6 +402,8 @@ public: void set_use_deletable_properties(bool p_enabled); + void set_restrict_to_basic_settings(bool p_restrict); + EditorInspector(); }; diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp index 72bf39a367..cdbc4a0de9 100644 --- a/editor/editor_node.cpp +++ b/editor/editor_node.cpp @@ -431,70 +431,70 @@ void EditorNode::_unhandled_input(const Ref<InputEvent> &p_event) { } void EditorNode::_update_from_settings() { - int current_filter = GLOBAL_GET("rendering/canvas_textures/default_texture_filter"); + int current_filter = GLOBAL_GET("rendering/textures/canvas_textures/default_texture_filter"); if (current_filter != scene_root->get_default_canvas_item_texture_filter()) { Viewport::DefaultCanvasItemTextureFilter tf = (Viewport::DefaultCanvasItemTextureFilter)current_filter; scene_root->set_default_canvas_item_texture_filter(tf); } - int current_repeat = GLOBAL_GET("rendering/canvas_textures/default_texture_repeat"); + int current_repeat = GLOBAL_GET("rendering/textures/canvas_textures/default_texture_repeat"); if (current_repeat != scene_root->get_default_canvas_item_texture_repeat()) { Viewport::DefaultCanvasItemTextureRepeat tr = (Viewport::DefaultCanvasItemTextureRepeat)current_repeat; scene_root->set_default_canvas_item_texture_repeat(tr); } - RS::DOFBokehShape dof_shape = RS::DOFBokehShape(int(GLOBAL_GET("rendering/quality/depth_of_field/depth_of_field_bokeh_shape"))); + RS::DOFBokehShape dof_shape = RS::DOFBokehShape(int(GLOBAL_GET("rendering/camera/depth_of_field/depth_of_field_bokeh_shape"))); RS::get_singleton()->camera_effects_set_dof_blur_bokeh_shape(dof_shape); - RS::DOFBlurQuality dof_quality = RS::DOFBlurQuality(int(GLOBAL_GET("rendering/quality/depth_of_field/depth_of_field_bokeh_quality"))); - bool dof_jitter = GLOBAL_GET("rendering/quality/depth_of_field/depth_of_field_use_jitter"); + RS::DOFBlurQuality dof_quality = RS::DOFBlurQuality(int(GLOBAL_GET("rendering/camera/depth_of_field/depth_of_field_bokeh_quality"))); + bool dof_jitter = GLOBAL_GET("rendering/camera/depth_of_field/depth_of_field_use_jitter"); RS::get_singleton()->camera_effects_set_dof_blur_quality(dof_quality, dof_jitter); - RS::get_singleton()->environment_set_ssao_quality(RS::EnvironmentSSAOQuality(int(GLOBAL_GET("rendering/quality/ssao/quality"))), GLOBAL_GET("rendering/quality/ssao/half_size"), GLOBAL_GET("rendering/quality/ssao/adaptive_target"), GLOBAL_GET("rendering/quality/ssao/blur_passes"), GLOBAL_GET("rendering/quality/ssao/fadeout_from"), GLOBAL_GET("rendering/quality/ssao/fadeout_to")); - RS::get_singleton()->screen_space_roughness_limiter_set_active(GLOBAL_GET("rendering/quality/screen_filters/screen_space_roughness_limiter_enabled"), GLOBAL_GET("rendering/quality/screen_filters/screen_space_roughness_limiter_amount"), GLOBAL_GET("rendering/quality/screen_filters/screen_space_roughness_limiter_limit")); - bool glow_bicubic = int(GLOBAL_GET("rendering/quality/glow/upscale_mode")) > 0; + RS::get_singleton()->environment_set_ssao_quality(RS::EnvironmentSSAOQuality(int(GLOBAL_GET("rendering/environment/ssao/quality"))), GLOBAL_GET("rendering/environment/ssao/half_size"), GLOBAL_GET("rendering/environment/ssao/adaptive_target"), GLOBAL_GET("rendering/environment/ssao/blur_passes"), GLOBAL_GET("rendering/environment/ssao/fadeout_from"), GLOBAL_GET("rendering/environment/ssao/fadeout_to")); + RS::get_singleton()->screen_space_roughness_limiter_set_active(GLOBAL_GET("rendering/anti_aliasing/screen_space_roughness_limiter/enabled"), GLOBAL_GET("rendering/anti_aliasing/screen_space_roughness_limiter/amount"), GLOBAL_GET("rendering/anti_aliasing/screen_space_roughness_limiter/limit")); + bool glow_bicubic = int(GLOBAL_GET("rendering/environment/glow/upscale_mode")) > 0; RS::get_singleton()->environment_glow_set_use_bicubic_upscale(glow_bicubic); - bool glow_high_quality = GLOBAL_GET("rendering/quality/glow/use_high_quality"); + bool glow_high_quality = GLOBAL_GET("rendering/environment/glow/use_high_quality"); RS::get_singleton()->environment_glow_set_use_high_quality(glow_high_quality); - RS::EnvironmentSSRRoughnessQuality ssr_roughness_quality = RS::EnvironmentSSRRoughnessQuality(int(GLOBAL_GET("rendering/quality/screen_space_reflection/roughness_quality"))); + RS::EnvironmentSSRRoughnessQuality ssr_roughness_quality = RS::EnvironmentSSRRoughnessQuality(int(GLOBAL_GET("rendering/environment/screen_space_reflection/roughness_quality"))); RS::get_singleton()->environment_set_ssr_roughness_quality(ssr_roughness_quality); - RS::SubSurfaceScatteringQuality sss_quality = RS::SubSurfaceScatteringQuality(int(GLOBAL_GET("rendering/quality/subsurface_scattering/subsurface_scattering_quality"))); + RS::SubSurfaceScatteringQuality sss_quality = RS::SubSurfaceScatteringQuality(int(GLOBAL_GET("rendering/environment/subsurface_scattering/subsurface_scattering_quality"))); RS::get_singleton()->sub_surface_scattering_set_quality(sss_quality); - float sss_scale = GLOBAL_GET("rendering/quality/subsurface_scattering/subsurface_scattering_scale"); - float sss_depth_scale = GLOBAL_GET("rendering/quality/subsurface_scattering/subsurface_scattering_depth_scale"); + float sss_scale = GLOBAL_GET("rendering/environment/subsurface_scattering/subsurface_scattering_scale"); + float sss_depth_scale = GLOBAL_GET("rendering/environment/subsurface_scattering/subsurface_scattering_depth_scale"); RS::get_singleton()->sub_surface_scattering_set_scale(sss_scale, sss_depth_scale); - uint32_t directional_shadow_size = GLOBAL_GET("rendering/quality/directional_shadow/size"); - uint32_t directional_shadow_16_bits = GLOBAL_GET("rendering/quality/directional_shadow/16_bits"); + uint32_t directional_shadow_size = GLOBAL_GET("rendering/shadows/directional_shadow/size"); + uint32_t directional_shadow_16_bits = GLOBAL_GET("rendering/shadows/directional_shadow/16_bits"); RS::get_singleton()->directional_shadow_atlas_set_size(directional_shadow_size, directional_shadow_16_bits); - RS::ShadowQuality shadows_quality = RS::ShadowQuality(int(GLOBAL_GET("rendering/quality/shadows/soft_shadow_quality"))); + RS::ShadowQuality shadows_quality = RS::ShadowQuality(int(GLOBAL_GET("rendering/shadows/shadows/soft_shadow_quality"))); RS::get_singleton()->shadows_quality_set(shadows_quality); - RS::ShadowQuality directional_shadow_quality = RS::ShadowQuality(int(GLOBAL_GET("rendering/quality/directional_shadow/soft_shadow_quality"))); + RS::ShadowQuality directional_shadow_quality = RS::ShadowQuality(int(GLOBAL_GET("rendering/shadows/directional_shadow/soft_shadow_quality"))); RS::get_singleton()->directional_shadow_quality_set(directional_shadow_quality); - float probe_update_speed = GLOBAL_GET("rendering/lightmapper/probe_capture_update_speed"); + float probe_update_speed = GLOBAL_GET("rendering/lightmapping/probe_capture/update_speed"); RS::get_singleton()->lightmap_set_probe_capture_update_speed(probe_update_speed); - RS::EnvironmentSDFGIFramesToConverge frames_to_converge = RS::EnvironmentSDFGIFramesToConverge(int(GLOBAL_GET("rendering/sdfgi/frames_to_converge"))); + RS::EnvironmentSDFGIFramesToConverge frames_to_converge = RS::EnvironmentSDFGIFramesToConverge(int(GLOBAL_GET("rendering/global_illumination/sdfgi/frames_to_converge"))); RS::get_singleton()->environment_set_sdfgi_frames_to_converge(frames_to_converge); - RS::EnvironmentSDFGIRayCount ray_count = RS::EnvironmentSDFGIRayCount(int(GLOBAL_GET("rendering/sdfgi/probe_ray_count"))); + RS::EnvironmentSDFGIRayCount ray_count = RS::EnvironmentSDFGIRayCount(int(GLOBAL_GET("rendering/global_illumination/sdfgi/probe_ray_count"))); RS::get_singleton()->environment_set_sdfgi_ray_count(ray_count); - RS::GIProbeQuality gi_probe_quality = RS::GIProbeQuality(int(GLOBAL_GET("rendering/quality/gi_probes/quality"))); + RS::GIProbeQuality gi_probe_quality = RS::GIProbeQuality(int(GLOBAL_GET("rendering/global_illumination/gi_probes/quality"))); RS::get_singleton()->gi_probe_set_quality(gi_probe_quality); - RS::get_singleton()->environment_set_volumetric_fog_volume_size(GLOBAL_GET("rendering/volumetric_fog/volume_size"), GLOBAL_GET("rendering/volumetric_fog/volume_depth")); - RS::get_singleton()->environment_set_volumetric_fog_filter_active(bool(GLOBAL_GET("rendering/volumetric_fog/use_filter"))); - RS::get_singleton()->canvas_set_shadow_texture_size(GLOBAL_GET("rendering/quality/2d_shadow_atlas/size")); + RS::get_singleton()->environment_set_volumetric_fog_volume_size(GLOBAL_GET("rendering/environment/volumetric_fog/volume_size"), GLOBAL_GET("rendering/environment/volumetric_fog/volume_depth")); + RS::get_singleton()->environment_set_volumetric_fog_filter_active(bool(GLOBAL_GET("rendering/environment/volumetric_fog/use_filter"))); + RS::get_singleton()->canvas_set_shadow_texture_size(GLOBAL_GET("rendering/2d/shadow_atlas/size")); - bool use_half_res_gi = GLOBAL_DEF("rendering/quality/gi/use_half_resolution", false); + bool use_half_res_gi = GLOBAL_DEF("rendering/global_illumination/gi/use_half_resolution", false); RS::get_singleton()->gi_set_use_half_resolution(use_half_res_gi); - bool snap_2d_transforms = GLOBAL_GET("rendering/quality/2d/snap_2d_transforms_to_pixel"); + bool snap_2d_transforms = GLOBAL_GET("rendering/2d/snap/snap_2d_transforms_to_pixel"); scene_root->set_snap_2d_transforms_to_pixel(snap_2d_transforms); - bool snap_2d_vertices = GLOBAL_GET("rendering/quality/2d/snap_2d_vertices_to_pixel"); + bool snap_2d_vertices = GLOBAL_GET("rendering/2d/snap/snap_2d_vertices_to_pixel"); scene_root->set_snap_2d_vertices_to_pixel(snap_2d_vertices); - Viewport::SDFOversize sdf_oversize = Viewport::SDFOversize(int(GLOBAL_GET("rendering/quality/2d_sdf/oversize"))); + Viewport::SDFOversize sdf_oversize = Viewport::SDFOversize(int(GLOBAL_GET("rendering/2d/sdf/oversize"))); scene_root->set_sdf_oversize(sdf_oversize); - Viewport::SDFScale sdf_scale = Viewport::SDFScale(int(GLOBAL_GET("rendering/quality/2d_sdf/scale"))); + Viewport::SDFScale sdf_scale = Viewport::SDFScale(int(GLOBAL_GET("rendering/2d/sdf/scale"))); scene_root->set_sdf_scale(sdf_scale); - float lod_threshold = GLOBAL_GET("rendering/quality/mesh_lod/threshold_pixels"); + float lod_threshold = GLOBAL_GET("rendering/mesh_lod/lod_change/threshold_pixels"); scene_root->set_lod_threshold(lod_threshold); } @@ -2260,7 +2260,7 @@ void EditorNode::_run(bool p_current, const String &p_custom) { List<String> breakpoints; editor_data.get_editor_breakpoints(&breakpoints); - args = ProjectSettings::get_singleton()->get("editor/main_run_args"); + args = ProjectSettings::get_singleton()->get("editor/run/main_run_args"); skip_breakpoints = EditorDebuggerNode::get_singleton()->is_skip_breakpoints(); EditorDebuggerNode::get_singleton()->start(); @@ -2789,7 +2789,7 @@ void EditorNode::_menu_option_confirm(int p_option, bool p_confirmed) { } break; case SET_VIDEO_DRIVER_SAVE_AND_RESTART: { - ProjectSettings::get_singleton()->set("rendering/quality/driver/driver_name", video_driver_request); + ProjectSettings::get_singleton()->set("rendering/driver/driver_name", video_driver_request); ProjectSettings::get_singleton()->save(); save_all_scenes(); @@ -5839,7 +5839,7 @@ EditorNode::EditorNode() { register_exporters(); - GLOBAL_DEF("editor/main_run_args", ""); + GLOBAL_DEF("editor/run/main_run_args", ""); ClassDB::set_class_enabled("RootMotionView", true); @@ -6457,7 +6457,7 @@ EditorNode::EditorNode() { #warning needs to be reimplemented #endif #if 0 - String video_drivers = ProjectSettings::get_singleton()->get_custom_property_info()["rendering/quality/driver/driver_name"].hint_string; + String video_drivers = ProjectSettings::get_singleton()->get_custom_property_info()["rendering/driver/driver_name"].hint_string; String current_video_driver = OS::get_singleton()->get_video_driver_name(OS::get_singleton()->get_current_video_driver()); video_driver_current = 0; for (int i = 0; i < video_drivers.get_slice_count(","); i++) { diff --git a/editor/editor_sectioned_inspector.cpp b/editor/editor_sectioned_inspector.cpp index fb4821a760..f81c87be9e 100644 --- a/editor/editor_sectioned_inspector.cpp +++ b/editor/editor_sectioned_inspector.cpp @@ -226,7 +226,7 @@ void SectionedInspector::update_category_list() { if (pi.usage & PROPERTY_USAGE_CATEGORY) { continue; - } else if (!(pi.usage & PROPERTY_USAGE_EDITOR)) { + } else if (!(pi.usage & PROPERTY_USAGE_EDITOR) || (restrict_to_basic && !(pi.usage & PROPERTY_USAGE_EDITOR_BASIC_SETTING))) { continue; } @@ -294,6 +294,12 @@ EditorInspector *SectionedInspector::get_inspector() { return inspector; } +void SectionedInspector::set_restrict_to_basic_settings(bool p_restrict) { + restrict_to_basic = p_restrict; + update_category_list(); + inspector->set_restrict_to_basic_settings(p_restrict); +} + SectionedInspector::SectionedInspector() : sections(memnew(Tree)), filter(memnew(SectionedInspectorFilter)), diff --git a/editor/editor_sectioned_inspector.h b/editor/editor_sectioned_inspector.h index 55fb94fecc..1068a4f932 100644 --- a/editor/editor_sectioned_inspector.h +++ b/editor/editor_sectioned_inspector.h @@ -51,6 +51,8 @@ class SectionedInspector : public HSplitContainer { String selected_category; + bool restrict_to_basic = false; + static void _bind_methods(); void _section_selected(); @@ -65,6 +67,7 @@ public: void set_current_section(const String &p_section); String get_current_section() const; + void set_restrict_to_basic_settings(bool p_restrict); void update_category_list(); SectionedInspector(); diff --git a/editor/editor_settings.cpp b/editor/editor_settings.cpp index b6fa2f6d03..c530058c80 100644 --- a/editor/editor_settings.cpp +++ b/editor/editor_settings.cpp @@ -1285,7 +1285,7 @@ String EditorSettings::get_script_templates_dir() const { } String EditorSettings::get_project_script_templates_dir() const { - return ProjectSettings::get_singleton()->get("editor/script_templates_search_path"); + return ProjectSettings::get_singleton()->get("editor/script/templates_search_path"); } // Cache directory diff --git a/editor/find_in_files.cpp b/editor/find_in_files.cpp index 27e539d71c..47079a92b7 100644 --- a/editor/find_in_files.cpp +++ b/editor/find_in_files.cpp @@ -463,7 +463,7 @@ void FindInFilesDialog::_notification(int p_what) { for (int i = 0; i < _filters_container->get_child_count(); i++) { _filters_container->get_child(i)->queue_delete(); } - Array exts = ProjectSettings::get_singleton()->get("editor/search_in_file_extensions"); + Array exts = ProjectSettings::get_singleton()->get("editor/script/search_in_file_extensions"); for (int i = 0; i < exts.size(); ++i) { CheckBox *cb = memnew(CheckBox); cb->set_text(exts[i]); diff --git a/editor/import/resource_importer_layered_texture.cpp b/editor/import/resource_importer_layered_texture.cpp index 3139ef5146..6d2215c379 100644 --- a/editor/import/resource_importer_layered_texture.cpp +++ b/editor/import/resource_importer_layered_texture.cpp @@ -391,8 +391,8 @@ Error ResourceImporterLayeredTexture::import(const String &p_source_file, const bool ok_on_pc = false; bool is_hdr = (image->get_format() >= Image::FORMAT_RF && image->get_format() <= Image::FORMAT_RGBE9995); bool is_ldr = (image->get_format() >= Image::FORMAT_L8 && image->get_format() <= Image::FORMAT_RGB565); - bool can_bptc = ProjectSettings::get_singleton()->get("rendering/vram_compression/import_bptc"); - bool can_s3tc = ProjectSettings::get_singleton()->get("rendering/vram_compression/import_s3tc"); + bool can_bptc = ProjectSettings::get_singleton()->get("rendering/textures/vram_compression/import_bptc"); + bool can_s3tc = ProjectSettings::get_singleton()->get("rendering/textures/vram_compression/import_s3tc"); if (can_bptc) { formats_imported.push_back("bptc"); //needs to be aded anyway @@ -447,13 +447,13 @@ Error ResourceImporterLayeredTexture::import(const String &p_source_file, const ok_on_pc = true; } - if (ProjectSettings::get_singleton()->get("rendering/vram_compression/import_etc2")) { + if (ProjectSettings::get_singleton()->get("rendering/textures/vram_compression/import_etc2")) { _save_tex(slices, p_save_path + ".etc2." + extension, compress_mode, lossy, Image::COMPRESS_ETC2, csource, used_channels, mipmaps, true); r_platform_variants->push_back("etc2"); formats_imported.push_back("etc2"); } - if (ProjectSettings::get_singleton()->get("rendering/vram_compression/import_pvrtc")) { + if (ProjectSettings::get_singleton()->get("rendering/textures/vram_compression/import_pvrtc")) { _save_tex(slices, p_save_path + ".etc2." + extension, compress_mode, lossy, Image::COMPRESS_ETC2, csource, used_channels, mipmaps, true); r_platform_variants->push_back("pvrtc"); formats_imported.push_back("pvrtc"); @@ -492,7 +492,7 @@ String ResourceImporterLayeredTexture::get_import_settings_string() const { int index = 0; while (compression_formats[index]) { - String setting_path = "rendering/vram_compression/import_" + String(compression_formats[index]); + String setting_path = "rendering/textures/vram_compression/import_" + String(compression_formats[index]); bool test = ProjectSettings::get_singleton()->get(setting_path); if (test) { s += String(compression_formats[index]); @@ -524,7 +524,7 @@ bool ResourceImporterLayeredTexture::are_import_settings_valid(const String &p_p int index = 0; bool valid = true; while (compression_formats[index]) { - String setting_path = "rendering/vram_compression/import_" + String(compression_formats[index]); + String setting_path = "rendering/textures/vram_compression/import_" + String(compression_formats[index]); bool test = ProjectSettings::get_singleton()->get(setting_path); if (test) { if (formats_imported.find(compression_formats[index]) == -1) { diff --git a/editor/import/resource_importer_texture.cpp b/editor/import/resource_importer_texture.cpp index eb16e873e6..de8031af35 100644 --- a/editor/import/resource_importer_texture.cpp +++ b/editor/import/resource_importer_texture.cpp @@ -172,7 +172,7 @@ bool ResourceImporterTexture::get_option_visibility(const String &p_option, cons if (compress_mode < COMPRESS_VRAM_COMPRESSED) { return false; } - if (!ProjectSettings::get_singleton()->get("rendering/vram_compression/import_bptc")) { + if (!ProjectSettings::get_singleton()->get("rendering/textures/vram_compression/import_bptc")) { return false; } } @@ -473,8 +473,8 @@ Error ResourceImporterTexture::import(const String &p_source_file, const String bool ok_on_pc = false; bool is_hdr = (image->get_format() >= Image::FORMAT_RF && image->get_format() <= Image::FORMAT_RGBE9995); bool is_ldr = (image->get_format() >= Image::FORMAT_L8 && image->get_format() <= Image::FORMAT_RGB565); - bool can_bptc = ProjectSettings::get_singleton()->get("rendering/vram_compression/import_bptc"); - bool can_s3tc = ProjectSettings::get_singleton()->get("rendering/vram_compression/import_s3tc"); + bool can_bptc = ProjectSettings::get_singleton()->get("rendering/textures/vram_compression/import_bptc"); + bool can_s3tc = ProjectSettings::get_singleton()->get("rendering/textures/vram_compression/import_s3tc"); if (can_bptc) { //add to the list anyway @@ -524,19 +524,19 @@ Error ResourceImporterTexture::import(const String &p_source_file, const String ok_on_pc = true; } - if (ProjectSettings::get_singleton()->get("rendering/vram_compression/import_etc2")) { + if (ProjectSettings::get_singleton()->get("rendering/textures/vram_compression/import_etc2")) { _save_stex(image, p_save_path + ".etc2.stex", compress_mode, lossy, Image::COMPRESS_ETC2, mipmaps, stream, detect_3d, detect_roughness, detect_normal, force_normal, srgb_friendly_pack, true, mipmap_limit, normal_image, roughness_channel); r_platform_variants->push_back("etc2"); formats_imported.push_back("etc2"); } - if (ProjectSettings::get_singleton()->get("rendering/vram_compression/import_etc")) { + if (ProjectSettings::get_singleton()->get("rendering/textures/vram_compression/import_etc")) { _save_stex(image, p_save_path + ".etc.stex", compress_mode, lossy, Image::COMPRESS_ETC, mipmaps, stream, detect_3d, detect_roughness, detect_normal, force_normal, srgb_friendly_pack, true, mipmap_limit, normal_image, roughness_channel); r_platform_variants->push_back("etc"); formats_imported.push_back("etc"); } - if (ProjectSettings::get_singleton()->get("rendering/vram_compression/import_pvrtc")) { + if (ProjectSettings::get_singleton()->get("rendering/textures/vram_compression/import_pvrtc")) { _save_stex(image, p_save_path + ".pvrtc.stex", compress_mode, lossy, Image::COMPRESS_PVRTC1_4, mipmaps, stream, detect_3d, detect_roughness, detect_normal, force_normal, srgb_friendly_pack, true, mipmap_limit, normal_image, roughness_channel); r_platform_variants->push_back("pvrtc"); formats_imported.push_back("pvrtc"); @@ -574,7 +574,7 @@ String ResourceImporterTexture::get_import_settings_string() const { int index = 0; while (compression_formats[index]) { - String setting_path = "rendering/vram_compression/import_" + String(compression_formats[index]); + String setting_path = "rendering/textures/vram_compression/import_" + String(compression_formats[index]); bool test = ProjectSettings::get_singleton()->get(setting_path); if (test) { s += String(compression_formats[index]); @@ -606,7 +606,7 @@ bool ResourceImporterTexture::are_import_settings_valid(const String &p_path) co int index = 0; bool valid = true; while (compression_formats[index]) { - String setting_path = "rendering/vram_compression/import_" + String(compression_formats[index]); + String setting_path = "rendering/textures/vram_compression/import_" + String(compression_formats[index]); bool test = ProjectSettings::get_singleton()->get(setting_path); if (test) { if (formats_imported.find(compression_formats[index]) == -1) { diff --git a/editor/localization_editor.cpp b/editor/localization_editor.cpp index 60553143d5..0e68af06f0 100644 --- a/editor/localization_editor.cpp +++ b/editor/localization_editor.cpp @@ -84,7 +84,7 @@ void LocalizationEditor::add_translation(const String &p_translation) { } void LocalizationEditor::_translation_add(const PackedStringArray &p_paths) { - PackedStringArray translations = ProjectSettings::get_singleton()->get("locale/translations"); + PackedStringArray translations = ProjectSettings::get_singleton()->get("internationalization/locale/translations"); for (int i = 0; i < p_paths.size(); i++) { if (!translations.has(p_paths[i])) { // Don't add duplicate translation paths. @@ -93,8 +93,8 @@ void LocalizationEditor::_translation_add(const PackedStringArray &p_paths) { } undo_redo->create_action(vformat(TTR("Add %d Translations"), p_paths.size())); - undo_redo->add_do_property(ProjectSettings::get_singleton(), "locale/translations", translations); - undo_redo->add_undo_property(ProjectSettings::get_singleton(), "locale/translations", ProjectSettings::get_singleton()->get("locale/translations")); + undo_redo->add_do_property(ProjectSettings::get_singleton(), "internationalization/locale/translations", translations); + undo_redo->add_undo_property(ProjectSettings::get_singleton(), "internationalization/locale/translations", ProjectSettings::get_singleton()->get("internationalization/locale/translations")); undo_redo->add_do_method(this, "update_translations"); undo_redo->add_undo_method(this, "update_translations"); undo_redo->add_do_method(this, "emit_signal", localization_changed); @@ -112,15 +112,15 @@ void LocalizationEditor::_translation_delete(Object *p_item, int p_column, int p int idx = ti->get_metadata(0); - PackedStringArray translations = ProjectSettings::get_singleton()->get("locale/translations"); + PackedStringArray translations = ProjectSettings::get_singleton()->get("internationalization/locale/translations"); ERR_FAIL_INDEX(idx, translations.size()); translations.remove(idx); undo_redo->create_action(TTR("Remove Translation")); - undo_redo->add_do_property(ProjectSettings::get_singleton(), "locale/translations", translations); - undo_redo->add_undo_property(ProjectSettings::get_singleton(), "locale/translations", ProjectSettings::get_singleton()->get("locale/translations")); + undo_redo->add_do_property(ProjectSettings::get_singleton(), "internationalization/locale/translations", translations); + undo_redo->add_undo_property(ProjectSettings::get_singleton(), "internationalization/locale/translations", ProjectSettings::get_singleton()->get("internationalization/locale/translations")); undo_redo->add_do_method(this, "update_translations"); undo_redo->add_undo_method(this, "update_translations"); undo_redo->add_do_method(this, "emit_signal", localization_changed); @@ -136,8 +136,8 @@ void LocalizationEditor::_translation_res_add(const PackedStringArray &p_paths) Variant prev; Dictionary remaps; - if (ProjectSettings::get_singleton()->has_setting("locale/translation_remaps")) { - remaps = ProjectSettings::get_singleton()->get("locale/translation_remaps"); + if (ProjectSettings::get_singleton()->has_setting("internationalization/locale/translation_remaps")) { + remaps = ProjectSettings::get_singleton()->get("internationalization/locale/translation_remaps"); prev = remaps; } @@ -149,8 +149,8 @@ void LocalizationEditor::_translation_res_add(const PackedStringArray &p_paths) } undo_redo->create_action(vformat(TTR("Translation Resource Remap: Add %d Path(s)"), p_paths.size())); - undo_redo->add_do_property(ProjectSettings::get_singleton(), "locale/translation_remaps", remaps); - undo_redo->add_undo_property(ProjectSettings::get_singleton(), "locale/translation_remaps", prev); + undo_redo->add_do_property(ProjectSettings::get_singleton(), "internationalization/locale/translation_remaps", remaps); + undo_redo->add_undo_property(ProjectSettings::get_singleton(), "internationalization/locale/translation_remaps", prev); undo_redo->add_do_method(this, "update_translations"); undo_redo->add_undo_method(this, "update_translations"); undo_redo->add_do_method(this, "emit_signal", localization_changed); @@ -163,9 +163,9 @@ void LocalizationEditor::_translation_res_option_file_open() { } void LocalizationEditor::_translation_res_option_add(const PackedStringArray &p_paths) { - ERR_FAIL_COND(!ProjectSettings::get_singleton()->has_setting("locale/translation_remaps")); + ERR_FAIL_COND(!ProjectSettings::get_singleton()->has_setting("internationalization/locale/translation_remaps")); - Dictionary remaps = ProjectSettings::get_singleton()->get("locale/translation_remaps"); + Dictionary remaps = ProjectSettings::get_singleton()->get("internationalization/locale/translation_remaps"); TreeItem *k = translation_remap->get_selected(); ERR_FAIL_COND(!k); @@ -180,8 +180,8 @@ void LocalizationEditor::_translation_res_option_add(const PackedStringArray &p_ remaps[key] = r; undo_redo->create_action(vformat(TTR("Translation Resource Remap: Add %d Remap(s)"), p_paths.size())); - undo_redo->add_do_property(ProjectSettings::get_singleton(), "locale/translation_remaps", remaps); - undo_redo->add_undo_property(ProjectSettings::get_singleton(), "locale/translation_remaps", ProjectSettings::get_singleton()->get("locale/translation_remaps")); + undo_redo->add_do_property(ProjectSettings::get_singleton(), "internationalization/locale/translation_remaps", remaps); + undo_redo->add_undo_property(ProjectSettings::get_singleton(), "internationalization/locale/translation_remaps", ProjectSettings::get_singleton()->get("internationalization/locale/translation_remaps")); undo_redo->add_do_method(this, "update_translations"); undo_redo->add_undo_method(this, "update_translations"); undo_redo->add_do_method(this, "emit_signal", localization_changed); @@ -202,11 +202,11 @@ void LocalizationEditor::_translation_res_option_changed() { return; } - if (!ProjectSettings::get_singleton()->has_setting("locale/translation_remaps")) { + if (!ProjectSettings::get_singleton()->has_setting("internationalization/locale/translation_remaps")) { return; } - Dictionary remaps = ProjectSettings::get_singleton()->get("locale/translation_remaps"); + Dictionary remaps = ProjectSettings::get_singleton()->get("internationalization/locale/translation_remaps"); TreeItem *k = translation_remap->get_selected(); ERR_FAIL_COND(!k); @@ -234,8 +234,8 @@ void LocalizationEditor::_translation_res_option_changed() { updating_translations = true; undo_redo->create_action(TTR("Change Resource Remap Language")); - undo_redo->add_do_property(ProjectSettings::get_singleton(), "locale/translation_remaps", remaps); - undo_redo->add_undo_property(ProjectSettings::get_singleton(), "locale/translation_remaps", ProjectSettings::get_singleton()->get("locale/translation_remaps")); + undo_redo->add_do_property(ProjectSettings::get_singleton(), "internationalization/locale/translation_remaps", remaps); + undo_redo->add_undo_property(ProjectSettings::get_singleton(), "internationalization/locale/translation_remaps", ProjectSettings::get_singleton()->get("internationalization/locale/translation_remaps")); undo_redo->add_do_method(this, "update_translations"); undo_redo->add_undo_method(this, "update_translations"); undo_redo->add_do_method(this, "emit_signal", localization_changed); @@ -249,11 +249,11 @@ void LocalizationEditor::_translation_res_delete(Object *p_item, int p_column, i return; } - if (!ProjectSettings::get_singleton()->has_setting("locale/translation_remaps")) { + if (!ProjectSettings::get_singleton()->has_setting("internationalization/locale/translation_remaps")) { return; } - Dictionary remaps = ProjectSettings::get_singleton()->get("locale/translation_remaps"); + Dictionary remaps = ProjectSettings::get_singleton()->get("internationalization/locale/translation_remaps"); TreeItem *k = Object::cast_to<TreeItem>(p_item); @@ -263,8 +263,8 @@ void LocalizationEditor::_translation_res_delete(Object *p_item, int p_column, i remaps.erase(key); undo_redo->create_action(TTR("Remove Resource Remap")); - undo_redo->add_do_property(ProjectSettings::get_singleton(), "locale/translation_remaps", remaps); - undo_redo->add_undo_property(ProjectSettings::get_singleton(), "locale/translation_remaps", ProjectSettings::get_singleton()->get("locale/translation_remaps")); + undo_redo->add_do_property(ProjectSettings::get_singleton(), "internationalization/locale/translation_remaps", remaps); + undo_redo->add_undo_property(ProjectSettings::get_singleton(), "internationalization/locale/translation_remaps", ProjectSettings::get_singleton()->get("internationalization/locale/translation_remaps")); undo_redo->add_do_method(this, "update_translations"); undo_redo->add_undo_method(this, "update_translations"); undo_redo->add_do_method(this, "emit_signal", localization_changed); @@ -277,11 +277,11 @@ void LocalizationEditor::_translation_res_option_delete(Object *p_item, int p_co return; } - if (!ProjectSettings::get_singleton()->has_setting("locale/translation_remaps")) { + if (!ProjectSettings::get_singleton()->has_setting("internationalization/locale/translation_remaps")) { return; } - Dictionary remaps = ProjectSettings::get_singleton()->get("locale/translation_remaps"); + Dictionary remaps = ProjectSettings::get_singleton()->get("internationalization/locale/translation_remaps"); TreeItem *k = translation_remap->get_selected(); ERR_FAIL_COND(!k); @@ -298,8 +298,8 @@ void LocalizationEditor::_translation_res_option_delete(Object *p_item, int p_co remaps[key] = r; undo_redo->create_action(TTR("Remove Resource Remap Option")); - undo_redo->add_do_property(ProjectSettings::get_singleton(), "locale/translation_remaps", remaps); - undo_redo->add_undo_property(ProjectSettings::get_singleton(), "locale/translation_remaps", ProjectSettings::get_singleton()->get("locale/translation_remaps")); + undo_redo->add_do_property(ProjectSettings::get_singleton(), "internationalization/locale/translation_remaps", remaps); + undo_redo->add_undo_property(ProjectSettings::get_singleton(), "internationalization/locale/translation_remaps", ProjectSettings::get_singleton()->get("internationalization/locale/translation_remaps")); undo_redo->add_do_method(this, "update_translations"); undo_redo->add_undo_method(this, "update_translations"); undo_redo->add_do_method(this, "emit_signal", localization_changed); @@ -316,8 +316,8 @@ void LocalizationEditor::_translation_filter_option_changed() { Variant prev; Array f_locales_all; - if (ProjectSettings::get_singleton()->has_setting("locale/locale_filter")) { - f_locales_all = ProjectSettings::get_singleton()->get("locale/locale_filter"); + if (ProjectSettings::get_singleton()->has_setting("internationalization/locale/locale_filter")) { + f_locales_all = ProjectSettings::get_singleton()->get("internationalization/locale/locale_filter"); prev = f_locales_all; if (f_locales_all.size() != 2) { @@ -346,8 +346,8 @@ void LocalizationEditor::_translation_filter_option_changed() { f_locales.sort(); undo_redo->create_action(TTR("Changed Locale Filter")); - undo_redo->add_do_property(ProjectSettings::get_singleton(), "locale/locale_filter", f_locales_all); - undo_redo->add_undo_property(ProjectSettings::get_singleton(), "locale/locale_filter", prev); + undo_redo->add_do_property(ProjectSettings::get_singleton(), "internationalization/locale/locale_filter", f_locales_all); + undo_redo->add_undo_property(ProjectSettings::get_singleton(), "internationalization/locale/locale_filter", prev); undo_redo->add_do_method(this, "update_translations"); undo_redo->add_undo_method(this, "update_translations"); undo_redo->add_do_method(this, "emit_signal", localization_changed); @@ -361,8 +361,8 @@ void LocalizationEditor::_translation_filter_mode_changed(int p_mode) { Variant prev; Array f_locales_all; - if (ProjectSettings::get_singleton()->has_setting("locale/locale_filter")) { - f_locales_all = ProjectSettings::get_singleton()->get("locale/locale_filter"); + if (ProjectSettings::get_singleton()->has_setting("internationalization/locale/locale_filter")) { + f_locales_all = ProjectSettings::get_singleton()->get("internationalization/locale/locale_filter"); prev = f_locales_all; if (f_locales_all.size() != 2) { @@ -378,8 +378,8 @@ void LocalizationEditor::_translation_filter_mode_changed(int p_mode) { } undo_redo->create_action(TTR("Changed Locale Filter Mode")); - undo_redo->add_do_property(ProjectSettings::get_singleton(), "locale/locale_filter", f_locales_all); - undo_redo->add_undo_property(ProjectSettings::get_singleton(), "locale/locale_filter", prev); + undo_redo->add_do_property(ProjectSettings::get_singleton(), "internationalization/locale/locale_filter", f_locales_all); + undo_redo->add_undo_property(ProjectSettings::get_singleton(), "internationalization/locale/locale_filter", prev); undo_redo->add_do_method(this, "update_translations"); undo_redo->add_undo_method(this, "update_translations"); undo_redo->add_do_method(this, "emit_signal", localization_changed); @@ -388,7 +388,7 @@ void LocalizationEditor::_translation_filter_mode_changed(int p_mode) { } void LocalizationEditor::_pot_add(const PackedStringArray &p_paths) { - PackedStringArray pot_translations = ProjectSettings::get_singleton()->get("locale/translations_pot_files"); + PackedStringArray pot_translations = ProjectSettings::get_singleton()->get("internationalization/locale/translations_pot_files"); for (int i = 0; i < p_paths.size(); i++) { for (int j = 0; j < pot_translations.size(); j++) { @@ -401,8 +401,8 @@ void LocalizationEditor::_pot_add(const PackedStringArray &p_paths) { } undo_redo->create_action(vformat(TTR("Add %d file(s) for POT generation"), p_paths.size())); - undo_redo->add_do_property(ProjectSettings::get_singleton(), "locale/translations_pot_files", pot_translations); - undo_redo->add_undo_property(ProjectSettings::get_singleton(), "locale/translations_pot_files", ProjectSettings::get_singleton()->get("locale/translations_pot_files")); + undo_redo->add_do_property(ProjectSettings::get_singleton(), "internationalization/locale/translations_pot_files", pot_translations); + undo_redo->add_undo_property(ProjectSettings::get_singleton(), "internationalization/locale/translations_pot_files", ProjectSettings::get_singleton()->get("internationalization/locale/translations_pot_files")); undo_redo->add_do_method(this, "update_translations"); undo_redo->add_undo_method(this, "update_translations"); undo_redo->add_do_method(this, "emit_signal", localization_changed); @@ -416,15 +416,15 @@ void LocalizationEditor::_pot_delete(Object *p_item, int p_column, int p_button) int idx = ti->get_metadata(0); - PackedStringArray pot_translations = ProjectSettings::get_singleton()->get("locale/translations_pot_files"); + PackedStringArray pot_translations = ProjectSettings::get_singleton()->get("internationalization/locale/translations_pot_files"); ERR_FAIL_INDEX(idx, pot_translations.size()); pot_translations.remove(idx); undo_redo->create_action(TTR("Remove file from POT generation")); - undo_redo->add_do_property(ProjectSettings::get_singleton(), "locale/translations_pot_files", pot_translations); - undo_redo->add_undo_property(ProjectSettings::get_singleton(), "locale/translations_pot_files", ProjectSettings::get_singleton()->get("locale/translations_pot_files")); + undo_redo->add_do_property(ProjectSettings::get_singleton(), "internationalization/locale/translations_pot_files", pot_translations); + undo_redo->add_undo_property(ProjectSettings::get_singleton(), "internationalization/locale/translations_pot_files", ProjectSettings::get_singleton()->get("internationalization/locale/translations_pot_files")); undo_redo->add_do_method(this, "update_translations"); undo_redo->add_undo_method(this, "update_translations"); undo_redo->add_do_method(this, "emit_signal", localization_changed); @@ -463,8 +463,8 @@ void LocalizationEditor::update_translations() { translation_list->clear(); TreeItem *root = translation_list->create_item(nullptr); translation_list->set_hide_root(true); - if (ProjectSettings::get_singleton()->has_setting("locale/translations")) { - PackedStringArray translations = ProjectSettings::get_singleton()->get("locale/translations"); + if (ProjectSettings::get_singleton()->has_setting("internationalization/locale/translations")) { + PackedStringArray translations = ProjectSettings::get_singleton()->get("internationalization/locale/translations"); for (int i = 0; i < translations.size(); i++) { TreeItem *t = translation_list->create_item(root); t->set_editable(0, false); @@ -482,8 +482,8 @@ void LocalizationEditor::update_translations() { Array l_filter_all; bool is_arr_empty = true; - if (ProjectSettings::get_singleton()->has_setting("locale/locale_filter")) { - l_filter_all = ProjectSettings::get_singleton()->get("locale/locale_filter"); + if (ProjectSettings::get_singleton()->has_setting("internationalization/locale/locale_filter")) { + l_filter_all = ProjectSettings::get_singleton()->get("internationalization/locale/locale_filter"); if (l_filter_all.size() == 2) { translation_locale_filter_mode->select(l_filter_all[0]); @@ -573,8 +573,8 @@ void LocalizationEditor::update_translations() { } } - if (ProjectSettings::get_singleton()->has_setting("locale/translation_remaps")) { - Dictionary remaps = ProjectSettings::get_singleton()->get("locale/translation_remaps"); + if (ProjectSettings::get_singleton()->has_setting("internationalization/locale/translation_remaps")) { + Dictionary remaps = ProjectSettings::get_singleton()->get("internationalization/locale/translation_remaps"); List<Variant> rk; remaps.get_key_list(&rk); Vector<String> keys; @@ -631,8 +631,8 @@ void LocalizationEditor::update_translations() { translation_pot_list->clear(); root = translation_pot_list->create_item(nullptr); translation_pot_list->set_hide_root(true); - if (ProjectSettings::get_singleton()->has_setting("locale/translations_pot_files")) { - PackedStringArray pot_translations = ProjectSettings::get_singleton()->get("locale/translations_pot_files"); + if (ProjectSettings::get_singleton()->has_setting("internationalization/locale/translations_pot_files")) { + PackedStringArray pot_translations = ProjectSettings::get_singleton()->get("internationalization/locale/translations_pot_files"); for (int i = 0; i < pot_translations.size(); i++) { TreeItem *t = translation_pot_list->create_item(root); t->set_editable(0, false); diff --git a/editor/plugins/animation_player_editor_plugin.cpp b/editor/plugins/animation_player_editor_plugin.cpp index cda88c00f3..7c623505b5 100644 --- a/editor/plugins/animation_player_editor_plugin.cpp +++ b/editor/plugins/animation_player_editor_plugin.cpp @@ -1397,7 +1397,7 @@ void AnimationPlayerEditor::_prepare_onion_layers_2() { // Render every past/future step with the capture shader. RS::get_singleton()->canvas_item_set_material(onion.capture.canvas_item, onion.capture.material->get_rid()); - onion.capture.material->set_shader_param("bkg_color", GLOBAL_GET("rendering/environment/default_clear_color")); + onion.capture.material->set_shader_param("bkg_color", GLOBAL_GET("rendering/environment/defaults/default_clear_color")); onion.capture.material->set_shader_param("differences_only", onion.differences_only); onion.capture.material->set_shader_param("present", onion.differences_only ? RS::get_singleton()->viewport_get_texture(present_rid) : RID()); diff --git a/editor/plugins/node_3d_editor_plugin.cpp b/editor/plugins/node_3d_editor_plugin.cpp index c591e7f42d..610ef0c601 100644 --- a/editor/plugins/node_3d_editor_plugin.cpp +++ b/editor/plugins/node_3d_editor_plugin.cpp @@ -2337,12 +2337,12 @@ void Node3DEditorPlugin::edited_scene_changed() { void Node3DEditorViewport::_project_settings_changed() { //update shadow atlas if changed - int shadowmap_size = ProjectSettings::get_singleton()->get("rendering/quality/shadow_atlas/size"); - bool shadowmap_16_bits = ProjectSettings::get_singleton()->get("rendering/quality/shadow_atlas/16_bits"); - int atlas_q0 = ProjectSettings::get_singleton()->get("rendering/quality/shadow_atlas/quadrant_0_subdiv"); - int atlas_q1 = ProjectSettings::get_singleton()->get("rendering/quality/shadow_atlas/quadrant_1_subdiv"); - int atlas_q2 = ProjectSettings::get_singleton()->get("rendering/quality/shadow_atlas/quadrant_2_subdiv"); - int atlas_q3 = ProjectSettings::get_singleton()->get("rendering/quality/shadow_atlas/quadrant_3_subdiv"); + int shadowmap_size = ProjectSettings::get_singleton()->get("rendering/shadows/shadow_atlas/size"); + bool shadowmap_16_bits = ProjectSettings::get_singleton()->get("rendering/shadows/shadow_atlas/16_bits"); + int atlas_q0 = ProjectSettings::get_singleton()->get("rendering/shadows/shadow_atlas/quadrant_0_subdiv"); + int atlas_q1 = ProjectSettings::get_singleton()->get("rendering/shadows/shadow_atlas/quadrant_1_subdiv"); + int atlas_q2 = ProjectSettings::get_singleton()->get("rendering/shadows/shadow_atlas/quadrant_2_subdiv"); + int atlas_q3 = ProjectSettings::get_singleton()->get("rendering/shadows/shadow_atlas/quadrant_3_subdiv"); viewport->set_shadow_atlas_size(shadowmap_size); viewport->set_shadow_atlas_16_bits(shadowmap_16_bits); @@ -2359,11 +2359,11 @@ void Node3DEditorViewport::_project_settings_changed() { // Update MSAA, screen-space AA and debanding if changed - const int msaa_mode = ProjectSettings::get_singleton()->get("rendering/quality/screen_filters/msaa"); + const int msaa_mode = ProjectSettings::get_singleton()->get("rendering/anti_aliasing/quality/msaa"); viewport->set_msaa(Viewport::MSAA(msaa_mode)); - const int ssaa_mode = GLOBAL_GET("rendering/quality/screen_filters/screen_space_aa"); + const int ssaa_mode = GLOBAL_GET("rendering/anti_aliasing/quality/screen_space_aa"); viewport->set_screen_space_aa(Viewport::ScreenSpaceAA(ssaa_mode)); - const bool use_debanding = GLOBAL_GET("rendering/quality/screen_filters/use_debanding"); + const bool use_debanding = GLOBAL_GET("rendering/anti_aliasing/quality/use_debanding"); viewport->set_use_debanding(use_debanding); } diff --git a/editor/plugins/visual_shader_editor_plugin.cpp b/editor/plugins/visual_shader_editor_plugin.cpp index 5061067ded..a63e641c2b 100644 --- a/editor/plugins/visual_shader_editor_plugin.cpp +++ b/editor/plugins/visual_shader_editor_plugin.cpp @@ -1023,7 +1023,7 @@ void VisualShaderEditor::_update_options_menu() { Color unsupported_color = get_theme_color("error_color", "Editor"); Color supported_color = get_theme_color("warning_color", "Editor"); - static bool low_driver = ProjectSettings::get_singleton()->get("rendering/quality/driver/driver_name") == "GLES2"; + static bool low_driver = ProjectSettings::get_singleton()->get("rendering/driver/driver_name") == "GLES2"; Map<String, TreeItem *> folders; diff --git a/editor/pot_generator.cpp b/editor/pot_generator.cpp index 2d65c00a89..497cc0cbdc 100644 --- a/editor/pot_generator.cpp +++ b/editor/pot_generator.cpp @@ -55,7 +55,7 @@ void POTGenerator::_print_all_translation_strings() { #endif void POTGenerator::generate_pot(const String &p_file) { - if (!ProjectSettings::get_singleton()->has_setting("locale/translations_pot_files")) { + if (!ProjectSettings::get_singleton()->has_setting("internationalization/locale/translations_pot_files")) { WARN_PRINT("No files selected for POT generation."); return; } @@ -63,7 +63,7 @@ void POTGenerator::generate_pot(const String &p_file) { // Clear all_translation_strings of the previous round. all_translation_strings.clear(); - Vector<String> files = ProjectSettings::get_singleton()->get("locale/translations_pot_files"); + Vector<String> files = ProjectSettings::get_singleton()->get("internationalization/locale/translations_pot_files"); // Collect all translatable strings according to files order in "POT Generation" setting. for (int i = 0; i < files.size(); i++) { @@ -100,7 +100,7 @@ void POTGenerator::_write_to_pot(const String &p_file) { } String project_name = ProjectSettings::get_singleton()->get("application/config/name"); - Vector<String> files = ProjectSettings::get_singleton()->get("locale/translations_pot_files"); + Vector<String> files = ProjectSettings::get_singleton()->get("internationalization/locale/translations_pot_files"); String extracted_files = ""; for (int i = 0; i < files.size(); i++) { extracted_files += "# " + files[i] + "\n"; diff --git a/editor/project_manager.cpp b/editor/project_manager.cpp index 7b00c688fa..7d421bdf81 100644 --- a/editor/project_manager.cpp +++ b/editor/project_manager.cpp @@ -474,15 +474,15 @@ private: } ProjectSettings::CustomMap initial_settings; if (rasterizer_button_group->get_pressed_button()->get_meta("driver_name") == "Vulkan") { - initial_settings["rendering/quality/driver/driver_name"] = "Vulkan"; + initial_settings["rendering/driver/driver_name"] = "Vulkan"; } else { - initial_settings["rendering/quality/driver/driver_name"] = "GLES2"; - initial_settings["rendering/vram_compression/import_etc2"] = false; - initial_settings["rendering/vram_compression/import_etc"] = true; + initial_settings["rendering/driver/driver_name"] = "GLES2"; + initial_settings["rendering/textures/vram_compression/import_etc2"] = false; + initial_settings["rendering/textures/vram_compression/import_etc"] = true; } initial_settings["application/config/name"] = project_name->get_text(); initial_settings["application/config/icon"] = "res://icon.png"; - initial_settings["rendering/environment/default_environment"] = "res://default_env.tres"; + initial_settings["rendering/environment/defaults/default_environment"] = "res://default_env.tres"; if (ProjectSettings::get_singleton()->save_custom(dir.plus_file("project.godot"), initial_settings, Vector<String>(), false) != OK) { set_message(TTR("Couldn't create project.godot in project path."), MESSAGE_ERROR); diff --git a/editor/project_settings_editor.cpp b/editor/project_settings_editor.cpp index 76fdf47eb6..4aadb4295f 100644 --- a/editor/project_settings_editor.cpp +++ b/editor/project_settings_editor.cpp @@ -75,8 +75,12 @@ void ProjectSettingsEditor::_advanced_pressed() { if (advanced->is_pressed()) { _update_advanced_bar(); advanced_bar->show(); + EditorSettings::get_singleton()->set_project_metadata("project_settings", "advanced_mode", true); + inspector->set_restrict_to_basic_settings(false); } else { advanced_bar->hide(); + EditorSettings::get_singleton()->set_project_metadata("project_settings", "advanced_mode", false); + inspector->set_restrict_to_basic_settings(true); } } @@ -191,9 +195,6 @@ void ProjectSettingsEditor::_update_advanced_bar() { add_button->set_disabled(disable_add); del_button->set_disabled(disable_del); - - error_label->set_text(error_msg); - error_label->set_visible(error_msg != ""); } String ProjectSettingsEditor::_get_setting_name() const { @@ -273,16 +274,11 @@ void ProjectSettingsEditor::_notification(int p_what) { case NOTIFICATION_VISIBILITY_CHANGED: { if (!is_visible()) { EditorSettings::get_singleton()->set_project_metadata("dialog_bounds", "project_settings", Rect2(get_position(), get_size())); - if (advanced->is_pressed()) { - advanced->set_pressed(false); - advanced_bar->hide(); - } } } break; case NOTIFICATION_ENTER_TREE: { inspector->edit(ps); - error_label->add_theme_color_override("font_color", error_label->get_theme_color("error_color", "Editor")); add_button->set_icon(get_theme_icon("Add", "EditorIcons")); del_button->set_icon(get_theme_icon("Remove", "EditorIcons")); @@ -340,23 +336,19 @@ ProjectSettingsEditor::ProjectSettingsEditor(EditorData *p_data) { search_bar->add_child(search_box); advanced = memnew(CheckButton); - advanced->set_text(TTR("Advanced")); + advanced->set_text(TTR("Advanced Settings")); advanced->connect("pressed", callable_mp(this, &ProjectSettingsEditor::_advanced_pressed)); search_bar->add_child(advanced); } { // Advanced bar. - advanced_bar = memnew(VBoxContainer); - advanced_bar->set_h_size_flags(Control::SIZE_EXPAND_FILL); + advanced_bar = memnew(HBoxContainer); advanced_bar->hide(); header->add_child(advanced_bar); - advanced_bar->add_child(memnew(HSeparator)); - - HBoxContainer *hbc = memnew(HBoxContainer); + HBoxContainer *hbc = advanced_bar; hbc->set_h_size_flags(Control::SIZE_EXPAND_FILL); - advanced_bar->add_margin_child(TTR("Add or Remove Custom Project Settings:"), hbc, true); category_box = memnew(LineEdit); category_box->set_h_size_flags(Control::SIZE_EXPAND_FILL); @@ -365,7 +357,7 @@ ProjectSettingsEditor::ProjectSettingsEditor(EditorData *p_data) { hbc->add_child(category_box); Label *l = memnew(Label); - l->set_text("/"); + l->set_text(" / "); hbc->add_child(l); property_box = memnew(LineEdit); @@ -408,9 +400,6 @@ ProjectSettingsEditor::ProjectSettingsEditor(EditorData *p_data) { del_button->set_flat(true); del_button->connect("pressed", callable_mp(this, &ProjectSettingsEditor::_delete_setting), varray(false)); hbc->add_child(del_button); - - error_label = memnew(Label); - advanced_bar->add_child(error_label); } inspector = memnew(SectionedInspector); @@ -484,4 +473,13 @@ ProjectSettingsEditor::ProjectSettingsEditor(EditorData *p_data) { get_ok_button()->set_text(TTR("Close")); set_hide_on_ok(true); + + bool use_advanced = EditorSettings::get_singleton()->get_project_metadata("project_settings", "advanced_mode", false); + + if (use_advanced) { + advanced->set_pressed(true); + advanced_bar->show(); + } + + inspector->set_restrict_to_basic_settings(!use_advanced); } diff --git a/editor/project_settings_editor.h b/editor/project_settings_editor.h index 88c96540ff..a43adecc4e 100644 --- a/editor/project_settings_editor.h +++ b/editor/project_settings_editor.h @@ -68,14 +68,13 @@ class ProjectSettingsEditor : public AcceptDialog { LineEdit *search_box; CheckButton *advanced; - VBoxContainer *advanced_bar; + HBoxContainer *advanced_bar; LineEdit *category_box; LineEdit *property_box; Button *add_button; Button *del_button; OptionButton *type; OptionButton *feature_override; - Label *error_label; ConfirmationDialog *del_confirmation; diff --git a/main/main.cpp b/main/main.cpp index b437d2e4f3..f068c39b58 100644 --- a/main/main.cpp +++ b/main/main.cpp @@ -1125,29 +1125,29 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph } #endif - GLOBAL_DEF("logging/file_logging/enable_file_logging", false); + GLOBAL_DEF("debug/file_logging/enable_file_logging", false); // Only file logging by default on desktop platforms as logs can't be // accessed easily on mobile/Web platforms (if at all). // This also prevents logs from being created for the editor instance, as feature tags // are disabled while in the editor (even if they should logically apply). - GLOBAL_DEF("logging/file_logging/enable_file_logging.pc", true); - GLOBAL_DEF("logging/file_logging/log_path", "user://logs/godot.log"); - GLOBAL_DEF("logging/file_logging/max_log_files", 5); - ProjectSettings::get_singleton()->set_custom_property_info("logging/file_logging/max_log_files", + GLOBAL_DEF("debug/file_logging/enable_file_logging.pc", true); + GLOBAL_DEF("debug/file_logging/log_path", "user://logs/godot.log"); + GLOBAL_DEF("debug/file_logging/max_log_files", 5); + ProjectSettings::get_singleton()->set_custom_property_info("debug/file_logging/max_log_files", PropertyInfo(Variant::INT, - "logging/file_logging/max_log_files", + "debug/file_logging/max_log_files", PROPERTY_HINT_RANGE, "0,20,1,or_greater")); //no negative numbers if (!project_manager && !editor && FileAccess::get_create_func(FileAccess::ACCESS_USERDATA) && - GLOBAL_GET("logging/file_logging/enable_file_logging")) { + GLOBAL_GET("debug/file_logging/enable_file_logging")) { // Don't create logs for the project manager as they would be written to // the current working directory, which is inconvenient. - String base_path = GLOBAL_GET("logging/file_logging/log_path"); - int max_files = GLOBAL_GET("logging/file_logging/max_log_files"); + String base_path = GLOBAL_GET("debug/file_logging/log_path"); + int max_files = GLOBAL_GET("debug/file_logging/max_log_files"); OS::get_singleton()->add_logger(memnew(RotatedFileLogger(base_path, max_files))); } - if (main_args.size() == 0 && String(GLOBAL_DEF("application/run/main_scene", "")) == "") { + if (main_args.size() == 0 && String(GLOBAL_GET("application/run/main_scene")) == "") { #ifdef TOOLS_ENABLED if (!editor && !project_manager) { #endif @@ -1179,28 +1179,28 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph OS::get_singleton()->set_cmdline(execpath, main_args); - GLOBAL_DEF("rendering/quality/driver/driver_name", "Vulkan"); - ProjectSettings::get_singleton()->set_custom_property_info("rendering/quality/driver/driver_name", + GLOBAL_DEF("rendering/driver/driver_name", "Vulkan"); + ProjectSettings::get_singleton()->set_custom_property_info("rendering/driver/driver_name", PropertyInfo(Variant::STRING, - "rendering/quality/driver/driver_name", + "rendering/driver/driver_name", PROPERTY_HINT_ENUM, "Vulkan")); if (display_driver == "") { - display_driver = GLOBAL_GET("rendering/quality/driver/driver_name"); + display_driver = GLOBAL_GET("rendering/driver/driver_name"); } - GLOBAL_DEF("display/window/size/width", 1024); + GLOBAL_DEF_BASIC("display/window/size/width", 1024); ProjectSettings::get_singleton()->set_custom_property_info("display/window/size/width", PropertyInfo(Variant::INT, "display/window/size/width", PROPERTY_HINT_RANGE, "0,7680,or_greater")); // 8K resolution - GLOBAL_DEF("display/window/size/height", 600); + GLOBAL_DEF_BASIC("display/window/size/height", 600); ProjectSettings::get_singleton()->set_custom_property_info("display/window/size/height", PropertyInfo(Variant::INT, "display/window/size/height", PROPERTY_HINT_RANGE, "0,4320,or_greater")); // 8K resolution - GLOBAL_DEF("display/window/size/resizable", true); - GLOBAL_DEF("display/window/size/borderless", false); - GLOBAL_DEF("display/window/size/fullscreen", false); + GLOBAL_DEF_BASIC("display/window/size/resizable", true); + GLOBAL_DEF_BASIC("display/window/size/borderless", false); + GLOBAL_DEF_BASIC("display/window/size/fullscreen", false); GLOBAL_DEF("display/window/size/always_on_top", false); GLOBAL_DEF("display/window/size/test_width", 0); ProjectSettings::get_singleton()->set_custom_property_info("display/window/size/test_width", @@ -1248,7 +1248,7 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph } } - GLOBAL_DEF("display/window/force_right_to_left_layout_direction", false); + GLOBAL_DEF("internationalization/rendering/force_right_to_left_layout_direction", false); if (!force_lowdpi) { OS::get_singleton()->_allow_hidpi = GLOBAL_DEF("display/window/dpi/allow_hidpi", false); @@ -1267,8 +1267,16 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph OS::get_singleton()->_vsync_via_compositor = window_vsync_via_compositor; + { + GLOBAL_DEF_RST_NOVAL("input_devices/tablet/driver", ""); + GLOBAL_DEF_RST_NOVAL("input_devices/tablet/driver.windows", ""); + ProjectSettings::get_singleton()->set_custom_property_info("input_devices/tablet/driver.windows", PropertyInfo(Variant::STRING, "input_devices/tablet/driver.windows", PROPERTY_HINT_ENUM, "wintab,winink")); + } if (tablet_driver == "") { // specified in project.godot - tablet_driver = GLOBAL_DEF_RST_NOVAL("display/window/tablet_driver", OS::get_singleton()->get_tablet_driver_name(0)); + tablet_driver = GLOBAL_GET("input_devices/tablet/driver"); + if (tablet_driver == "") { + tablet_driver = OS::get_singleton()->get_tablet_driver_name(0); + } } for (int i = 0; i < OS::get_singleton()->get_tablet_driver_count(); i++) { @@ -1286,9 +1294,6 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph OS::get_singleton()->_allow_layered = GLOBAL_DEF("display/window/per_pixel_transparency/allowed", false); video_mode.layered = GLOBAL_DEF("display/window/per_pixel_transparency/enabled", false); */ - GLOBAL_DEF("rendering/quality/intended_usage/framebuffer_allocation", 2); - GLOBAL_DEF("rendering/quality/intended_usage/framebuffer_allocation.mobile", 3); - if (editor || project_manager) { // The editor and project manager always detect and use hiDPI if needed OS::get_singleton()->_allow_hidpi = true; @@ -1297,7 +1302,7 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph OS::get_singleton()->_keep_screen_on = GLOBAL_DEF("display/window/energy_saving/keep_screen_on", true); if (rtm == -1) { - rtm = GLOBAL_DEF("rendering/threads/thread_model", OS::RENDER_THREAD_SAFE); + rtm = GLOBAL_DEF("rendering/driver/threads/thread_model", OS::RENDER_THREAD_SAFE); } if (rtm >= 0 && rtm < 3) { @@ -1325,7 +1330,7 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph } if (audio_driver == "") { // specified in project.godot - audio_driver = GLOBAL_DEF_RST_NOVAL("audio/driver", AudioDriverManager::get_driver(0)->get_name()); + audio_driver = GLOBAL_DEF_RST_NOVAL("audio/driver/driver", AudioDriverManager::get_driver(0)->get_name()); } for (int i = 0; i < AudioDriverManager::get_driver_count(); i++) { @@ -1359,7 +1364,7 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph } } - Engine::get_singleton()->set_iterations_per_second(GLOBAL_DEF("physics/common/physics_fps", 60)); + Engine::get_singleton()->set_iterations_per_second(GLOBAL_DEF_BASIC("physics/common/physics_fps", 60)); ProjectSettings::get_singleton()->set_custom_property_info("physics/common/physics_fps", PropertyInfo(Variant::INT, "physics/common/physics_fps", PROPERTY_HINT_RANGE, "1,120,1,or_greater")); @@ -1476,9 +1481,8 @@ Error Main::setup2(Thread::ID p_main_tid_override) { /* Determine text driver */ - GLOBAL_DEF("display/window/text_name", ""); if (text_driver == "") { - text_driver = GLOBAL_GET("display/window/text_name"); + text_driver = GLOBAL_GET("internationalization/rendering/text_driver"); } if (text_driver != "") { @@ -1630,7 +1634,7 @@ Error Main::setup2(Thread::ID p_main_tid_override) { MAIN_PRINT("Main: Load Boot Image"); - Color clear = GLOBAL_DEF("rendering/environment/default_clear_color", Color(0.3, 0.3, 0.3)); + Color clear = GLOBAL_DEF("rendering/environment/defaults/default_clear_color", Color(0.3, 0.3, 0.3)); RenderingServer::get_singleton()->set_default_clear_color(clear); if (show_logo) { //boot logo! @@ -1683,7 +1687,7 @@ Error Main::setup2(Thread::ID p_main_tid_override) { MAIN_PRINT("Main: DCC"); RenderingServer::get_singleton()->set_default_clear_color( - GLOBAL_DEF("rendering/environment/default_clear_color", Color(0.3, 0.3, 0.3))); + GLOBAL_DEF("rendering/environment/defaults/default_clear_color", Color(0.3, 0.3, 0.3))); GLOBAL_DEF("application/config/icon", String()); ProjectSettings::get_singleton()->set_custom_property_info("application/config/icon", @@ -1970,8 +1974,8 @@ bool Main::start() { #endif - if (script == "" && game_path == "" && String(GLOBAL_DEF("application/run/main_scene", "")) != "") { - game_path = GLOBAL_DEF("application/run/main_scene", ""); + if (script == "" && game_path == "" && String(GLOBAL_GET("application/run/main_scene")) != "") { + game_path = GLOBAL_GET("application/run/main_scene"); } MainLoop *main_loop = nullptr; @@ -2146,10 +2150,10 @@ bool Main::start() { if (!editor && !project_manager) { //standard helpers that can be changed from main config - String stretch_mode = GLOBAL_DEF("display/window/stretch/mode", "disabled"); - String stretch_aspect = GLOBAL_DEF("display/window/stretch/aspect", "ignore"); - Size2i stretch_size = Size2i(GLOBAL_DEF("display/window/size/width", 0), - GLOBAL_DEF("display/window/size/height", 0)); + String stretch_mode = GLOBAL_DEF_BASIC("display/window/stretch/mode", "disabled"); + String stretch_aspect = GLOBAL_DEF_BASIC("display/window/stretch/aspect", "ignore"); + Size2i stretch_size = Size2i(GLOBAL_DEF_BASIC("display/window/size/width", 0), + GLOBAL_DEF_BASIC("display/window/size/height", 0)); Window::ContentScaleMode cs_sm = Window::CONTENT_SCALE_MODE_DISABLED; if (stretch_mode == "canvas_items") { @@ -2189,30 +2193,30 @@ bool Main::start() { bool snap_controls = GLOBAL_DEF("gui/common/snap_controls_to_pixels", true); sml->get_root()->set_snap_controls_to_pixels(snap_controls); - bool font_oversampling = GLOBAL_DEF("rendering/quality/dynamic_fonts/use_oversampling", true); + bool font_oversampling = GLOBAL_DEF("gui/fonts/dynamic_fonts/use_oversampling", true); sml->get_root()->set_use_font_oversampling(font_oversampling); - int texture_filter = GLOBAL_DEF("rendering/canvas_textures/default_texture_filter", 1); - int texture_repeat = GLOBAL_DEF("rendering/canvas_textures/default_texture_repeat", 0); + int texture_filter = GLOBAL_DEF("rendering/textures/canvas_textures/default_texture_filter", 1); + int texture_repeat = GLOBAL_DEF("rendering/textures/canvas_textures/default_texture_repeat", 0); sml->get_root()->set_default_canvas_item_texture_filter( Viewport::DefaultCanvasItemTextureFilter(texture_filter)); sml->get_root()->set_default_canvas_item_texture_repeat( Viewport::DefaultCanvasItemTextureRepeat(texture_repeat)); } else { - GLOBAL_DEF("display/window/stretch/mode", "disabled"); + GLOBAL_DEF_BASIC("display/window/stretch/mode", "disabled"); ProjectSettings::get_singleton()->set_custom_property_info("display/window/stretch/mode", PropertyInfo(Variant::STRING, "display/window/stretch/mode", PROPERTY_HINT_ENUM, "disabled,canvas_items,viewport")); - GLOBAL_DEF("display/window/stretch/aspect", "ignore"); + GLOBAL_DEF_BASIC("display/window/stretch/aspect", "ignore"); ProjectSettings::get_singleton()->set_custom_property_info("display/window/stretch/aspect", PropertyInfo(Variant::STRING, "display/window/stretch/aspect", PROPERTY_HINT_ENUM, "ignore,keep,keep_width,keep_height,expand")); - GLOBAL_DEF("display/window/stretch/shrink", 1.0); + GLOBAL_DEF_BASIC("display/window/stretch/shrink", 1.0); ProjectSettings::get_singleton()->set_custom_property_info("display/window/stretch/shrink", PropertyInfo(Variant::FLOAT, "display/window/stretch/shrink", @@ -2220,18 +2224,18 @@ bool Main::start() { "1.0,8.0,0.1")); sml->set_auto_accept_quit(GLOBAL_DEF("application/config/auto_accept_quit", true)); sml->set_quit_on_go_back(GLOBAL_DEF("application/config/quit_on_go_back", true)); - GLOBAL_DEF("gui/common/snap_controls_to_pixels", true); - GLOBAL_DEF("rendering/quality/dynamic_fonts/use_oversampling", true); + GLOBAL_DEF_BASIC("gui/common/snap_controls_to_pixels", true); + GLOBAL_DEF_BASIC("gui/fonts/dynamic_fonts/use_oversampling", true); - GLOBAL_DEF("rendering/canvas_textures/default_texture_filter", 1); + GLOBAL_DEF_BASIC("rendering/textures/canvas_textures/default_texture_filter", 1); ProjectSettings::get_singleton()->set_custom_property_info( - "rendering/canvas_textures/default_texture_filter", - PropertyInfo(Variant::INT, "rendering/canvas_textures/default_texture_filter", PROPERTY_HINT_ENUM, + "rendering/textures/canvas_textures/default_texture_filter", + PropertyInfo(Variant::INT, "rendering/textures/canvas_textures/default_texture_filter", PROPERTY_HINT_ENUM, "Nearest,Linear,MipmapLinear,MipmapNearest")); - GLOBAL_DEF("rendering/canvas_textures/default_texture_repeat", 0); + GLOBAL_DEF_BASIC("rendering/textures/canvas_textures/default_texture_repeat", 0); ProjectSettings::get_singleton()->set_custom_property_info( - "rendering/canvas_textures/default_texture_repeat", - PropertyInfo(Variant::INT, "rendering/canvas_textures/default_texture_repeat", PROPERTY_HINT_ENUM, + "rendering/textures/canvas_textures/default_texture_repeat", + PropertyInfo(Variant::INT, "rendering/textures/canvas_textures/default_texture_repeat", PROPERTY_HINT_ENUM, "Disable,Enable,Mirror")); } diff --git a/main/performance.cpp b/main/performance.cpp index 1a422dc499..a2e53f2ee2 100644 --- a/main/performance.cpp +++ b/main/performance.cpp @@ -119,7 +119,7 @@ String Performance::get_monitor_name(Monitor p_monitor) const { "physics_3d/active_objects", "physics_3d/collision_pairs", "physics_3d/islands", - "audio/output_latency", + "audio/driver/output_latency", }; diff --git a/modules/gdnative/videodecoder/video_stream_gdnative.cpp b/modules/gdnative/videodecoder/video_stream_gdnative.cpp index a594ba41ec..f2fb0a2fdc 100644 --- a/modules/gdnative/videodecoder/video_stream_gdnative.cpp +++ b/modules/gdnative/videodecoder/video_stream_gdnative.cpp @@ -250,7 +250,7 @@ void VideoStreamPlaybackGDNative::play() { playing = true; - delay_compensation = ProjectSettings::get_singleton()->get("audio/video_delay_compensation_ms"); + delay_compensation = ProjectSettings::get_singleton()->get("audio/video/video_delay_compensation_ms"); delay_compensation /= 1000.0; } diff --git a/modules/lightmapper_rd/lightmapper_rd.cpp b/modules/lightmapper_rd/lightmapper_rd.cpp index 82aaa492fc..61ebabdfb6 100644 --- a/modules/lightmapper_rd/lightmapper_rd.cpp +++ b/modules/lightmapper_rd/lightmapper_rd.cpp @@ -1225,23 +1225,23 @@ LightmapperRD::BakeError LightmapperRD::bake(BakeQuality p_quality, bool p_use_d switch (p_quality) { case BAKE_QUALITY_LOW: { - push_constant.ray_count = GLOBAL_GET("rendering/gpu_lightmapper/quality/low_quality_ray_count"); + push_constant.ray_count = GLOBAL_GET("rendering/lightmapping/bake_quality/low_quality_ray_count"); } break; case BAKE_QUALITY_MEDIUM: { - push_constant.ray_count = GLOBAL_GET("rendering/gpu_lightmapper/quality/medium_quality_ray_count"); + push_constant.ray_count = GLOBAL_GET("rendering/lightmapping/bake_quality/medium_quality_ray_count"); } break; case BAKE_QUALITY_HIGH: { - push_constant.ray_count = GLOBAL_GET("rendering/gpu_lightmapper/quality/high_quality_ray_count"); + push_constant.ray_count = GLOBAL_GET("rendering/lightmapping/bake_quality/high_quality_ray_count"); } break; case BAKE_QUALITY_ULTRA: { - push_constant.ray_count = GLOBAL_GET("rendering/gpu_lightmapper/quality/ultra_quality_ray_count"); + push_constant.ray_count = GLOBAL_GET("rendering/lightmapping/bake_quality/ultra_quality_ray_count"); } break; } push_constant.ray_count = CLAMP(push_constant.ray_count, 16, 8192); - int max_region_size = nearest_power_of_2_templated(int(GLOBAL_GET("rendering/gpu_lightmapper/performance/region_size"))); - int max_rays = GLOBAL_GET("rendering/gpu_lightmapper/performance/max_rays_per_pass"); + int max_region_size = nearest_power_of_2_templated(int(GLOBAL_GET("rendering/lightmapping/bake_performance/region_size"))); + int max_rays = GLOBAL_GET("rendering/lightmapping/bake_performance/max_rays_per_pass"); int x_regions = (atlas_size.width - 1) / max_region_size + 1; int y_regions = (atlas_size.height - 1) / max_region_size + 1; @@ -1347,23 +1347,23 @@ LightmapperRD::BakeError LightmapperRD::bake(BakeQuality p_quality, bool p_use_d switch (p_quality) { case BAKE_QUALITY_LOW: { - push_constant.ray_count = GLOBAL_GET("rendering/gpu_lightmapper/quality/low_quality_probe_ray_count"); + push_constant.ray_count = GLOBAL_GET("rendering/lightmapping/bake_quality/low_quality_probe_ray_count"); } break; case BAKE_QUALITY_MEDIUM: { - push_constant.ray_count = GLOBAL_GET("rendering/gpu_lightmapper/quality/medium_quality_probe_ray_count"); + push_constant.ray_count = GLOBAL_GET("rendering/lightmapping/bake_quality/medium_quality_probe_ray_count"); } break; case BAKE_QUALITY_HIGH: { - push_constant.ray_count = GLOBAL_GET("rendering/gpu_lightmapper/quality/high_quality_probe_ray_count"); + push_constant.ray_count = GLOBAL_GET("rendering/lightmapping/bake_quality/high_quality_probe_ray_count"); } break; case BAKE_QUALITY_ULTRA: { - push_constant.ray_count = GLOBAL_GET("rendering/gpu_lightmapper/quality/ultra_quality_probe_ray_count"); + push_constant.ray_count = GLOBAL_GET("rendering/lightmapping/bake_quality/ultra_quality_probe_ray_count"); } break; } push_constant.atlas_size[0] = probe_positions.size(); push_constant.ray_count = CLAMP(push_constant.ray_count, 16, 8192); - int max_rays = GLOBAL_GET("rendering/gpu_lightmapper/performance/max_rays_per_probe_pass"); + int max_rays = GLOBAL_GET("rendering/lightmapping/bake_performance/max_rays_per_probe_pass"); int ray_iterations = (push_constant.ray_count - 1) / max_rays + 1; for (int i = 0; i < ray_iterations; i++) { diff --git a/modules/lightmapper_rd/register_types.cpp b/modules/lightmapper_rd/register_types.cpp index a7b8c063fd..191bb3d765 100644 --- a/modules/lightmapper_rd/register_types.cpp +++ b/modules/lightmapper_rd/register_types.cpp @@ -41,18 +41,18 @@ static Lightmapper *create_lightmapper_rd() { #endif void register_lightmapper_rd_types() { - GLOBAL_DEF("rendering/gpu_lightmapper/quality/low_quality_ray_count", 16); - GLOBAL_DEF("rendering/gpu_lightmapper/quality/medium_quality_ray_count", 64); - GLOBAL_DEF("rendering/gpu_lightmapper/quality/high_quality_ray_count", 256); - GLOBAL_DEF("rendering/gpu_lightmapper/quality/ultra_quality_ray_count", 1024); - GLOBAL_DEF("rendering/gpu_lightmapper/performance/max_rays_per_pass", 32); - GLOBAL_DEF("rendering/gpu_lightmapper/performance/region_size", 512); + GLOBAL_DEF("rendering/lightmapping/bake_quality/low_quality_ray_count", 16); + GLOBAL_DEF("rendering/lightmapping/bake_quality/medium_quality_ray_count", 64); + GLOBAL_DEF("rendering/lightmapping/bake_quality/high_quality_ray_count", 256); + GLOBAL_DEF("rendering/lightmapping/bake_quality/ultra_quality_ray_count", 1024); + GLOBAL_DEF("rendering/lightmapping/bake_performance/max_rays_per_pass", 32); + GLOBAL_DEF("rendering/lightmapping/bake_performance/region_size", 512); - GLOBAL_DEF("rendering/gpu_lightmapper/quality/low_quality_probe_ray_count", 64); - GLOBAL_DEF("rendering/gpu_lightmapper/quality/medium_quality_probe_ray_count", 256); - GLOBAL_DEF("rendering/gpu_lightmapper/quality/high_quality_probe_ray_count", 512); - GLOBAL_DEF("rendering/gpu_lightmapper/quality/ultra_quality_probe_ray_count", 2048); - GLOBAL_DEF("rendering/gpu_lightmapper/performance/max_rays_per_probe_pass", 64); + GLOBAL_DEF("rendering/lightmapping/bake_quality/low_quality_probe_ray_count", 64); + GLOBAL_DEF("rendering/lightmapping/bake_quality/medium_quality_probe_ray_count", 256); + GLOBAL_DEF("rendering/lightmapping/bake_quality/high_quality_probe_ray_count", 512); + GLOBAL_DEF("rendering/lightmapping/bake_quality/ultra_quality_probe_ray_count", 2048); + GLOBAL_DEF("rendering/lightmapping/bake_performance/max_rays_per_probe_pass", 64); #ifndef _3D_DISABLED ClassDB::register_class<LightmapperRD>(); Lightmapper::create_gpu = create_lightmapper_rd; diff --git a/modules/theora/video_stream_theora.cpp b/modules/theora/video_stream_theora.cpp index 4b404eae32..c5f6dc0d99 100644 --- a/modules/theora/video_stream_theora.cpp +++ b/modules/theora/video_stream_theora.cpp @@ -554,7 +554,7 @@ void VideoStreamPlaybackTheora::play() { } playing = true; - delay_compensation = ProjectSettings::get_singleton()->get("audio/video_delay_compensation_ms"); + delay_compensation = ProjectSettings::get_singleton()->get("audio/video/video_delay_compensation_ms"); delay_compensation /= 1000.0; }; diff --git a/modules/webm/video_stream_webm.cpp b/modules/webm/video_stream_webm.cpp index 7c16a1df34..101001cba0 100644 --- a/modules/webm/video_stream_webm.cpp +++ b/modules/webm/video_stream_webm.cpp @@ -156,7 +156,7 @@ void VideoStreamPlaybackWebm::stop() { void VideoStreamPlaybackWebm::play() { stop(); - delay_compensation = ProjectSettings::get_singleton()->get("audio/video_delay_compensation_ms"); + delay_compensation = ProjectSettings::get_singleton()->get("audio/video/video_delay_compensation_ms"); delay_compensation /= 1000.0; playing = true; diff --git a/platform/android/audio_driver_jandroid.cpp b/platform/android/audio_driver_jandroid.cpp index ee28959adc..3a2ccac481 100644 --- a/platform/android/audio_driver_jandroid.cpp +++ b/platform/android/audio_driver_jandroid.cpp @@ -73,9 +73,9 @@ Error AudioDriverAndroid::init() { // __android_log_print(ANDROID_LOG_VERBOSE, "SDL", "SDL audio: opening device"); JNIEnv *env = get_jni_env(); - int mix_rate = GLOBAL_GET("audio/mix_rate"); + int mix_rate = GLOBAL_GET("audio/driver/mix_rate"); - int latency = GLOBAL_GET("audio/output_latency"); + int latency = GLOBAL_GET("audio/driver/output_latency"); unsigned int buffer_size = next_power_of_2(latency * mix_rate / 1000); print_verbose("Audio buffer size: " + itos(buffer_size)); diff --git a/platform/android/export/export.cpp b/platform/android/export/export.cpp index f16ab888d6..d5eff9823f 100644 --- a/platform/android/export/export.cpp +++ b/platform/android/export/export.cpp @@ -1641,7 +1641,7 @@ public: public: virtual void get_preset_features(const Ref<EditorExportPreset> &p_preset, List<String> *r_features) override { - String driver = ProjectSettings::get_singleton()->get("rendering/quality/driver/driver_name"); + String driver = ProjectSettings::get_singleton()->get("rendering/driver/driver_name"); if (driver == "GLES2") { r_features->push_back("etc"); } diff --git a/platform/android/export/gradle_export_util.h b/platform/android/export/gradle_export_util.h index 99756bba5d..ce6a3c96db 100644 --- a/platform/android/export/gradle_export_util.h +++ b/platform/android/export/gradle_export_util.h @@ -217,8 +217,8 @@ String bool_to_string(bool v) { } String _get_gles_tag() { - bool min_gles3 = ProjectSettings::get_singleton()->get("rendering/quality/driver/driver_name") == "GLES3" && - !ProjectSettings::get_singleton()->get("rendering/quality/driver/fallback_to_gles2"); + bool min_gles3 = ProjectSettings::get_singleton()->get("rendering/driver/driver_name") == "GLES3" && + !ProjectSettings::get_singleton()->get("rendering/driver/fallback_to_gles2"); return min_gles3 ? " <uses-feature android:glEsVersion=\"0x00030000\" android:required=\"true\" />\n" : ""; } diff --git a/platform/iphone/display_layer.mm b/platform/iphone/display_layer.mm index fb57db4518..b8df81b89a 100644 --- a/platform/iphone/display_layer.mm +++ b/platform/iphone/display_layer.mm @@ -89,7 +89,7 @@ // FIXME: Add Vulkan support via MoltenVK. Add fallback code back? // Create GL ES 2 context - if (GLOBAL_GET("rendering/quality/driver/driver_name") == "GLES2") { + if (GLOBAL_GET("rendering/driver/driver_name") == "GLES2") { context = [[EAGLContext alloc] initWithAPI:kEAGLRenderingAPIOpenGLES2]; NSLog(@"Setting up an OpenGL ES 2.0 context."); if (!context) { diff --git a/platform/iphone/export/export.cpp b/platform/iphone/export/export.cpp index 91cecdd704..fe38482a00 100644 --- a/platform/iphone/export/export.cpp +++ b/platform/iphone/export/export.cpp @@ -291,7 +291,7 @@ public: }; void EditorExportPlatformIOS::get_preset_features(const Ref<EditorExportPreset> &p_preset, List<String> *r_features) { - String driver = ProjectSettings::get_singleton()->get("rendering/quality/driver/driver_name"); + String driver = ProjectSettings::get_singleton()->get("rendering/driver/driver_name"); r_features->push_back("pvrtc"); if (driver == "Vulkan") { // FIXME: Review if this is correct. diff --git a/platform/javascript/audio_driver_javascript.cpp b/platform/javascript/audio_driver_javascript.cpp index f7cc9e6540..478e848675 100644 --- a/platform/javascript/audio_driver_javascript.cpp +++ b/platform/javascript/audio_driver_javascript.cpp @@ -105,8 +105,8 @@ void AudioDriverJavaScript::_audio_driver_capture(int p_from, int p_samples) { } Error AudioDriverJavaScript::init() { - mix_rate = GLOBAL_GET("audio/mix_rate"); - int latency = GLOBAL_GET("audio/output_latency"); + mix_rate = GLOBAL_GET("audio/driver/mix_rate"); + int latency = GLOBAL_GET("audio/driver/output_latency"); channel_count = godot_audio_init(mix_rate, latency, &_state_change_callback, &_latency_update_callback); buffer_length = closest_power_of_2((latency * mix_rate / 1000)); diff --git a/platform/javascript/export/export.cpp b/platform/javascript/export/export.cpp index f5d8a68994..199d778314 100644 --- a/platform/javascript/export/export.cpp +++ b/platform/javascript/export/export.cpp @@ -319,7 +319,7 @@ void EditorExportPlatformJavaScript::get_preset_features(const Ref<EditorExportP } if (p_preset->get("vram_texture_compression/for_mobile")) { - String driver = ProjectSettings::get_singleton()->get("rendering/quality/driver/driver_name"); + String driver = ProjectSettings::get_singleton()->get("rendering/driver/driver_name"); if (driver == "GLES2") { r_features->push_back("etc"); } else if (driver == "Vulkan") { diff --git a/scene/3d/gi_probe.cpp b/scene/3d/gi_probe.cpp index 942996ca14..8a8bfe50b9 100644 --- a/scene/3d/gi_probe.cpp +++ b/scene/3d/gi_probe.cpp @@ -221,7 +221,7 @@ RID GIProbeData::get_rid() const { void GIProbeData::_validate_property(PropertyInfo &property) const { if (property.name == "anisotropy_strength") { - bool anisotropy_enabled = ProjectSettings::get_singleton()->get("rendering/quality/gi_probes/anisotropic"); + bool anisotropy_enabled = ProjectSettings::get_singleton()->get("rendering/global_illumination/gi_probes/anisotropic"); if (!anisotropy_enabled) { property.usage = PROPERTY_USAGE_NOEDITOR; } diff --git a/scene/gui/control.cpp b/scene/gui/control.cpp index cf75365b44..0e28c942f1 100644 --- a/scene/gui/control.cpp +++ b/scene/gui/control.cpp @@ -439,14 +439,14 @@ bool Control::is_layout_rtl() const { } else if (parent_window) { return parent_window->is_layout_rtl(); } else { - if (GLOBAL_GET("display/window/force_right_to_left_layout_direction")) { + if (GLOBAL_GET("internationalization/rendering/force_right_to_left_layout_direction")) { return true; } String locale = TranslationServer::get_singleton()->get_tool_locale(); return TS->is_locale_right_to_left(locale); } } else if (data.layout_dir == LAYOUT_DIRECTION_LOCALE) { - if (GLOBAL_GET("display/window/force_right_to_left_layout_direction")) { + if (GLOBAL_GET("internationalization/rendering/force_right_to_left_layout_direction")) { return true; } String locale = TranslationServer::get_singleton()->get_tool_locale(); diff --git a/scene/main/node.cpp b/scene/main/node.cpp index e109240f59..ff46c06128 100644 --- a/scene/main/node.cpp +++ b/scene/main/node.cpp @@ -1108,7 +1108,7 @@ void Node::_generate_serial_child_name(const Node *p_child, StringName &name) co name = p_child->get_class(); // Adjust casing according to project setting. The current type name is expected to be in PascalCase. - switch (ProjectSettings::get_singleton()->get("node/name_casing").operator int()) { + switch (ProjectSettings::get_singleton()->get("editor/node_naming/name_casing").operator int()) { case NAME_CASING_PASCAL_CASE: break; case NAME_CASING_CAMEL_CASE: { @@ -2725,10 +2725,10 @@ void Node::request_ready() { } void Node::_bind_methods() { - GLOBAL_DEF("node/name_num_separator", 0); - ProjectSettings::get_singleton()->set_custom_property_info("node/name_num_separator", PropertyInfo(Variant::INT, "node/name_num_separator", PROPERTY_HINT_ENUM, "None,Space,Underscore,Dash")); - GLOBAL_DEF("node/name_casing", NAME_CASING_PASCAL_CASE); - ProjectSettings::get_singleton()->set_custom_property_info("node/name_casing", PropertyInfo(Variant::INT, "node/name_casing", PROPERTY_HINT_ENUM, "PascalCase,camelCase,snake_case")); + GLOBAL_DEF("editor/node_naming/name_num_separator", 0); + ProjectSettings::get_singleton()->set_custom_property_info("editor/node_naming/name_num_separator", PropertyInfo(Variant::INT, "editor/node_naming/name_num_separator", PROPERTY_HINT_ENUM, "None,Space,Underscore,Dash")); + GLOBAL_DEF("editor/node_naming/name_casing", NAME_CASING_PASCAL_CASE); + ProjectSettings::get_singleton()->set_custom_property_info("editor/node_naming/name_casing", PropertyInfo(Variant::INT, "editor/node_naming/name_casing", PROPERTY_HINT_ENUM, "PascalCase,camelCase,snake_case")); ClassDB::bind_method(D_METHOD("add_sibling", "sibling", "legible_unique_name"), &Node::add_sibling, DEFVAL(false)); @@ -2927,7 +2927,7 @@ void Node::_bind_methods() { } String Node::_get_name_num_separator() { - switch (ProjectSettings::get_singleton()->get("node/name_num_separator").operator int()) { + switch (ProjectSettings::get_singleton()->get("editor/node_naming/name_num_separator").operator int()) { case 0: return ""; case 1: diff --git a/scene/main/scene_tree.cpp b/scene/main/scene_tree.cpp index 0161786681..806ae9280d 100644 --- a/scene/main/scene_tree.cpp +++ b/scene/main/scene_tree.cpp @@ -484,7 +484,7 @@ bool SceneTree::process(float p_time) { if (Engine::get_singleton()->is_editor_hint()) { //simple hack to reload fallback environment if it changed from editor - String env_path = ProjectSettings::get_singleton()->get("rendering/environment/default_environment"); + String env_path = ProjectSettings::get_singleton()->get("rendering/environment/defaults/default_environment"); env_path = env_path.strip_edges(); //user may have added a space or two String cpath; Ref<Environment> fallback = get_root()->get_world_3d()->get_fallback_environment(); @@ -496,7 +496,7 @@ bool SceneTree::process(float p_time) { fallback = ResourceLoader::load(env_path); if (fallback.is_null()) { //could not load fallback, set as empty - ProjectSettings::get_singleton()->set("rendering/environment/default_environment", ""); + ProjectSettings::get_singleton()->set("rendering/environment/defaults/default_environment", ""); } } else { fallback.unref(); @@ -1349,39 +1349,39 @@ SceneTree::SceneTree() { root->set_as_audio_listener_2d(true); current_scene = nullptr; - const int msaa_mode = GLOBAL_DEF("rendering/quality/screen_filters/msaa", 0); - ProjectSettings::get_singleton()->set_custom_property_info("rendering/quality/screen_filters/msaa", PropertyInfo(Variant::INT, "rendering/quality/screen_filters/msaa", PROPERTY_HINT_ENUM, "Disabled (Fastest),2x (Fast),4x (Average),8x (Slow),16x (Slower)")); + const int msaa_mode = GLOBAL_DEF("rendering/anti_aliasing/quality/msaa", 0); + ProjectSettings::get_singleton()->set_custom_property_info("rendering/anti_aliasing/quality/msaa", PropertyInfo(Variant::INT, "rendering/anti_aliasing/quality/msaa", PROPERTY_HINT_ENUM, "Disabled (Fastest),2x (Fast),4x (Average),8x (Slow),16x (Slower)")); root->set_msaa(Viewport::MSAA(msaa_mode)); - const int ssaa_mode = GLOBAL_DEF("rendering/quality/screen_filters/screen_space_aa", 0); - ProjectSettings::get_singleton()->set_custom_property_info("rendering/quality/screen_filters/screen_space_aa", PropertyInfo(Variant::INT, "rendering/quality/screen_filters/screen_space_aa", PROPERTY_HINT_ENUM, "Disabled (Fastest),FXAA (Fast)")); + const int ssaa_mode = GLOBAL_DEF("rendering/anti_aliasing/quality/screen_space_aa", 0); + ProjectSettings::get_singleton()->set_custom_property_info("rendering/anti_aliasing/quality/screen_space_aa", PropertyInfo(Variant::INT, "rendering/anti_aliasing/quality/screen_space_aa", PROPERTY_HINT_ENUM, "Disabled (Fastest),FXAA (Fast)")); root->set_screen_space_aa(Viewport::ScreenSpaceAA(ssaa_mode)); - const bool use_debanding = GLOBAL_DEF("rendering/quality/screen_filters/use_debanding", false); + const bool use_debanding = GLOBAL_DEF("rendering/anti_aliasing/quality/use_debanding", false); root->set_use_debanding(use_debanding); - float lod_threshold = GLOBAL_DEF("rendering/quality/mesh_lod/threshold_pixels", 1.0); - ProjectSettings::get_singleton()->set_custom_property_info("rendering/quality/mesh_lod/threshold_pixels", PropertyInfo(Variant::FLOAT, "rendering/quality/mesh_lod/threshold_pixels", PROPERTY_HINT_RANGE, "0,1024,0.1")); + float lod_threshold = GLOBAL_DEF("rendering/mesh_lod/lod_change/threshold_pixels", 1.0); + ProjectSettings::get_singleton()->set_custom_property_info("rendering/mesh_lod/lod_change/threshold_pixels", PropertyInfo(Variant::FLOAT, "rendering/mesh_lod/lod_change/threshold_pixels", PROPERTY_HINT_RANGE, "0,1024,0.1")); root->set_lod_threshold(lod_threshold); - bool snap_2d_transforms = GLOBAL_DEF("rendering/quality/2d/snap_2d_transforms_to_pixel", false); + bool snap_2d_transforms = GLOBAL_DEF("rendering/2d/snap/snap_2d_transforms_to_pixel", false); root->set_snap_2d_transforms_to_pixel(snap_2d_transforms); - bool snap_2d_vertices = GLOBAL_DEF("rendering/quality/2d/snap_2d_vertices_to_pixel", false); + bool snap_2d_vertices = GLOBAL_DEF("rendering/2d/snap/snap_2d_vertices_to_pixel", false); root->set_snap_2d_vertices_to_pixel(snap_2d_vertices); - int shadowmap_size = GLOBAL_DEF("rendering/quality/shadow_atlas/size", 4096); - ProjectSettings::get_singleton()->set_custom_property_info("rendering/quality/shadow_atlas/size", PropertyInfo(Variant::INT, "rendering/quality/shadow_atlas/size", PROPERTY_HINT_RANGE, "256,16384")); - GLOBAL_DEF("rendering/quality/shadow_atlas/size.mobile", 2048); - bool shadowmap_16_bits = GLOBAL_DEF("rendering/quality/shadow_atlas/16_bits", true); - int atlas_q0 = GLOBAL_DEF("rendering/quality/shadow_atlas/quadrant_0_subdiv", 2); - int atlas_q1 = GLOBAL_DEF("rendering/quality/shadow_atlas/quadrant_1_subdiv", 2); - int atlas_q2 = GLOBAL_DEF("rendering/quality/shadow_atlas/quadrant_2_subdiv", 3); - int atlas_q3 = GLOBAL_DEF("rendering/quality/shadow_atlas/quadrant_3_subdiv", 4); - ProjectSettings::get_singleton()->set_custom_property_info("rendering/quality/shadow_atlas/quadrant_0_subdiv", PropertyInfo(Variant::INT, "rendering/quality/shadow_atlas/quadrant_0_subdiv", PROPERTY_HINT_ENUM, "Disabled,1 Shadow,4 Shadows,16 Shadows,64 Shadows,256 Shadows,1024 Shadows")); - ProjectSettings::get_singleton()->set_custom_property_info("rendering/quality/shadow_atlas/quadrant_1_subdiv", PropertyInfo(Variant::INT, "rendering/quality/shadow_atlas/quadrant_1_subdiv", PROPERTY_HINT_ENUM, "Disabled,1 Shadow,4 Shadows,16 Shadows,64 Shadows,256 Shadows,1024 Shadows")); - ProjectSettings::get_singleton()->set_custom_property_info("rendering/quality/shadow_atlas/quadrant_2_subdiv", PropertyInfo(Variant::INT, "rendering/quality/shadow_atlas/quadrant_2_subdiv", PROPERTY_HINT_ENUM, "Disabled,1 Shadow,4 Shadows,16 Shadows,64 Shadows,256 Shadows,1024 Shadows")); - ProjectSettings::get_singleton()->set_custom_property_info("rendering/quality/shadow_atlas/quadrant_3_subdiv", PropertyInfo(Variant::INT, "rendering/quality/shadow_atlas/quadrant_3_subdiv", PROPERTY_HINT_ENUM, "Disabled,1 Shadow,4 Shadows,16 Shadows,64 Shadows,256 Shadows,1024 Shadows")); + int shadowmap_size = GLOBAL_DEF("rendering/shadows/shadow_atlas/size", 4096); + ProjectSettings::get_singleton()->set_custom_property_info("rendering/shadows/shadow_atlas/size", PropertyInfo(Variant::INT, "rendering/shadows/shadow_atlas/size", PROPERTY_HINT_RANGE, "256,16384")); + GLOBAL_DEF("rendering/shadows/shadow_atlas/size.mobile", 2048); + bool shadowmap_16_bits = GLOBAL_DEF("rendering/shadows/shadow_atlas/16_bits", true); + int atlas_q0 = GLOBAL_DEF("rendering/shadows/shadow_atlas/quadrant_0_subdiv", 2); + int atlas_q1 = GLOBAL_DEF("rendering/shadows/shadow_atlas/quadrant_1_subdiv", 2); + int atlas_q2 = GLOBAL_DEF("rendering/shadows/shadow_atlas/quadrant_2_subdiv", 3); + int atlas_q3 = GLOBAL_DEF("rendering/shadows/shadow_atlas/quadrant_3_subdiv", 4); + ProjectSettings::get_singleton()->set_custom_property_info("rendering/shadows/shadow_atlas/quadrant_0_subdiv", PropertyInfo(Variant::INT, "rendering/shadows/shadow_atlas/quadrant_0_subdiv", PROPERTY_HINT_ENUM, "Disabled,1 Shadow,4 Shadows,16 Shadows,64 Shadows,256 Shadows,1024 Shadows")); + ProjectSettings::get_singleton()->set_custom_property_info("rendering/shadows/shadow_atlas/quadrant_1_subdiv", PropertyInfo(Variant::INT, "rendering/shadows/shadow_atlas/quadrant_1_subdiv", PROPERTY_HINT_ENUM, "Disabled,1 Shadow,4 Shadows,16 Shadows,64 Shadows,256 Shadows,1024 Shadows")); + ProjectSettings::get_singleton()->set_custom_property_info("rendering/shadows/shadow_atlas/quadrant_2_subdiv", PropertyInfo(Variant::INT, "rendering/shadows/shadow_atlas/quadrant_2_subdiv", PROPERTY_HINT_ENUM, "Disabled,1 Shadow,4 Shadows,16 Shadows,64 Shadows,256 Shadows,1024 Shadows")); + ProjectSettings::get_singleton()->set_custom_property_info("rendering/shadows/shadow_atlas/quadrant_3_subdiv", PropertyInfo(Variant::INT, "rendering/shadows/shadow_atlas/quadrant_3_subdiv", PROPERTY_HINT_ENUM, "Disabled,1 Shadow,4 Shadows,16 Shadows,64 Shadows,256 Shadows,1024 Shadows")); root->set_shadow_atlas_size(shadowmap_size); root->set_shadow_atlas_16_bits(shadowmap_16_bits); @@ -1390,13 +1390,13 @@ SceneTree::SceneTree() { root->set_shadow_atlas_quadrant_subdiv(2, Viewport::ShadowAtlasQuadrantSubdiv(atlas_q2)); root->set_shadow_atlas_quadrant_subdiv(3, Viewport::ShadowAtlasQuadrantSubdiv(atlas_q3)); - Viewport::SDFOversize sdf_oversize = Viewport::SDFOversize(int(GLOBAL_DEF("rendering/quality/2d_sdf/oversize", 1))); + Viewport::SDFOversize sdf_oversize = Viewport::SDFOversize(int(GLOBAL_DEF("rendering/2d/sdf/oversize", 1))); root->set_sdf_oversize(sdf_oversize); - Viewport::SDFScale sdf_scale = Viewport::SDFScale(int(GLOBAL_DEF("rendering/quality/2d_sdf/scale", 1))); + Viewport::SDFScale sdf_scale = Viewport::SDFScale(int(GLOBAL_DEF("rendering/2d/sdf/scale", 1))); root->set_sdf_scale(sdf_scale); - ProjectSettings::get_singleton()->set_custom_property_info("rendering/quality/2d_sdf/oversize", PropertyInfo(Variant::INT, "rendering/quality/2d_sdf/oversize", PROPERTY_HINT_ENUM, "100%,120%,150%,200%")); - ProjectSettings::get_singleton()->set_custom_property_info("rendering/quality/2d_sdf/scale", PropertyInfo(Variant::INT, "rendering/quality/2d_sdf/scale", PROPERTY_HINT_ENUM, "100%,50%,25%")); + ProjectSettings::get_singleton()->set_custom_property_info("rendering/2d/sdf/oversize", PropertyInfo(Variant::INT, "rendering/2d/sdf/oversize", PROPERTY_HINT_ENUM, "100%,120%,150%,200%")); + ProjectSettings::get_singleton()->set_custom_property_info("rendering/2d/sdf/scale", PropertyInfo(Variant::INT, "rendering/2d/sdf/scale", PROPERTY_HINT_ENUM, "100%,50%,25%")); { // Load default fallback environment. // Get possible extensions. @@ -1410,9 +1410,9 @@ SceneTree::SceneTree() { ext_hint += "*." + E->get(); } // Get path. - String env_path = GLOBAL_DEF("rendering/environment/default_environment", ""); + String env_path = GLOBAL_DEF("rendering/environment/defaults/default_environment", ""); // Setup property. - ProjectSettings::get_singleton()->set_custom_property_info("rendering/environment/default_environment", PropertyInfo(Variant::STRING, "rendering/viewport/default_environment", PROPERTY_HINT_FILE, ext_hint)); + ProjectSettings::get_singleton()->set_custom_property_info("rendering/environment/defaults/default_environment", PropertyInfo(Variant::STRING, "rendering/viewport/default_environment", PROPERTY_HINT_FILE, ext_hint)); env_path = env_path.strip_edges(); if (env_path != String()) { Ref<Environment> env = ResourceLoader::load(env_path); @@ -1421,7 +1421,7 @@ SceneTree::SceneTree() { } else { if (Engine::get_singleton()->is_editor_hint()) { // File was erased, clear the field. - ProjectSettings::get_singleton()->set("rendering/environment/default_environment", ""); + ProjectSettings::get_singleton()->set("rendering/environment/defaults/default_environment", ""); } else { // File was erased, notify user. ERR_PRINT(RTR("Default Environment as specified in Project Settings (Rendering -> Environment -> Default Environment) could not be loaded.")); diff --git a/scene/main/window.cpp b/scene/main/window.cpp index f39823736b..fc9bbeab94 100644 --- a/scene/main/window.cpp +++ b/scene/main/window.cpp @@ -1283,14 +1283,14 @@ bool Window::is_layout_rtl() const { if (parent) { return parent->is_layout_rtl(); } else { - if (GLOBAL_GET("display/window/force_right_to_left_layout_direction")) { + if (GLOBAL_GET("internationalization/rendering/force_right_to_left_layout_direction")) { return true; } String locale = TranslationServer::get_singleton()->get_tool_locale(); return TS->is_locale_right_to_left(locale); } } else if (layout_dir == LAYOUT_DIRECTION_LOCALE) { - if (GLOBAL_GET("display/window/force_right_to_left_layout_direction")) { + if (GLOBAL_GET("internationalization/rendering/force_right_to_left_layout_direction")) { return true; } String locale = TranslationServer::get_singleton()->get_tool_locale(); diff --git a/scene/register_scene_types.cpp b/scene/register_scene_types.cpp index b14c44689e..51d4643883 100644 --- a/scene/register_scene_types.cpp +++ b/scene/register_scene_types.cpp @@ -948,10 +948,10 @@ void register_scene_types() { OS::get_singleton()->yield(); //may take time to init for (int i = 0; i < 20; i++) { - GLOBAL_DEF(vformat("layer_names/2d_render/layer_%d", i), ""); - GLOBAL_DEF(vformat("layer_names/2d_physics/layer_%d", i), ""); - GLOBAL_DEF(vformat("layer_names/3d_render/layer_%d", i), ""); - GLOBAL_DEF(vformat("layer_names/3d_physics/layer_%d", i), ""); + GLOBAL_DEF_BASIC(vformat("layer_names/2d_render/layer_%d", i), ""); + GLOBAL_DEF_BASIC(vformat("layer_names/2d_physics/layer_%d", i), ""); + GLOBAL_DEF_BASIC(vformat("layer_names/3d_render/layer_%d", i), ""); + GLOBAL_DEF_BASIC(vformat("layer_names/3d_physics/layer_%d", i), ""); } bool default_theme_hidpi = GLOBAL_DEF("gui/theme/use_hidpi", false); diff --git a/servers/audio/audio_driver_dummy.cpp b/servers/audio/audio_driver_dummy.cpp index faddced155..a28dcb1015 100644 --- a/servers/audio/audio_driver_dummy.cpp +++ b/servers/audio/audio_driver_dummy.cpp @@ -39,11 +39,11 @@ Error AudioDriverDummy::init() { exit_thread = false; samples_in = nullptr; - mix_rate = GLOBAL_GET("audio/mix_rate"); + mix_rate = GLOBAL_GET("audio/driver/mix_rate"); speaker_mode = SPEAKER_MODE_STEREO; channels = 2; - int latency = GLOBAL_GET("audio/output_latency"); + int latency = GLOBAL_GET("audio/driver/output_latency"); buffer_frames = closest_power_of_2(latency * mix_rate / 1000); samples_in = memnew_arr(int32_t, buffer_frames * channels); diff --git a/servers/audio/audio_stream.cpp b/servers/audio/audio_stream.cpp index 91fce5d34e..49ac78fad8 100644 --- a/servers/audio/audio_stream.cpp +++ b/servers/audio/audio_stream.cpp @@ -184,7 +184,7 @@ void AudioStreamPlaybackMicrophone::start(float p_from_pos) { return; } - if (!GLOBAL_GET("audio/enable_audio_input")) { + if (!GLOBAL_GET("audio/driver/enable_input")) { WARN_PRINT("Need to enable Project settings > Audio > Enable Audio Input option to use capturing."); return; } diff --git a/servers/audio_server.cpp b/servers/audio_server.cpp index 16c6a26595..138cb6e1f8 100644 --- a/servers/audio_server.cpp +++ b/servers/audio_server.cpp @@ -188,10 +188,10 @@ int AudioDriverManager::get_driver_count() { } void AudioDriverManager::initialize(int p_driver) { - GLOBAL_DEF_RST("audio/enable_audio_input", false); - GLOBAL_DEF_RST("audio/mix_rate", DEFAULT_MIX_RATE); - GLOBAL_DEF_RST("audio/output_latency", DEFAULT_OUTPUT_LATENCY); - GLOBAL_DEF_RST("audio/output_latency.web", 50); // Safer default output_latency for web. + GLOBAL_DEF_RST("audio/driver/enable_input", false); + GLOBAL_DEF_RST("audio/driver/mix_rate", DEFAULT_MIX_RATE); + GLOBAL_DEF_RST("audio/driver/output_latency", DEFAULT_OUTPUT_LATENCY); + GLOBAL_DEF_RST("audio/driver/output_latency.web", 50); // Safer default output_latency for web. int failed_driver = -1; @@ -939,9 +939,9 @@ void AudioServer::init_channels_and_buffers() { } void AudioServer::init() { - channel_disable_threshold_db = GLOBAL_DEF_RST("audio/channel_disable_threshold_db", -60.0); - channel_disable_frames = float(GLOBAL_DEF_RST("audio/channel_disable_time", 2.0)) * get_mix_rate(); - ProjectSettings::get_singleton()->set_custom_property_info("audio/channel_disable_time", PropertyInfo(Variant::FLOAT, "audio/channel_disable_time", PROPERTY_HINT_RANGE, "0,5,0.01,or_greater")); + channel_disable_threshold_db = GLOBAL_DEF_RST("audio/buses/channel_disable_threshold_db", -60.0); + channel_disable_frames = float(GLOBAL_DEF_RST("audio/buses/channel_disable_time", 2.0)) * get_mix_rate(); + ProjectSettings::get_singleton()->set_custom_property_info("audio/buses/channel_disable_time", PropertyInfo(Variant::FLOAT, "audio/buses/channel_disable_time", PROPERTY_HINT_RANGE, "0,5,0.01,or_greater")); buffer_size = 1024; //hardcoded for now init_channels_and_buffers(); @@ -958,7 +958,7 @@ void AudioServer::init() { set_edited(false); //avoid editors from thinking this was edited #endif - GLOBAL_DEF_RST("audio/video_delay_compensation_ms", 0); + GLOBAL_DEF_RST("audio/video/video_delay_compensation_ms", 0); } void AudioServer::update() { @@ -1035,7 +1035,7 @@ void AudioServer::update() { } void AudioServer::load_default_bus_layout() { - String layout_path = ProjectSettings::get_singleton()->get("audio/default_bus_layout"); + String layout_path = ProjectSettings::get_singleton()->get("audio/buses/default_bus_layout"); if (ResourceLoader::exists(layout_path)) { Ref<AudioBusLayout> default_layout = ResourceLoader::load(layout_path); diff --git a/servers/register_server_types.cpp b/servers/register_server_types.cpp index 7478ed15a1..deb230c4fb 100644 --- a/servers/register_server_types.cpp +++ b/servers/register_server_types.cpp @@ -104,6 +104,16 @@ static bool has_server_feature_callback(const String &p_feature) { void preregister_server_types() { shader_types = memnew(ShaderTypes); + + GLOBAL_DEF("internationalization/rendering/text_driver", ""); + String text_driver_options; + for (int i = 0; i < TextServerManager::get_interface_count(); i++) { + if (i > 0) { + text_driver_options += ","; + } + text_driver_options += TextServerManager::get_interface_name(i); + } + ProjectSettings::get_singleton()->set_custom_property_info("internationalization/rendering/text_driver", PropertyInfo(Variant::STRING, "internationalization/rendering/text_driver", PROPERTY_HINT_ENUM, text_driver_options)); } void register_server_types() { diff --git a/servers/rendering/renderer_rd/effects_rd.cpp b/servers/rendering/renderer_rd/effects_rd.cpp index a9cadb40df..bc304aedd8 100644 --- a/servers/rendering/renderer_rd/effects_rd.cpp +++ b/servers/rendering/renderer_rd/effects_rd.cpp @@ -1781,7 +1781,7 @@ EffectsRD::EffectsRD() { { // Initialize cubemap filter - filter.use_high_quality = GLOBAL_GET("rendering/quality/reflections/fast_filter_high_quality"); + filter.use_high_quality = GLOBAL_GET("rendering/reflections/sky_reflections/fast_filter_high_quality"); Vector<String> cubemap_filter_modes; cubemap_filter_modes.push_back("\n#define USE_HIGH_QUALITY\n"); diff --git a/servers/rendering/renderer_rd/renderer_canvas_render_rd.cpp b/servers/rendering/renderer_rd/renderer_canvas_render_rd.cpp index 2bf3c436a8..7d6e2fa8e4 100644 --- a/servers/rendering/renderer_rd/renderer_canvas_render_rd.cpp +++ b/servers/rendering/renderer_rd/renderer_canvas_render_rd.cpp @@ -2698,7 +2698,7 @@ RendererCanvasRenderRD::RendererCanvasRenderRD(RendererStorageRD *p_storage) { default_canvas_texture = storage->canvas_texture_allocate(); storage->canvas_texture_initialize(default_canvas_texture); - state.shadow_texture_size = GLOBAL_GET("rendering/quality/2d_shadow_atlas/size"); + state.shadow_texture_size = GLOBAL_GET("rendering/2d/shadow_atlas/size"); //create functions for shader and material storage->shader_set_data_request_function(RendererStorageRD::SHADER_TYPE_2D, _create_shader_funcs); diff --git a/servers/rendering/renderer_rd/renderer_scene_render_forward.cpp b/servers/rendering/renderer_rd/renderer_scene_render_forward.cpp index 15ecc11144..a57dee7314 100644 --- a/servers/rendering/renderer_rd/renderer_scene_render_forward.cpp +++ b/servers/rendering/renderer_rd/renderer_scene_render_forward.cpp @@ -3529,7 +3529,7 @@ RendererSceneRenderForward::RendererSceneRenderForward(RendererStorageRD *p_stor actions.render_mode_defines["cull_front"] = "#define DO_SIDE_CHECK\n"; actions.render_mode_defines["cull_disabled"] = "#define DO_SIDE_CHECK\n"; - bool force_lambert = GLOBAL_GET("rendering/quality/shading/force_lambert_over_burley"); + bool force_lambert = GLOBAL_GET("rendering/shading/overrides/force_lambert_over_burley"); if (!force_lambert) { actions.render_mode_defines["diffuse_burley"] = "#define DIFFUSE_BURLEY\n"; @@ -3541,7 +3541,7 @@ RendererSceneRenderForward::RendererSceneRenderForward(RendererStorageRD *p_stor actions.render_mode_defines["sss_mode_skin"] = "#define SSS_MODE_SKIN\n"; - bool force_blinn = GLOBAL_GET("rendering/quality/shading/force_blinn_over_ggx"); + bool force_blinn = GLOBAL_GET("rendering/shading/overrides/force_blinn_over_ggx"); if (!force_blinn) { actions.render_mode_defines["specular_schlick_ggx"] = "#define SPECULAR_SCHLICK_GGX\n"; @@ -3624,7 +3624,7 @@ RendererSceneRenderForward::RendererSceneRenderForward(RendererStorageRD *p_stor shadow_sampler = RD::get_singleton()->sampler_create(sampler); } - render_list_thread_threshold = GLOBAL_GET("rendering/forward_renderer/threaded_render_minimum_instances"); + render_list_thread_threshold = GLOBAL_GET("rendering/limits/forward_renderer/threaded_render_minimum_instances"); } RendererSceneRenderForward::~RendererSceneRenderForward() { diff --git a/servers/rendering/renderer_rd/renderer_scene_render_rd.cpp b/servers/rendering/renderer_rd/renderer_scene_render_rd.cpp index 74cfd64561..15e963f6e4 100644 --- a/servers/rendering/renderer_rd/renderer_scene_render_rd.cpp +++ b/servers/rendering/renderer_rd/renderer_scene_render_rd.cpp @@ -3329,8 +3329,8 @@ Ref<Image> RendererSceneRenderRD::environment_bake_panorama(RID p_env, bool p_ba RID RendererSceneRenderRD::reflection_atlas_create() { ReflectionAtlas ra; - ra.count = GLOBAL_GET("rendering/quality/reflection_atlas/reflection_count"); - ra.size = GLOBAL_GET("rendering/quality/reflection_atlas/reflection_size"); + ra.count = GLOBAL_GET("rendering/reflections/reflection_atlas/reflection_count"); + ra.size = GLOBAL_GET("rendering/reflections/reflection_atlas/reflection_size"); ra.cluster_builder = memnew(ClusterBuilderRD); ra.cluster_builder->set_shared(&cluster_builder_shared); @@ -8436,25 +8436,25 @@ bool RendererSceneRenderRD::is_low_end() const { } RendererSceneRenderRD::RendererSceneRenderRD(RendererStorageRD *p_storage) { - max_cluster_elements = GLOBAL_GET("rendering/cluster_builder/max_clustered_elements"); + max_cluster_elements = GLOBAL_GET("rendering/limits/cluster_builder/max_clustered_elements"); storage = p_storage; singleton = this; - roughness_layers = GLOBAL_GET("rendering/quality/reflections/roughness_layers"); - sky_ggx_samples_quality = GLOBAL_GET("rendering/quality/reflections/ggx_samples"); - sky_use_cubemap_array = GLOBAL_GET("rendering/quality/reflections/texture_array_reflections"); + roughness_layers = GLOBAL_GET("rendering/reflections/sky_reflections/roughness_layers"); + sky_ggx_samples_quality = GLOBAL_GET("rendering/reflections/sky_reflections/ggx_samples"); + sky_use_cubemap_array = GLOBAL_GET("rendering/reflections/sky_reflections/texture_array_reflections"); - sdfgi_ray_count = RS::EnvironmentSDFGIRayCount(CLAMP(int32_t(GLOBAL_GET("rendering/sdfgi/probe_ray_count")), 0, int32_t(RS::ENV_SDFGI_RAY_COUNT_MAX - 1))); - sdfgi_frames_to_converge = RS::EnvironmentSDFGIFramesToConverge(CLAMP(int32_t(GLOBAL_GET("rendering/sdfgi/frames_to_converge")), 0, int32_t(RS::ENV_SDFGI_CONVERGE_MAX - 1))); - sdfgi_frames_to_update_light = RS::EnvironmentSDFGIFramesToUpdateLight(CLAMP(int32_t(GLOBAL_GET("rendering/sdfgi/frames_to_update_lights")), 0, int32_t(RS::ENV_SDFGI_UPDATE_LIGHT_MAX - 1))); + sdfgi_ray_count = RS::EnvironmentSDFGIRayCount(CLAMP(int32_t(GLOBAL_GET("rendering/global_illumination/sdfgi/probe_ray_count")), 0, int32_t(RS::ENV_SDFGI_RAY_COUNT_MAX - 1))); + sdfgi_frames_to_converge = RS::EnvironmentSDFGIFramesToConverge(CLAMP(int32_t(GLOBAL_GET("rendering/global_illumination/sdfgi/frames_to_converge")), 0, int32_t(RS::ENV_SDFGI_CONVERGE_MAX - 1))); + sdfgi_frames_to_update_light = RS::EnvironmentSDFGIFramesToUpdateLight(CLAMP(int32_t(GLOBAL_GET("rendering/global_illumination/sdfgi/frames_to_update_lights")), 0, int32_t(RS::ENV_SDFGI_UPDATE_LIGHT_MAX - 1))); - directional_shadow.size = GLOBAL_GET("rendering/quality/directional_shadow/size"); - directional_shadow.use_16_bits = GLOBAL_GET("rendering/quality/directional_shadow/16_bits"); + directional_shadow.size = GLOBAL_GET("rendering/shadows/directional_shadow/size"); + directional_shadow.use_16_bits = GLOBAL_GET("rendering/shadows/directional_shadow/16_bits"); uint32_t textures_per_stage = RD::get_singleton()->limit_get(RD::LIMIT_MAX_TEXTURES_PER_SHADER_STAGE); - low_end = GLOBAL_GET("rendering/quality/rd_renderer/use_low_end_renderer"); + low_end = GLOBAL_GET("rendering/driver/rd_renderer/use_low_end_renderer"); if (textures_per_stage < 48) { low_end = true; @@ -8467,7 +8467,7 @@ RendererSceneRenderRD::RendererSceneRenderRD(RendererStorageRD *p_storage) { gi_probe_lights = memnew_arr(GIProbeLight, gi_probe_max_lights); gi_probe_lights_uniform = RD::get_singleton()->uniform_buffer_create(gi_probe_max_lights * sizeof(GIProbeLight)); - gi_probe_quality = RS::GIProbeQuality(CLAMP(int(GLOBAL_GET("rendering/quality/gi_probes/quality")), 0, 1)); + gi_probe_quality = RS::GIProbeQuality(CLAMP(int(GLOBAL_GET("rendering/global_illumination/gi_probes/quality")), 0, 1)); String defines = "\n#define MAX_LIGHTS " + itos(gi_probe_max_lights) + "\n"; @@ -8903,31 +8903,31 @@ RendererSceneRenderRD::RendererSceneRenderRD(RendererStorageRD *p_storage) { shadow_sampler = RD::get_singleton()->sampler_create(sampler); } - camera_effects_set_dof_blur_bokeh_shape(RS::DOFBokehShape(int(GLOBAL_GET("rendering/quality/depth_of_field/depth_of_field_bokeh_shape")))); - camera_effects_set_dof_blur_quality(RS::DOFBlurQuality(int(GLOBAL_GET("rendering/quality/depth_of_field/depth_of_field_bokeh_quality"))), GLOBAL_GET("rendering/quality/depth_of_field/depth_of_field_use_jitter")); - environment_set_ssao_quality(RS::EnvironmentSSAOQuality(int(GLOBAL_GET("rendering/quality/ssao/quality"))), GLOBAL_GET("rendering/quality/ssao/half_size"), GLOBAL_GET("rendering/quality/ssao/adaptive_target"), GLOBAL_GET("rendering/quality/ssao/blur_passes"), GLOBAL_GET("rendering/quality/ssao/fadeout_from"), GLOBAL_GET("rendering/quality/ssao/fadeout_to")); - screen_space_roughness_limiter = GLOBAL_GET("rendering/quality/screen_filters/screen_space_roughness_limiter_enabled"); - screen_space_roughness_limiter_amount = GLOBAL_GET("rendering/quality/screen_filters/screen_space_roughness_limiter_amount"); - screen_space_roughness_limiter_limit = GLOBAL_GET("rendering/quality/screen_filters/screen_space_roughness_limiter_limit"); - glow_bicubic_upscale = int(GLOBAL_GET("rendering/quality/glow/upscale_mode")) > 0; - glow_high_quality = GLOBAL_GET("rendering/quality/glow/use_high_quality"); - ssr_roughness_quality = RS::EnvironmentSSRRoughnessQuality(int(GLOBAL_GET("rendering/quality/screen_space_reflection/roughness_quality"))); - sss_quality = RS::SubSurfaceScatteringQuality(int(GLOBAL_GET("rendering/quality/subsurface_scattering/subsurface_scattering_quality"))); - sss_scale = GLOBAL_GET("rendering/quality/subsurface_scattering/subsurface_scattering_scale"); - sss_depth_scale = GLOBAL_GET("rendering/quality/subsurface_scattering/subsurface_scattering_depth_scale"); + camera_effects_set_dof_blur_bokeh_shape(RS::DOFBokehShape(int(GLOBAL_GET("rendering/camera/depth_of_field/depth_of_field_bokeh_shape")))); + camera_effects_set_dof_blur_quality(RS::DOFBlurQuality(int(GLOBAL_GET("rendering/camera/depth_of_field/depth_of_field_bokeh_quality"))), GLOBAL_GET("rendering/camera/depth_of_field/depth_of_field_use_jitter")); + environment_set_ssao_quality(RS::EnvironmentSSAOQuality(int(GLOBAL_GET("rendering/environment/ssao/quality"))), GLOBAL_GET("rendering/environment/ssao/half_size"), GLOBAL_GET("rendering/environment/ssao/adaptive_target"), GLOBAL_GET("rendering/environment/ssao/blur_passes"), GLOBAL_GET("rendering/environment/ssao/fadeout_from"), GLOBAL_GET("rendering/environment/ssao/fadeout_to")); + screen_space_roughness_limiter = GLOBAL_GET("rendering/anti_aliasing/screen_space_roughness_limiter/enabled"); + screen_space_roughness_limiter_amount = GLOBAL_GET("rendering/anti_aliasing/screen_space_roughness_limiter/amount"); + screen_space_roughness_limiter_limit = GLOBAL_GET("rendering/anti_aliasing/screen_space_roughness_limiter/limit"); + glow_bicubic_upscale = int(GLOBAL_GET("rendering/environment/glow/upscale_mode")) > 0; + glow_high_quality = GLOBAL_GET("rendering/environment/glow/use_high_quality"); + ssr_roughness_quality = RS::EnvironmentSSRRoughnessQuality(int(GLOBAL_GET("rendering/environment/screen_space_reflection/roughness_quality"))); + sss_quality = RS::SubSurfaceScatteringQuality(int(GLOBAL_GET("rendering/environment/subsurface_scattering/subsurface_scattering_quality"))); + sss_scale = GLOBAL_GET("rendering/environment/subsurface_scattering/subsurface_scattering_scale"); + sss_depth_scale = GLOBAL_GET("rendering/environment/subsurface_scattering/subsurface_scattering_depth_scale"); directional_penumbra_shadow_kernel = memnew_arr(float, 128); directional_soft_shadow_kernel = memnew_arr(float, 128); penumbra_shadow_kernel = memnew_arr(float, 128); soft_shadow_kernel = memnew_arr(float, 128); - shadows_quality_set(RS::ShadowQuality(int(GLOBAL_GET("rendering/quality/shadows/soft_shadow_quality")))); - directional_shadow_quality_set(RS::ShadowQuality(int(GLOBAL_GET("rendering/quality/directional_shadow/soft_shadow_quality")))); + shadows_quality_set(RS::ShadowQuality(int(GLOBAL_GET("rendering/shadows/shadows/soft_shadow_quality")))); + directional_shadow_quality_set(RS::ShadowQuality(int(GLOBAL_GET("rendering/shadows/directional_shadow/soft_shadow_quality")))); - environment_set_volumetric_fog_volume_size(GLOBAL_GET("rendering/volumetric_fog/volume_size"), GLOBAL_GET("rendering/volumetric_fog/volume_depth")); - environment_set_volumetric_fog_filter_active(GLOBAL_GET("rendering/volumetric_fog/use_filter")); + environment_set_volumetric_fog_volume_size(GLOBAL_GET("rendering/environment/volumetric_fog/volume_size"), GLOBAL_GET("rendering/environment/volumetric_fog/volume_depth")); + environment_set_volumetric_fog_filter_active(GLOBAL_GET("rendering/environment/volumetric_fog/use_filter")); cull_argument.set_page_pool(&cull_argument_pool); - gi.half_resolution = GLOBAL_GET("rendering/quality/gi/use_half_resolution"); + gi.half_resolution = GLOBAL_GET("rendering/global_illumination/gi/use_half_resolution"); } RendererSceneRenderRD::~RendererSceneRenderRD() { diff --git a/servers/rendering/renderer_rd/renderer_storage_rd.cpp b/servers/rendering/renderer_rd/renderer_storage_rd.cpp index f25cd2ade4..2a34049675 100644 --- a/servers/rendering/renderer_rd/renderer_storage_rd.cpp +++ b/servers/rendering/renderer_rd/renderer_storage_rd.cpp @@ -8396,7 +8396,7 @@ RendererStorageRD::RendererStorageRD() { static_assert(sizeof(GlobalVariables::Value) == 16); - global_variables.buffer_size = GLOBAL_GET("rendering/high_end/global_shader_variables_buffer_size"); + global_variables.buffer_size = GLOBAL_GET("rendering/limits/global_shader_variables/buffer_size"); global_variables.buffer_size = MAX(4096, global_variables.buffer_size); global_variables.buffer_values = memnew_arr(GlobalVariables::Value, global_variables.buffer_size); zeromem(global_variables.buffer_values, sizeof(GlobalVariables::Value) * global_variables.buffer_size); @@ -8664,14 +8664,14 @@ RendererStorageRD::RendererStorageRD() { sampler_state.min_filter = RD::SAMPLER_FILTER_LINEAR; sampler_state.mip_filter = RD::SAMPLER_FILTER_LINEAR; sampler_state.use_anisotropy = true; - sampler_state.anisotropy_max = 1 << int(GLOBAL_GET("rendering/quality/texture_filters/anisotropic_filtering_level")); + sampler_state.anisotropy_max = 1 << int(GLOBAL_GET("rendering/textures/default_filters/anisotropic_filtering_level")); } break; case RS::CANVAS_ITEM_TEXTURE_FILTER_LINEAR_WITH_MIPMAPS_ANISOTROPIC: { sampler_state.mag_filter = RD::SAMPLER_FILTER_LINEAR; sampler_state.min_filter = RD::SAMPLER_FILTER_LINEAR; sampler_state.mip_filter = RD::SAMPLER_FILTER_LINEAR; sampler_state.use_anisotropy = true; - sampler_state.anisotropy_max = 1 << int(GLOBAL_GET("rendering/quality/texture_filters/anisotropic_filtering_level")); + sampler_state.anisotropy_max = 1 << int(GLOBAL_GET("rendering/textures/default_filters/anisotropic_filtering_level")); } break; default: { @@ -8841,7 +8841,7 @@ RendererStorageRD::RendererStorageRD() { } } - lightmap_probe_capture_update_speed = GLOBAL_GET("rendering/lightmapper/probe_capture_update_speed"); + lightmap_probe_capture_update_speed = GLOBAL_GET("rendering/lightmapping/probe_capture/update_speed"); /* Particles */ diff --git a/servers/rendering/renderer_rd/shader_compiler_rd.cpp b/servers/rendering/renderer_rd/shader_compiler_rd.cpp index a81706700a..8135d388e1 100644 --- a/servers/rendering/renderer_rd/shader_compiler_rd.cpp +++ b/servers/rendering/renderer_rd/shader_compiler_rd.cpp @@ -1468,7 +1468,7 @@ ShaderCompilerRD::ShaderCompilerRD() { actions[RS::SHADER_SPATIAL].render_mode_defines["cull_front"] = "#define DO_SIDE_CHECK\n"; actions[RS::SHADER_SPATIAL].render_mode_defines["cull_disabled"] = "#define DO_SIDE_CHECK\n"; - bool force_lambert = GLOBAL_GET("rendering/quality/shading/force_lambert_over_burley"); + bool force_lambert = GLOBAL_GET("rendering/shading/overrides/force_lambert_over_burley"); if (!force_lambert) { actions[RS::SHADER_SPATIAL].render_mode_defines["diffuse_burley"] = "#define DIFFUSE_BURLEY\n"; @@ -1478,7 +1478,7 @@ ShaderCompilerRD::ShaderCompilerRD() { actions[RS::SHADER_SPATIAL].render_mode_defines["diffuse_lambert_wrap"] = "#define DIFFUSE_LAMBERT_WRAP\n"; actions[RS::SHADER_SPATIAL].render_mode_defines["diffuse_toon"] = "#define DIFFUSE_TOON\n"; - bool force_blinn = GLOBAL_GET("rendering/quality/shading/force_blinn_over_ggx"); + bool force_blinn = GLOBAL_GET("rendering/shading/overrides/force_blinn_over_ggx"); if (!force_blinn) { actions[RS::SHADER_SPATIAL].render_mode_defines["specular_schlick_ggx"] = "#define SPECULAR_SCHLICK_GGX\n"; diff --git a/servers/rendering/renderer_scene_cull.cpp b/servers/rendering/renderer_scene_cull.cpp index 8a2a1a9eaa..e8155e4025 100644 --- a/servers/rendering/renderer_scene_cull.cpp +++ b/servers/rendering/renderer_scene_cull.cpp @@ -3533,8 +3533,8 @@ RendererSceneCull::RendererSceneCull() { frustum_cull_result_threads[i].init(&rid_cull_page_pool, &geometry_instance_cull_page_pool, &instance_cull_page_pool); } - indexer_update_iterations = GLOBAL_GET("rendering/spatial_indexer/update_iterations_per_frame"); - thread_cull_threshold = GLOBAL_GET("rendering/spatial_indexer/threaded_cull_minimum_instances"); + indexer_update_iterations = GLOBAL_GET("rendering/limits/spatial_indexer/update_iterations_per_frame"); + thread_cull_threshold = GLOBAL_GET("rendering/limits/spatial_indexer/threaded_cull_minimum_instances"); thread_cull_threshold = MAX(thread_cull_threshold, (uint32_t)RendererThreadPool::singleton->thread_work_pool.get_thread_count()); //make sure there is at least one thread per CPU } diff --git a/servers/rendering/renderer_viewport.cpp b/servers/rendering/renderer_viewport.cpp index fc3d8a78e7..a5d5033c18 100644 --- a/servers/rendering/renderer_viewport.cpp +++ b/servers/rendering/renderer_viewport.cpp @@ -457,7 +457,7 @@ void RendererViewport::draw_viewports() { } if (Engine::get_singleton()->is_editor_hint()) { - set_default_clear_color(GLOBAL_GET("rendering/environment/default_clear_color")); + set_default_clear_color(GLOBAL_GET("rendering/environment/defaults/default_clear_color")); } //sort viewports diff --git a/servers/rendering_server.cpp b/servers/rendering_server.cpp index a3c8ef304f..809343114c 100644 --- a/servers/rendering_server.cpp +++ b/servers/rendering_server.cpp @@ -2259,130 +2259,130 @@ RenderingServer::RenderingServer() { thread_pool = memnew(RendererThreadPool); singleton = this; - GLOBAL_DEF_RST("rendering/vram_compression/import_bptc", false); - GLOBAL_DEF_RST("rendering/vram_compression/import_s3tc", true); - GLOBAL_DEF_RST("rendering/vram_compression/import_etc", false); - GLOBAL_DEF_RST("rendering/vram_compression/import_etc2", true); - GLOBAL_DEF_RST("rendering/vram_compression/import_pvrtc", false); + GLOBAL_DEF_RST("rendering/textures/vram_compression/import_bptc", false); + GLOBAL_DEF_RST("rendering/textures/vram_compression/import_s3tc", true); + GLOBAL_DEF_RST("rendering/textures/vram_compression/import_etc", false); + GLOBAL_DEF_RST("rendering/textures/vram_compression/import_etc2", true); + GLOBAL_DEF_RST("rendering/textures/vram_compression/import_pvrtc", false); GLOBAL_DEF("rendering/limits/time/time_rollover_secs", 3600); ProjectSettings::get_singleton()->set_custom_property_info("rendering/limits/time/time_rollover_secs", PropertyInfo(Variant::FLOAT, "rendering/limits/time/time_rollover_secs", PROPERTY_HINT_RANGE, "0,10000,1,or_greater")); - GLOBAL_DEF("rendering/quality/directional_shadow/size", 4096); - GLOBAL_DEF("rendering/quality/directional_shadow/size.mobile", 2048); - ProjectSettings::get_singleton()->set_custom_property_info("rendering/quality/directional_shadow/size", PropertyInfo(Variant::INT, "rendering/quality/directional_shadow/size", PROPERTY_HINT_RANGE, "256,16384")); - GLOBAL_DEF("rendering/quality/directional_shadow/soft_shadow_quality", 2); - GLOBAL_DEF("rendering/quality/directional_shadow/soft_shadow_quality.mobile", 0); - ProjectSettings::get_singleton()->set_custom_property_info("rendering/quality/directional_shadow/soft_shadow_quality", PropertyInfo(Variant::INT, "rendering/quality/directional_shadow/soft_shadow_quality", PROPERTY_HINT_ENUM, "Hard (Fastest),Soft Low (Fast),Soft Medium (Average),Soft High (Slow),Soft Ultra (Slowest)")); - GLOBAL_DEF("rendering/quality/directional_shadow/16_bits", true); - - GLOBAL_DEF("rendering/quality/shadows/soft_shadow_quality", 2); - GLOBAL_DEF("rendering/quality/shadows/soft_shadow_quality.mobile", 0); - ProjectSettings::get_singleton()->set_custom_property_info("rendering/quality/shadows/soft_shadow_quality", PropertyInfo(Variant::INT, "rendering/quality/shadows/soft_shadow_quality", PROPERTY_HINT_ENUM, "Hard (Fastest),Soft Low (Fast),Soft Medium (Average),Soft High (Slow),Soft Ultra (Slowest)")); - - GLOBAL_DEF("rendering/quality/2d_shadow_atlas/size", 2048); - - GLOBAL_DEF("rendering/quality/rd_renderer/use_low_end_renderer", false); - GLOBAL_DEF("rendering/quality/rd_renderer/use_low_end_renderer.mobile", true); - - GLOBAL_DEF("rendering/quality/reflections/roughness_layers", 8); - GLOBAL_DEF("rendering/quality/reflections/texture_array_reflections", true); - GLOBAL_DEF("rendering/quality/reflections/texture_array_reflections.mobile", false); - GLOBAL_DEF("rendering/quality/reflections/ggx_samples", 1024); - GLOBAL_DEF("rendering/quality/reflections/ggx_samples.mobile", 128); - GLOBAL_DEF("rendering/quality/reflections/fast_filter_high_quality", false); - GLOBAL_DEF("rendering/quality/reflection_atlas/reflection_size", 256); - GLOBAL_DEF("rendering/quality/reflection_atlas/reflection_size.mobile", 128); - GLOBAL_DEF("rendering/quality/reflection_atlas/reflection_count", 64); - - GLOBAL_DEF("rendering/quality/gi/use_half_resolution", false); - - GLOBAL_DEF("rendering/quality/gi_probes/anisotropic", false); - GLOBAL_DEF("rendering/quality/gi_probes/quality", 1); - ProjectSettings::get_singleton()->set_custom_property_info("rendering/quality/gi_probes/quality", PropertyInfo(Variant::INT, "rendering/quality/gi_probes/quality", PROPERTY_HINT_ENUM, "Low (4 Cones - Fast),High (6 Cones - Slow)")); - - GLOBAL_DEF("rendering/quality/shading/force_vertex_shading", false); - GLOBAL_DEF("rendering/quality/shading/force_vertex_shading.mobile", true); - GLOBAL_DEF("rendering/quality/shading/force_lambert_over_burley", false); - GLOBAL_DEF("rendering/quality/shading/force_lambert_over_burley.mobile", true); - GLOBAL_DEF("rendering/quality/shading/force_blinn_over_ggx", false); - GLOBAL_DEF("rendering/quality/shading/force_blinn_over_ggx.mobile", true); - - GLOBAL_DEF("rendering/quality/depth_prepass/enable", true); - GLOBAL_DEF("rendering/quality/depth_prepass/disable_for_vendors", "PowerVR,Mali,Adreno,Apple"); - - GLOBAL_DEF("rendering/quality/texture_filters/use_nearest_mipmap_filter", false); - GLOBAL_DEF("rendering/quality/texture_filters/anisotropic_filtering_level", 2); - ProjectSettings::get_singleton()->set_custom_property_info("rendering/quality/texture_filters/anisotropic_filtering_level", PropertyInfo(Variant::INT, "rendering/quality/texture_filters/anisotropic_filtering_level", PROPERTY_HINT_ENUM, "Disabled (Fastest),2x (Faster),4x (Fast),8x (Average),16x (Slow)")); - - GLOBAL_DEF("rendering/quality/depth_of_field/depth_of_field_bokeh_shape", 1); - ProjectSettings::get_singleton()->set_custom_property_info("rendering/quality/depth_of_field/depth_of_field_bokeh_shape", PropertyInfo(Variant::INT, "rendering/quality/depth_of_field/depth_of_field_bokeh_shape", PROPERTY_HINT_ENUM, "Box (Fast),Hexagon (Average),Circle (Slow)")); - GLOBAL_DEF("rendering/quality/depth_of_field/depth_of_field_bokeh_quality", 2); - ProjectSettings::get_singleton()->set_custom_property_info("rendering/quality/depth_of_field/depth_of_field_bokeh_quality", PropertyInfo(Variant::INT, "rendering/quality/depth_of_field/depth_of_field_bokeh_quality", PROPERTY_HINT_ENUM, "Very Low (Fastest),Low (Fast),Medium (Average),High (Slow)")); - GLOBAL_DEF("rendering/quality/depth_of_field/depth_of_field_use_jitter", false); - - GLOBAL_DEF("rendering/quality/ssao/quality", 2); - ProjectSettings::get_singleton()->set_custom_property_info("rendering/quality/ssao/quality", PropertyInfo(Variant::INT, "rendering/quality/ssao/quality", PROPERTY_HINT_ENUM, "Very Low (Fast),Low (Fast),Medium (Average),High (Slow),Ultra (Custom)")); - GLOBAL_DEF("rendering/quality/ssao/half_size", false); - GLOBAL_DEF("rendering/quality/ssao/half_size.mobile", true); - GLOBAL_DEF("rendering/quality/ssao/adaptive_target", 0.5); - ProjectSettings::get_singleton()->set_custom_property_info("rendering/quality/ssao/adaptive_target", PropertyInfo(Variant::FLOAT, "rendering/quality/ssao/adaptive_target", PROPERTY_HINT_RANGE, "0.0,1.0,0.01")); - GLOBAL_DEF("rendering/quality/ssao/blur_passes", 2); - ProjectSettings::get_singleton()->set_custom_property_info("rendering/quality/ssao/blur_passes", PropertyInfo(Variant::INT, "rendering/quality/ssao/blur_passes", PROPERTY_HINT_RANGE, "0,6")); - GLOBAL_DEF("rendering/quality/ssao/fadeout_from", 50.0); - ProjectSettings::get_singleton()->set_custom_property_info("rendering/quality/ssao/fadeout_from", PropertyInfo(Variant::FLOAT, "rendering/quality/ssao/fadeout_from", PROPERTY_HINT_RANGE, "0.0,512,0.1,or_greater")); - GLOBAL_DEF("rendering/quality/ssao/fadeout_to", 300.0); - ProjectSettings::get_singleton()->set_custom_property_info("rendering/quality/ssao/fadeout_to", PropertyInfo(Variant::FLOAT, "rendering/quality/ssao/fadeout_to", PROPERTY_HINT_RANGE, "64,65536,0.1,or_greater")); - - GLOBAL_DEF("rendering/quality/screen_filters/screen_space_roughness_limiter_enabled", true); - GLOBAL_DEF("rendering/quality/screen_filters/screen_space_roughness_limiter_amount", 0.25); - GLOBAL_DEF("rendering/quality/screen_filters/screen_space_roughness_limiter_limit", 0.18); - ProjectSettings::get_singleton()->set_custom_property_info("rendering/quality/screen_filters/screen_space_roughness_limiter_amount", PropertyInfo(Variant::FLOAT, "rendering/quality/screen_filters/screen_space_roughness_limiter_amount", PROPERTY_HINT_RANGE, "0.01,4.0,0.01")); - ProjectSettings::get_singleton()->set_custom_property_info("rendering/quality/screen_filters/screen_space_roughness_limiter_limit", PropertyInfo(Variant::FLOAT, "rendering/quality/screen_filters/screen_space_roughness_limiter_limit", PROPERTY_HINT_RANGE, "0.01,1.0,0.01")); - - GLOBAL_DEF("rendering/quality/glow/upscale_mode", 1); - ProjectSettings::get_singleton()->set_custom_property_info("rendering/quality/glow/upscale_mode", PropertyInfo(Variant::INT, "rendering/quality/glow/upscale_mode", PROPERTY_HINT_ENUM, "Linear (Fast),Bicubic (Slow)")); - GLOBAL_DEF("rendering/quality/glow/upscale_mode.mobile", 0); - GLOBAL_DEF("rendering/quality/glow/use_high_quality", false); - - GLOBAL_DEF("rendering/quality/screen_space_reflection/roughness_quality", 1); - ProjectSettings::get_singleton()->set_custom_property_info("rendering/quality/screen_space_reflection/roughness_quality", PropertyInfo(Variant::INT, "rendering/quality/screen_space_reflection/roughness_quality", PROPERTY_HINT_ENUM, "Disabled (Fastest),Low (Fast),Medium (Average),High (Slow)")); - - GLOBAL_DEF("rendering/quality/subsurface_scattering/subsurface_scattering_quality", 1); - ProjectSettings::get_singleton()->set_custom_property_info("rendering/quality/subsurface_scattering/subsurface_scattering_quality", PropertyInfo(Variant::INT, "rendering/quality/subsurface_scattering/subsurface_scattering_quality", PROPERTY_HINT_ENUM, "Disabled (Fastest),Low (Fast),Medium (Average),High (Slow)")); - GLOBAL_DEF("rendering/quality/subsurface_scattering/subsurface_scattering_scale", 0.05); - ProjectSettings::get_singleton()->set_custom_property_info("rendering/quality/subsurface_scattering/subsurface_scattering_scale", PropertyInfo(Variant::FLOAT, "rendering/quality/subsurface_scattering/subsurface_scattering_scale", PROPERTY_HINT_RANGE, "0.001,1,0.001")); - GLOBAL_DEF("rendering/quality/subsurface_scattering/subsurface_scattering_depth_scale", 0.01); - ProjectSettings::get_singleton()->set_custom_property_info("rendering/quality/subsurface_scattering/subsurface_scattering_depth_scale", PropertyInfo(Variant::FLOAT, "rendering/quality/subsurface_scattering/subsurface_scattering_depth_scale", PROPERTY_HINT_RANGE, "0.001,1,0.001")); - - GLOBAL_DEF("rendering/high_end/global_shader_variables_buffer_size", 65536); - - GLOBAL_DEF("rendering/lightmapper/probe_capture_update_speed", 15); - ProjectSettings::get_singleton()->set_custom_property_info("rendering/lightmapper/probe_capture_update_speed", PropertyInfo(Variant::FLOAT, "rendering/lightmapper/probe_capture_update_speed", PROPERTY_HINT_RANGE, "0.001,256,0.001")); - - GLOBAL_DEF("rendering/sdfgi/probe_ray_count", 1); - ProjectSettings::get_singleton()->set_custom_property_info("rendering/sdfgi/probe_ray_count", PropertyInfo(Variant::INT, "rendering/sdfgi/probe_ray_count", PROPERTY_HINT_ENUM, "8 (Fastest),16,32,64,96,128 (Slowest)")); - GLOBAL_DEF("rendering/sdfgi/frames_to_converge", 4); - ProjectSettings::get_singleton()->set_custom_property_info("rendering/sdfgi/frames_to_converge", PropertyInfo(Variant::INT, "rendering/sdfgi/frames_to_converge", PROPERTY_HINT_ENUM, "5 (Less Latency but Lower Quality),10,15,20,25,30 (More Latency but Higher Quality)")); - GLOBAL_DEF("rendering/sdfgi/frames_to_update_lights", 2); - ProjectSettings::get_singleton()->set_custom_property_info("rendering/sdfgi/frames_to_update_lights", PropertyInfo(Variant::INT, "rendering/sdfgi/frames_to_update_lights", PROPERTY_HINT_ENUM, "1 (Slower),2,4,8,16 (Faster)")); - - GLOBAL_DEF("rendering/volumetric_fog/volume_size", 64); - ProjectSettings::get_singleton()->set_custom_property_info("rendering/volumetric_fog/volume_size", PropertyInfo(Variant::INT, "rendering/volumetric_fog/volume_size", PROPERTY_HINT_RANGE, "16,512,1")); - GLOBAL_DEF("rendering/volumetric_fog/volume_depth", 128); - ProjectSettings::get_singleton()->set_custom_property_info("rendering/volumetric_fog/volume_depth", PropertyInfo(Variant::INT, "rendering/volumetric_fog/volume_depth", PROPERTY_HINT_RANGE, "16,512,1")); - GLOBAL_DEF("rendering/volumetric_fog/use_filter", 1); - ProjectSettings::get_singleton()->set_custom_property_info("rendering/volumetric_fog/use_filter", PropertyInfo(Variant::INT, "rendering/volumetric_fog/use_filter", PROPERTY_HINT_ENUM, "No (Faster),Yes (Higher Quality)")); - - GLOBAL_DEF("rendering/spatial_indexer/update_iterations_per_frame", 10); - ProjectSettings::get_singleton()->set_custom_property_info("rendering/spatial_indexer/update_iterations_per_frame", PropertyInfo(Variant::INT, "rendering/spatial_indexer/update_iterations_per_frame", PROPERTY_HINT_RANGE, "0,1024,1")); - GLOBAL_DEF("rendering/spatial_indexer/threaded_cull_minimum_instances", 1000); - ProjectSettings::get_singleton()->set_custom_property_info("rendering/spatial_indexer/threaded_cull_minimum_instances", PropertyInfo(Variant::INT, "rendering/spatial_indexer/threaded_cull_minimum_instances", PROPERTY_HINT_RANGE, "32,65536,1")); - GLOBAL_DEF("rendering/forward_renderer/threaded_render_minimum_instances", 500); - ProjectSettings::get_singleton()->set_custom_property_info("rendering/forward_renderer/threaded_render_minimum_instances", PropertyInfo(Variant::INT, "rendering/forward_renderer/threaded_render_minimum_instances", PROPERTY_HINT_RANGE, "32,65536,1")); - - GLOBAL_DEF("rendering/cluster_builder/max_clustered_elements", 512); - ProjectSettings::get_singleton()->set_custom_property_info("rendering/cluster_builder/max_clustered_elements", PropertyInfo(Variant::FLOAT, "rendering/cluster_builder/max_clustered_elements", PROPERTY_HINT_RANGE, "32,8192,1")); + GLOBAL_DEF("rendering/shadows/directional_shadow/size", 4096); + GLOBAL_DEF("rendering/shadows/directional_shadow/size.mobile", 2048); + ProjectSettings::get_singleton()->set_custom_property_info("rendering/shadows/directional_shadow/size", PropertyInfo(Variant::INT, "rendering/shadows/directional_shadow/size", PROPERTY_HINT_RANGE, "256,16384")); + GLOBAL_DEF("rendering/shadows/directional_shadow/soft_shadow_quality", 2); + GLOBAL_DEF("rendering/shadows/directional_shadow/soft_shadow_quality.mobile", 0); + ProjectSettings::get_singleton()->set_custom_property_info("rendering/shadows/directional_shadow/soft_shadow_quality", PropertyInfo(Variant::INT, "rendering/shadows/directional_shadow/soft_shadow_quality", PROPERTY_HINT_ENUM, "Hard (Fastest),Soft Low (Fast),Soft Medium (Average),Soft High (Slow),Soft Ultra (Slowest)")); + GLOBAL_DEF("rendering/shadows/directional_shadow/16_bits", true); + + GLOBAL_DEF("rendering/shadows/shadows/soft_shadow_quality", 2); + GLOBAL_DEF("rendering/shadows/shadows/soft_shadow_quality.mobile", 0); + ProjectSettings::get_singleton()->set_custom_property_info("rendering/shadows/shadows/soft_shadow_quality", PropertyInfo(Variant::INT, "rendering/shadows/shadows/soft_shadow_quality", PROPERTY_HINT_ENUM, "Hard (Fastest),Soft Low (Fast),Soft Medium (Average),Soft High (Slow),Soft Ultra (Slowest)")); + + GLOBAL_DEF("rendering/2d/shadow_atlas/size", 2048); + + GLOBAL_DEF("rendering/driver/rd_renderer/use_low_end_renderer", false); + GLOBAL_DEF("rendering/driver/rd_renderer/use_low_end_renderer.mobile", true); + + GLOBAL_DEF("rendering/reflections/sky_reflections/roughness_layers", 8); + GLOBAL_DEF("rendering/reflections/sky_reflections/texture_array_reflections", true); + GLOBAL_DEF("rendering/reflections/sky_reflections/texture_array_reflections.mobile", false); + GLOBAL_DEF("rendering/reflections/sky_reflections/ggx_samples", 1024); + GLOBAL_DEF("rendering/reflections/sky_reflections/ggx_samples.mobile", 128); + GLOBAL_DEF("rendering/reflections/sky_reflections/fast_filter_high_quality", false); + GLOBAL_DEF("rendering/reflections/reflection_atlas/reflection_size", 256); + GLOBAL_DEF("rendering/reflections/reflection_atlas/reflection_size.mobile", 128); + GLOBAL_DEF("rendering/reflections/reflection_atlas/reflection_count", 64); + + GLOBAL_DEF("rendering/global_illumination/gi/use_half_resolution", false); + + GLOBAL_DEF("rendering/global_illumination/gi_probes/anisotropic", false); + GLOBAL_DEF("rendering/global_illumination/gi_probes/quality", 1); + ProjectSettings::get_singleton()->set_custom_property_info("rendering/global_illumination/gi_probes/quality", PropertyInfo(Variant::INT, "rendering/global_illumination/gi_probes/quality", PROPERTY_HINT_ENUM, "Low (4 Cones - Fast),High (6 Cones - Slow)")); + + GLOBAL_DEF("rendering/shading/overrides/force_vertex_shading", false); + GLOBAL_DEF("rendering/shading/overrides/force_vertex_shading.mobile", true); + GLOBAL_DEF("rendering/shading/overrides/force_lambert_over_burley", false); + GLOBAL_DEF("rendering/shading/overrides/force_lambert_over_burley.mobile", true); + GLOBAL_DEF("rendering/shading/overrides/force_blinn_over_ggx", false); + GLOBAL_DEF("rendering/shading/overrides/force_blinn_over_ggx.mobile", true); + + GLOBAL_DEF("rendering/driver/depth_prepass/enable", true); + GLOBAL_DEF("rendering/driver/depth_prepass/disable_for_vendors", "PowerVR,Mali,Adreno,Apple"); + + GLOBAL_DEF("rendering/textures/default_filters/use_nearest_mipmap_filter", false); + GLOBAL_DEF("rendering/textures/default_filters/anisotropic_filtering_level", 2); + ProjectSettings::get_singleton()->set_custom_property_info("rendering/textures/default_filters/anisotropic_filtering_level", PropertyInfo(Variant::INT, "rendering/textures/default_filters/anisotropic_filtering_level", PROPERTY_HINT_ENUM, "Disabled (Fastest),2x (Faster),4x (Fast),8x (Average),16x (Slow)")); + + GLOBAL_DEF("rendering/camera/depth_of_field/depth_of_field_bokeh_shape", 1); + ProjectSettings::get_singleton()->set_custom_property_info("rendering/camera/depth_of_field/depth_of_field_bokeh_shape", PropertyInfo(Variant::INT, "rendering/camera/depth_of_field/depth_of_field_bokeh_shape", PROPERTY_HINT_ENUM, "Box (Fast),Hexagon (Average),Circle (Slow)")); + GLOBAL_DEF("rendering/camera/depth_of_field/depth_of_field_bokeh_quality", 2); + ProjectSettings::get_singleton()->set_custom_property_info("rendering/camera/depth_of_field/depth_of_field_bokeh_quality", PropertyInfo(Variant::INT, "rendering/camera/depth_of_field/depth_of_field_bokeh_quality", PROPERTY_HINT_ENUM, "Very Low (Fastest),Low (Fast),Medium (Average),High (Slow)")); + GLOBAL_DEF("rendering/camera/depth_of_field/depth_of_field_use_jitter", false); + + GLOBAL_DEF("rendering/environment/ssao/quality", 2); + ProjectSettings::get_singleton()->set_custom_property_info("rendering/environment/ssao/quality", PropertyInfo(Variant::INT, "rendering/environment/ssao/quality", PROPERTY_HINT_ENUM, "Very Low (Fast),Low (Fast),Medium (Average),High (Slow),Ultra (Custom)")); + GLOBAL_DEF("rendering/environment/ssao/half_size", false); + GLOBAL_DEF("rendering/environment/ssao/half_size.mobile", true); + GLOBAL_DEF("rendering/environment/ssao/adaptive_target", 0.5); + ProjectSettings::get_singleton()->set_custom_property_info("rendering/environment/ssao/adaptive_target", PropertyInfo(Variant::FLOAT, "rendering/environment/ssao/adaptive_target", PROPERTY_HINT_RANGE, "0.0,1.0,0.01")); + GLOBAL_DEF("rendering/environment/ssao/blur_passes", 2); + ProjectSettings::get_singleton()->set_custom_property_info("rendering/environment/ssao/blur_passes", PropertyInfo(Variant::INT, "rendering/environment/ssao/blur_passes", PROPERTY_HINT_RANGE, "0,6")); + GLOBAL_DEF("rendering/environment/ssao/fadeout_from", 50.0); + ProjectSettings::get_singleton()->set_custom_property_info("rendering/environment/ssao/fadeout_from", PropertyInfo(Variant::FLOAT, "rendering/environment/ssao/fadeout_from", PROPERTY_HINT_RANGE, "0.0,512,0.1,or_greater")); + GLOBAL_DEF("rendering/environment/ssao/fadeout_to", 300.0); + ProjectSettings::get_singleton()->set_custom_property_info("rendering/environment/ssao/fadeout_to", PropertyInfo(Variant::FLOAT, "rendering/environment/ssao/fadeout_to", PROPERTY_HINT_RANGE, "64,65536,0.1,or_greater")); + + GLOBAL_DEF("rendering/anti_aliasing/screen_space_roughness_limiter/enabled", true); + GLOBAL_DEF("rendering/anti_aliasing/screen_space_roughness_limiter/amount", 0.25); + GLOBAL_DEF("rendering/anti_aliasing/screen_space_roughness_limiter/limit", 0.18); + ProjectSettings::get_singleton()->set_custom_property_info("rendering/anti_aliasing/screen_space_roughness_limiter/amount", PropertyInfo(Variant::FLOAT, "rendering/anti_aliasing/screen_space_roughness_limiter/amount", PROPERTY_HINT_RANGE, "0.01,4.0,0.01")); + ProjectSettings::get_singleton()->set_custom_property_info("rendering/anti_aliasing/screen_space_roughness_limiter/limit", PropertyInfo(Variant::FLOAT, "rendering/anti_aliasing/screen_space_roughness_limiter/limit", PROPERTY_HINT_RANGE, "0.01,1.0,0.01")); + + GLOBAL_DEF("rendering/environment/glow/upscale_mode", 1); + ProjectSettings::get_singleton()->set_custom_property_info("rendering/environment/glow/upscale_mode", PropertyInfo(Variant::INT, "rendering/environment/glow/upscale_mode", PROPERTY_HINT_ENUM, "Linear (Fast),Bicubic (Slow)")); + GLOBAL_DEF("rendering/environment/glow/upscale_mode.mobile", 0); + GLOBAL_DEF("rendering/environment/glow/use_high_quality", false); + + GLOBAL_DEF("rendering/environment/screen_space_reflection/roughness_quality", 1); + ProjectSettings::get_singleton()->set_custom_property_info("rendering/environment/screen_space_reflection/roughness_quality", PropertyInfo(Variant::INT, "rendering/environment/screen_space_reflection/roughness_quality", PROPERTY_HINT_ENUM, "Disabled (Fastest),Low (Fast),Medium (Average),High (Slow)")); + + GLOBAL_DEF("rendering/environment/subsurface_scattering/subsurface_scattering_quality", 1); + ProjectSettings::get_singleton()->set_custom_property_info("rendering/environment/subsurface_scattering/subsurface_scattering_quality", PropertyInfo(Variant::INT, "rendering/environment/subsurface_scattering/subsurface_scattering_quality", PROPERTY_HINT_ENUM, "Disabled (Fastest),Low (Fast),Medium (Average),High (Slow)")); + GLOBAL_DEF("rendering/environment/subsurface_scattering/subsurface_scattering_scale", 0.05); + ProjectSettings::get_singleton()->set_custom_property_info("rendering/environment/subsurface_scattering/subsurface_scattering_scale", PropertyInfo(Variant::FLOAT, "rendering/environment/subsurface_scattering/subsurface_scattering_scale", PROPERTY_HINT_RANGE, "0.001,1,0.001")); + GLOBAL_DEF("rendering/environment/subsurface_scattering/subsurface_scattering_depth_scale", 0.01); + ProjectSettings::get_singleton()->set_custom_property_info("rendering/environment/subsurface_scattering/subsurface_scattering_depth_scale", PropertyInfo(Variant::FLOAT, "rendering/environment/subsurface_scattering/subsurface_scattering_depth_scale", PROPERTY_HINT_RANGE, "0.001,1,0.001")); + + GLOBAL_DEF("rendering/limits/global_shader_variables/buffer_size", 65536); + + GLOBAL_DEF("rendering/lightmapping/probe_capture/update_speed", 15); + ProjectSettings::get_singleton()->set_custom_property_info("rendering/lightmapping/probe_capture/update_speed", PropertyInfo(Variant::FLOAT, "rendering/lightmapping/probe_capture/update_speed", PROPERTY_HINT_RANGE, "0.001,256,0.001")); + + GLOBAL_DEF("rendering/global_illumination/sdfgi/probe_ray_count", 1); + ProjectSettings::get_singleton()->set_custom_property_info("rendering/global_illumination/sdfgi/probe_ray_count", PropertyInfo(Variant::INT, "rendering/global_illumination/sdfgi/probe_ray_count", PROPERTY_HINT_ENUM, "8 (Fastest),16,32,64,96,128 (Slowest)")); + GLOBAL_DEF("rendering/global_illumination/sdfgi/frames_to_converge", 4); + ProjectSettings::get_singleton()->set_custom_property_info("rendering/global_illumination/sdfgi/frames_to_converge", PropertyInfo(Variant::INT, "rendering/global_illumination/sdfgi/frames_to_converge", PROPERTY_HINT_ENUM, "5 (Less Latency but Lower Quality),10,15,20,25,30 (More Latency but Higher Quality)")); + GLOBAL_DEF("rendering/global_illumination/sdfgi/frames_to_update_lights", 2); + ProjectSettings::get_singleton()->set_custom_property_info("rendering/global_illumination/sdfgi/frames_to_update_lights", PropertyInfo(Variant::INT, "rendering/global_illumination/sdfgi/frames_to_update_lights", PROPERTY_HINT_ENUM, "1 (Slower),2,4,8,16 (Faster)")); + + GLOBAL_DEF("rendering/environment/volumetric_fog/volume_size", 64); + ProjectSettings::get_singleton()->set_custom_property_info("rendering/environment/volumetric_fog/volume_size", PropertyInfo(Variant::INT, "rendering/environment/volumetric_fog/volume_size", PROPERTY_HINT_RANGE, "16,512,1")); + GLOBAL_DEF("rendering/environment/volumetric_fog/volume_depth", 128); + ProjectSettings::get_singleton()->set_custom_property_info("rendering/environment/volumetric_fog/volume_depth", PropertyInfo(Variant::INT, "rendering/environment/volumetric_fog/volume_depth", PROPERTY_HINT_RANGE, "16,512,1")); + GLOBAL_DEF("rendering/environment/volumetric_fog/use_filter", 1); + ProjectSettings::get_singleton()->set_custom_property_info("rendering/environment/volumetric_fog/use_filter", PropertyInfo(Variant::INT, "rendering/environment/volumetric_fog/use_filter", PROPERTY_HINT_ENUM, "No (Faster),Yes (Higher Quality)")); + + GLOBAL_DEF("rendering/limits/spatial_indexer/update_iterations_per_frame", 10); + ProjectSettings::get_singleton()->set_custom_property_info("rendering/limits/spatial_indexer/update_iterations_per_frame", PropertyInfo(Variant::INT, "rendering/limits/spatial_indexer/update_iterations_per_frame", PROPERTY_HINT_RANGE, "0,1024,1")); + GLOBAL_DEF("rendering/limits/spatial_indexer/threaded_cull_minimum_instances", 1000); + ProjectSettings::get_singleton()->set_custom_property_info("rendering/limits/spatial_indexer/threaded_cull_minimum_instances", PropertyInfo(Variant::INT, "rendering/limits/spatial_indexer/threaded_cull_minimum_instances", PROPERTY_HINT_RANGE, "32,65536,1")); + GLOBAL_DEF("rendering/limits/forward_renderer/threaded_render_minimum_instances", 500); + ProjectSettings::get_singleton()->set_custom_property_info("rendering/limits/forward_renderer/threaded_render_minimum_instances", PropertyInfo(Variant::INT, "rendering/limits/forward_renderer/threaded_render_minimum_instances", PROPERTY_HINT_RANGE, "32,65536,1")); + + GLOBAL_DEF("rendering/limits/cluster_builder/max_clustered_elements", 512); + ProjectSettings::get_singleton()->set_custom_property_info("rendering/limits/cluster_builder/max_clustered_elements", PropertyInfo(Variant::FLOAT, "rendering/limits/cluster_builder/max_clustered_elements", PROPERTY_HINT_RANGE, "32,8192,1")); } RenderingServer::~RenderingServer() { |