From 4d0097e8aebca452637e6aec293ea3254d6f5eca Mon Sep 17 00:00:00 2001 From: volzhs Date: Mon, 1 Jan 2018 02:35:46 +0900 Subject: [PATCH] Copy resource with specific extension Fix #15169 --- editor/editor_node.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp index 24a737e4af9..e082206625c 100644 --- a/editor/editor_node.cpp +++ b/editor/editor_node.cpp @@ -4405,10 +4405,11 @@ void EditorNode::_dropped_files(const Vector &p_files, int p_screen) { String to_path = ProjectSettings::get_singleton()->globalize_path(get_filesystem_dock()->get_current_path()); DirAccessRef dir = DirAccess::create(DirAccess::ACCESS_FILESYSTEM); + Vector just_copy = String("ttf,otf").split(","); for (int i = 0; i < p_files.size(); i++) { String from = p_files[i]; - if (!ResourceFormatImporter::get_singleton()->can_be_imported(from)) { + if (!ResourceFormatImporter::get_singleton()->can_be_imported(from) && (just_copy.find(from.get_extension().to_lower()) < 0)) { continue; } String to = to_path.plus_file(from.get_file());