From 7a0710f91ad3bcaef2c9a9269da5f4813bea95a3 Mon Sep 17 00:00:00 2001 From: Fabio Alessandrelli Date: Wed, 14 Oct 2020 12:40:18 +0200 Subject: [PATCH] EditorNode now copies all drag and dropped files. The editor used to only copy drag-dropped files in the File System pane if the given file was a valid resource, or had a specific file format (ttf, otf). With this PR, all drag and dropped files are copied instead, no matter their extension. (cherry picked from commit 410b324740efa8640e1cb79c7c1a7801636798b3) --- editor/editor_node.cpp | 4 ---- 1 file changed, 4 deletions(-) diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp index 1df5f736b6..ac98a8e698 100644 --- a/editor/editor_node.cpp +++ b/editor/editor_node.cpp @@ -5268,7 +5268,6 @@ void EditorNode::_dropped_files(const Vector &p_files, int p_screen) { void EditorNode::_add_dropped_files_recursive(const Vector &p_files, String to_path) { DirAccessRef dir = DirAccess::create(DirAccess::ACCESS_FILESYSTEM); - Vector just_copy = String("ttf,otf").split(","); for (int i = 0; i < p_files.size(); i++) { @@ -5301,9 +5300,6 @@ void EditorNode::_add_dropped_files_recursive(const Vector &p_files, Str continue; } - if (!ResourceFormatImporter::get_singleton()->can_be_imported(from) && (just_copy.find(from.get_extension().to_lower()) == -1)) { - continue; - } dir->copy(from, to); } }