ResourceImporter: Restore default append logic for new importers
This was changed in #56943 to allow adding new importers from plugins that take precedence over built-in ones, but this should be opt-in, not the default behavior. Fixes #57730.
This commit is contained in:
parent
863f2840a5
commit
ec00283f91
7 changed files with 40 additions and 21 deletions
|
|
@ -464,7 +464,11 @@ void ResourceImporter::_bind_methods() {
|
|||
BIND_ENUM_CONSTANT(IMPORT_ORDER_SCENE);
|
||||
}
|
||||
|
||||
void ResourceFormatImporter::add_importer(const Ref<ResourceImporter> &p_importer) {
|
||||
void ResourceFormatImporter::add_importer(const Ref<ResourceImporter> &p_importer, bool p_first_priority) {
|
||||
ERR_FAIL_COND(p_importer.is_null());
|
||||
importers.insert(0, p_importer);
|
||||
if (p_first_priority) {
|
||||
importers.insert(0, p_importer);
|
||||
} else {
|
||||
importers.push_back(p_importer);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -80,7 +80,7 @@ public:
|
|||
String get_internal_resource_path(const String &p_path) const;
|
||||
void get_internal_resource_path_list(const String &p_path, List<String> *r_paths);
|
||||
|
||||
void add_importer(const Ref<ResourceImporter> &p_importer);
|
||||
void add_importer(const Ref<ResourceImporter> &p_importer, bool p_first_priority = false);
|
||||
|
||||
void remove_importer(const Ref<ResourceImporter> &p_importer) { importers.erase(p_importer); }
|
||||
Ref<ResourceImporter> get_importer_by_name(const String &p_name) const;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue