More threading in AssetLib
AssetLib now uses thread as requested to download previews and items
(cherry picked from commit 3a25415a1c
)
This commit is contained in:
parent
3e1716b2c3
commit
89bff17cd2
1 changed files with 2 additions and 0 deletions
|
@ -514,6 +514,7 @@ EditorAssetLibraryItemDownload::EditorAssetLibraryItemDownload() {
|
||||||
download = memnew(HTTPRequest);
|
download = memnew(HTTPRequest);
|
||||||
add_child(download);
|
add_child(download);
|
||||||
download->connect("request_completed", this, "_http_download_completed");
|
download->connect("request_completed", this, "_http_download_completed");
|
||||||
|
download->set_use_threads(EDITOR_DEF("asset_library/use_threads", true));
|
||||||
|
|
||||||
download_error = memnew(AcceptDialog);
|
download_error = memnew(AcceptDialog);
|
||||||
add_child(download_error);
|
add_child(download_error);
|
||||||
|
@ -832,6 +833,7 @@ void EditorAssetLibrary::_request_image(ObjectID p_for, String p_image_url, Imag
|
||||||
iq.image_index = p_image_index;
|
iq.image_index = p_image_index;
|
||||||
iq.image_type = p_type;
|
iq.image_type = p_type;
|
||||||
iq.request = memnew(HTTPRequest);
|
iq.request = memnew(HTTPRequest);
|
||||||
|
iq.request->set_use_threads(EDITOR_DEF("asset_library/use_threads", true));
|
||||||
|
|
||||||
iq.target = p_for;
|
iq.target = p_for;
|
||||||
iq.queue_id = ++last_queue_id;
|
iq.queue_id = ++last_queue_id;
|
||||||
|
|
Loading…
Reference in a new issue