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

Expose 'Reimport' on right-click context menu in the FileSystem panel

This commit is contained in:
Nong Van Tinh
2023-03-20 14:47:41 +07:00
parent 4d5f10fc3a
commit f40a5fc3f6
3 changed files with 48 additions and 7 deletions

View File

@@ -316,6 +316,21 @@ void ImportDock::set_edit_multiple_paths(const Vector<String> &p_paths) {
}
}
void ImportDock::reimport_resources(const Vector<String> &p_paths) {
switch (p_paths.size()) {
case 0:
ERR_FAIL_MSG("You need to select files to reimport them.");
case 1:
set_edit_path(p_paths[0]);
break;
default:
set_edit_multiple_paths(p_paths);
break;
}
_reimport_attempt();
}
void ImportDock::_update_preset_menu() {
preset->get_popup()->clear();