Move asset store repo list to the editor settings file and rename it
This commit is contained in:
@@ -244,7 +244,10 @@
|
||||
</method>
|
||||
</methods>
|
||||
<members>
|
||||
<member name="asset_library/use_threads" type="bool" setter="" getter="">
|
||||
<member name="asset_store/available_urls" type="Dictionary" setter="" getter="">
|
||||
A list of the available URLs that can be chosen in the Asset Store to fetch asset data. With the key being the name, and the value being the URL.
|
||||
</member>
|
||||
<member name="asset_store/use_threads" type="bool" setter="" getter="">
|
||||
If [code]true[/code], the Asset Store uses multiple threads for its HTTP requests. This prevents the Asset Store from blocking the main thread for every loaded asset.
|
||||
</member>
|
||||
<member name="debugger/auto_switch_to_remote_scene_tree" type="bool" setter="" getter="">
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
#include "scene/resources/style_box_flat.h"
|
||||
|
||||
static inline void setup_http_request(HTTPRequest *request) {
|
||||
request->set_use_threads(EDITOR_GET("asset_library/use_threads"));
|
||||
request->set_use_threads(EDITOR_GET("asset_store/use_threads"));
|
||||
|
||||
const String proxy_host = EDITOR_GET("network/http_proxy/host");
|
||||
const int proxy_port = EDITOR_GET("network/http_proxy/port");
|
||||
@@ -1106,10 +1106,7 @@ void EditorAssetLibrary::_notification(int p_what) {
|
||||
}
|
||||
|
||||
void EditorAssetLibrary::_update_repository_options() {
|
||||
// TODO: Move to editor_settings.cpp
|
||||
Dictionary default_urls;
|
||||
default_urls["godotengine.org (Official)"] = "https://store.godotengine.org/api/v1";
|
||||
Dictionary available_urls = _EDITOR_DEF("asset_library/available_urls", default_urls, true);
|
||||
Dictionary available_urls = EDITOR_GET("asset_store/available_urls");
|
||||
repository->clear();
|
||||
int i = 0;
|
||||
for (const KeyValue<Variant, Variant> &kv : available_urls) {
|
||||
|
||||
@@ -455,8 +455,13 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) {
|
||||
EDITOR_SETTING_USAGE(Variant::STRING, PROPERTY_HINT_ENUM, "interface/editor/localization/editor_language", "auto", lang_hint, PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED | PROPERTY_USAGE_EDITOR_BASIC_SETTING);
|
||||
}
|
||||
|
||||
// Asset store
|
||||
_initial_set("asset_library/use_threads", true);
|
||||
/* Asset Store */
|
||||
|
||||
_initial_set("asset_store/use_threads", true);
|
||||
|
||||
Dictionary default_urls;
|
||||
default_urls["godotengine.org (Official)"] = "https://store.godotengine.org/api/v1";
|
||||
_initial_set("asset_store/available_urls", default_urls, true);
|
||||
|
||||
/* Interface */
|
||||
|
||||
@@ -1273,6 +1278,7 @@ void EditorSettings::_handle_setting_compatibility() {
|
||||
erase("run/output/always_close_output_on_stop");
|
||||
erase("text_editor/theme/line_spacing"); // See GH-106137.
|
||||
erase("interface/editors/show_scene_tree_root_selection");
|
||||
erase("asset_library/available_urls"); // Workaround bugged settings treating the previous default as a modified value (see GH-118755).
|
||||
|
||||
// Handle renamed settings.
|
||||
_rename_setting("interface/editor/editor_language", "interface/editor/localization/editor_language");
|
||||
@@ -1319,6 +1325,7 @@ void EditorSettings::_handle_setting_compatibility() {
|
||||
_rename_setting("interface/editor/vsync_mode", "interface/editor/display/vsync_mode");
|
||||
_rename_setting("interface/editor/update_continuously", "interface/editor/display/update_continuously");
|
||||
_rename_setting("interface/editor/collapse_main_menu", "interface/editor/appearance/collapse_main_menu");
|
||||
_rename_setting("asset_library/use_threads", "asset_store/use_threads");
|
||||
}
|
||||
|
||||
void EditorSettings::_rename_setting(const String &p_old_name, const String &p_new_name) {
|
||||
|
||||
Reference in New Issue
Block a user