Merge pull request #97363 from reduz/deterministic-gen-suberesources-id
Allow passing UID to importer
This commit is contained in:
commit
2ed6d12652
38 changed files with 54 additions and 41 deletions
|
|
@ -2749,13 +2749,17 @@ Error EditorFileSystem::_reimport_file(const String &p_file, const HashMap<Strin
|
|||
}
|
||||
}
|
||||
|
||||
if (uid == ResourceUID::INVALID_ID) {
|
||||
uid = ResourceUID::get_singleton()->create_id();
|
||||
}
|
||||
|
||||
//finally, perform import!!
|
||||
String base_path = ResourceFormatImporter::get_singleton()->get_import_base_path(p_file);
|
||||
|
||||
List<String> import_variants;
|
||||
List<String> gen_files;
|
||||
Variant meta;
|
||||
Error err = importer->import(p_file, base_path, params, &import_variants, &gen_files, &meta);
|
||||
Error err = importer->import(uid, p_file, base_path, params, &import_variants, &gen_files, &meta);
|
||||
|
||||
// As import is complete, save the .import file.
|
||||
|
||||
|
|
@ -2776,10 +2780,6 @@ Error EditorFileSystem::_reimport_file(const String &p_file, const HashMap<Strin
|
|||
f->store_line("type=\"" + importer->get_resource_type() + "\"");
|
||||
}
|
||||
|
||||
if (uid == ResourceUID::INVALID_ID) {
|
||||
uid = ResourceUID::get_singleton()->create_id();
|
||||
}
|
||||
|
||||
f->store_line("uid=\"" + ResourceUID::get_singleton()->id_to_text(uid) + "\""); // Store in readable format.
|
||||
|
||||
if (err == OK) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue