From f40a5fc3f6bd7df17dd4d426b46a364c85a6330a Mon Sep 17 00:00:00 2001 From: Nong Van Tinh Date: Mon, 20 Mar 2023 14:47:41 +0700 Subject: Expose 'Reimport' on right-click context menu in the FileSystem panel --- editor/import_dock.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'editor/import_dock.cpp') diff --git a/editor/import_dock.cpp b/editor/import_dock.cpp index b5680f2f2c..824a65c443 100644 --- a/editor/import_dock.cpp +++ b/editor/import_dock.cpp @@ -316,6 +316,21 @@ void ImportDock::set_edit_multiple_paths(const Vector &p_paths) { } } +void ImportDock::reimport_resources(const Vector &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(); -- cgit v1.2.3