diff options
| author | Juan Linietsky | 2017-02-01 20:41:05 -0300 |
|---|---|---|
| committer | Juan Linietsky | 2017-02-01 20:41:05 -0300 |
| commit | b3aebcf6dfa72dcb4a151b7b17c52ecd0ec5d6f7 (patch) | |
| tree | f04f40d4489b3b32713171a9faa39add0f5bd72e /core/io/resource_import.cpp | |
| parent | 2cd2ca7bbc892eccc635b1c4aea80c956c9b92dc (diff) | |
| download | godot-b3aebcf6dfa72dcb4a151b7b17c52ecd0ec5d6f7.tar.gz godot-b3aebcf6dfa72dcb4a151b7b17c52ecd0ec5d6f7.tar.zst godot-b3aebcf6dfa72dcb4a151b7b17c52ecd0ec5d6f7.zip | |
CSV translation import plugin
Diffstat (limited to '')
| -rw-r--r-- | core/io/resource_import.cpp | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/core/io/resource_import.cpp b/core/io/resource_import.cpp index 18fd8d25e..d0799cdbe 100644 --- a/core/io/resource_import.cpp +++ b/core/io/resource_import.cpp @@ -109,7 +109,11 @@ void ResourceFormatImporter::get_recognized_extensions_for_type(const String& p_ Set<String> found; for (Set< Ref<ResourceImporter> >::Element *E=importers.front();E;E=E->next()) { - if (!ClassDB::is_parent_class(E->get()->get_resource_type(),p_type)) + String res_type = E->get()->get_resource_type(); + if (res_type==String()) + continue; + + if (!ClassDB::is_parent_class(res_type,p_type)) continue; List<String> local_exts; @@ -138,8 +142,11 @@ bool ResourceFormatImporter::can_be_imported(const String& p_path) const { bool ResourceFormatImporter::handles_type(const String& p_type) const { for (Set< Ref<ResourceImporter> >::Element *E=importers.front();E;E=E->next()) { - print_line("handles "+p_type+" base is "+E->get()->get_resource_type()); - if (ClassDB::is_parent_class(E->get()->get_resource_type(),p_type)) + + String res_type = E->get()->get_resource_type(); + if (res_type==String()) + continue; + if (ClassDB::is_parent_class(res_type,p_type)) return true; } |
