1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-10 13:00:37 +00:00

Overhaul the SurfaceUpgradeTool

This defers the update to a fresh restart of the editor (to ensure we aren't mid way through loading scenes anymore.

It also ensures that the popup can't be used by multiple threads at once

Co-authored-by: Yuri Sizov <yuris@humnom.net>
This commit is contained in:
clayjohn
2023-10-30 15:34:18 +01:00
parent 6afd320984
commit be386e1876
5 changed files with 157 additions and 37 deletions

View File

@@ -157,6 +157,7 @@ public:
private:
friend class EditorSceneTabs;
friend class SurfaceUpgradeTool;
enum MenuOptions {
FILE_NEW_SCENE,
@@ -459,6 +460,8 @@ private:
bool opening_prev = false;
bool restoring_scenes = false;
bool unsaved_cache = true;
bool requested_first_scan = false;
bool waiting_for_first_scan = true;
int current_menu_option = 0;
@@ -493,6 +496,7 @@ private:
HashMap<String, Ref<Texture2D>> icon_type_cache;
SurfaceUpgradeTool *surface_upgrade_tool = nullptr;
bool run_surface_upgrade_tool = false;
static EditorBuildCallback build_callbacks[MAX_BUILD_CALLBACKS];
static EditorPluginInitializeCallback plugin_init_callbacks[MAX_INIT_CALLBACKS];