summaryrefslogtreecommitdiff
path: root/editor/plugins/node_3d_editor_plugin.cpp
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2022-11-02 14:16:00 +0100
committerRémi Verschelde <rverschelde@gmail.com>2022-11-02 14:16:00 +0100
commit50f742e1caa4d0241b04891a468b2fde2def7bfa (patch)
tree329ffc5436ac7413acdacc37da110faf48768a9c /editor/plugins/node_3d_editor_plugin.cpp
parentdf26d11b5d833666a3606dece41fb9cde16c197c (diff)
parent07e367cb0b07f02fef92420fde53e05be3d4b247 (diff)
Merge pull request #68107 from alfredbaudisch/drag-lower-case
Cast dragged file name extension to lowercase
Diffstat (limited to 'editor/plugins/node_3d_editor_plugin.cpp')
-rw-r--r--editor/plugins/node_3d_editor_plugin.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/editor/plugins/node_3d_editor_plugin.cpp b/editor/plugins/node_3d_editor_plugin.cpp
index 3923d25734..6a9568b2a2 100644
--- a/editor/plugins/node_3d_editor_plugin.cpp
+++ b/editor/plugins/node_3d_editor_plugin.cpp
@@ -4150,11 +4150,13 @@ bool Node3DEditorViewport::can_drop_data_fw(const Point2 &p_point, const Variant
ResourceLoader::get_recognized_extensions_for_type("Texture", &texture_extensions);
for (int i = 0; i < files.size(); i++) {
+ String extension = files[i].get_extension().to_lower();
+
// Check if dragged files with mesh or scene extension can be created at least once.
- if (mesh_extensions.find(files[i].get_extension()) ||
- scene_extensions.find(files[i].get_extension()) ||
- material_extensions.find(files[i].get_extension()) ||
- texture_extensions.find(files[i].get_extension())) {
+ if (mesh_extensions.find(extension) ||
+ scene_extensions.find(extension) ||
+ material_extensions.find(extension) ||
+ texture_extensions.find(extension)) {
Ref<Resource> res = ResourceLoader::load(files[i]);
if (res.is_null()) {
continue;