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

@ -2076,10 +2076,10 @@ void RenderingServer::fix_surface_compatibility(SurfaceData &p_surface, const St
}
if (warn_on_surface_upgrade) {
if (p_path.is_empty()) {
WARN_PRINT("A surface uses an old surface format and needs to be upgraded. The upgrade happens automatically at load time every time until the mesh is saved again or re-imported. Once saved (or re-imported), this mesh will be incompatible with earlier versions of Godot.");
} else {
WARN_PRINT("A surface of " + p_path + " uses an old surface format and needs to be upgraded. The upgrade happens automatically at load time every time until the mesh is saved again or re-imported. Once saved (or re-imported), this mesh will be incompatible with earlier versions of Godot.");
WARN_PRINT_ONCE_ED("At least one surface uses an old surface format and needs to be upgraded. The upgrade happens automatically at load time every time until the mesh is saved again or re-imported. Once saved (or re-imported), this mesh will be incompatible with earlier versions of Godot.");
if (!p_path.is_empty()) {
WARN_PRINT("A surface of " + p_path + " uses an old surface format and needs to be upgraded.");
}
}
#endif