@@ -76,6 +76,7 @@ void SurfaceUpgradeTool::_try_show_popup() {
7676 } else {
7777 singleton->_show_popup ();
7878 }
79+ RS::get_singleton ()->set_warn_on_surface_upgrade (false );
7980}
8081
8182void SurfaceUpgradeTool::_show_popup () {
@@ -122,11 +123,13 @@ void SurfaceUpgradeTool::finish_upgrade() {
122123
123124 // Update all meshes here.
124125 Vector<String> resave_paths = EditorSettings::get_singleton ()->get_project_metadata (" surface_upgrade_tool" , " resave_paths" , Vector<String>());
125- EditorProgress ep (" surface_upgrade_resave" , TTR (" Upgrading All Meshes in Project" ), resave_paths.size ());
126+ Vector<String> reimport_paths = EditorSettings::get_singleton ()->get_project_metadata (" surface_upgrade_tool" , " reimport_paths" , Vector<String>());
127+ EditorProgress ep (" surface_upgrade_resave" , TTR (" Upgrading All Meshes in Project" ), resave_paths.size () + reimport_paths.size ());
126128
129+ int step = 0 ;
127130 for (const String &file_path : resave_paths) {
128131 Ref<Resource> res = ResourceLoader::load (file_path);
129- ep.step (TTR (" Attempting to re-save " ) + file_path);
132+ ep.step (TTR (" Attempting to re-save " ) + file_path, step++ );
130133 if (res.is_valid ()) {
131134 // Ignore things that fail to load.
132135 ResourceSaver::save (res);
@@ -135,7 +138,6 @@ void SurfaceUpgradeTool::finish_upgrade() {
135138 EditorSettings::get_singleton ()->set_project_metadata (" surface_upgrade_tool" , " resave_paths" , Vector<String>());
136139
137140 // Remove the imported scenes/meshes from .import so they will be reimported automatically after this.
138- Vector<String> reimport_paths = EditorSettings::get_singleton ()->get_project_metadata (" surface_upgrade_tool" , " reimport_paths" , Vector<String>());
139141 for (const String &file_path : reimport_paths) {
140142 Ref<ConfigFile> config;
141143 config.instantiate ();
@@ -150,6 +152,8 @@ void SurfaceUpgradeTool::finish_upgrade() {
150152 continue ;
151153 }
152154
155+ ep.step (TTR (" Attempting to remove " ) + remap_path, step++);
156+
153157 String path = OS::get_singleton ()->get_resource_dir () + remap_path.replace_first (" res://" , " /" );
154158 print_verbose (" Moving to trash: " + path);
155159 err = OS::get_singleton ()->move_to_trash (path);
0 commit comments