You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-12 13:20:55 +00:00
Rework the surface upgrade tool to inform users without blocking
This removes the immediate confirmation dialog and insteads prints the message to the editor log (and it also appears as a toast). The immediate dialog is a devil's plaything, and it cannot be used in this scenario (if it can be used anywhere at all). The condition that triggers the SUT can happen during any attempt by the rendering server to read a mesh. This means it will conflict with a number of editor processes, like loading, importing, preview generation, export, CLI mode, etc. So while this is less on the nose as far as informing users goes, it's also our best option to use the log and the toaster.
This commit is contained in:
@@ -1047,11 +1047,6 @@ void EditorNode::_sources_changed(bool p_exist) {
|
||||
// loading textures, as they are now properly imported.
|
||||
RenderingServer::get_singleton()->global_shader_parameters_load_settings(true);
|
||||
|
||||
// Start preview thread now that it's safe.
|
||||
if (!singleton->cmdline_export_mode) {
|
||||
EditorResourcePreview::get_singleton()->start();
|
||||
}
|
||||
|
||||
_load_editor_layout();
|
||||
|
||||
if (!defer_load_scene.is_empty()) {
|
||||
@@ -1066,6 +1061,11 @@ void EditorNode::_sources_changed(bool p_exist) {
|
||||
if (SurfaceUpgradeTool::get_singleton()->is_show_requested()) {
|
||||
SurfaceUpgradeTool::get_singleton()->show_popup();
|
||||
}
|
||||
|
||||
// Start preview thread now that it's safe.
|
||||
if (!singleton->cmdline_export_mode) {
|
||||
EditorResourcePreview::get_singleton()->start();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3055,7 +3055,7 @@ void EditorNode::_tool_menu_option(int p_idx) {
|
||||
orphan_resources->show();
|
||||
} break;
|
||||
case TOOLS_SURFACE_UPGRADE: {
|
||||
surface_upgrade_dialog->popup_centered(Size2(750 * EDSCALE, 0));
|
||||
surface_upgrade_dialog->popup_on_demand();
|
||||
} break;
|
||||
case TOOLS_CUSTOM: {
|
||||
if (tool_menu->get_item_submenu(p_idx) == "") {
|
||||
|
||||
Reference in New Issue
Block a user