summaryrefslogtreecommitdiffstats
path: root/editor/editor_file_system.cpp
diff options
context:
space:
mode:
authorThaddeus Crews <repiteo@outlook.com>2024-11-11 14:18:30 -0600
committerThaddeus Crews <repiteo@outlook.com>2024-11-11 14:18:30 -0600
commit2ed6d126526b4c5cd73979371efd72cc9eb109f2 (patch)
treedf037b2b2270d959408085bdb0d7cd43ece43798 /editor/editor_file_system.cpp
parent74645109c4be874538571406893231eb7247f18a (diff)
parentfe34c45d2af3157ce1dbe65fd8b624851109a02d (diff)
downloadredot-engine-2ed6d126526b4c5cd73979371efd72cc9eb109f2.tar.gz
Merge pull request #97363 from reduz/deterministic-gen-suberesources-id
Allow passing UID to importer
Diffstat (limited to 'editor/editor_file_system.cpp')
-rw-r--r--editor/editor_file_system.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/editor/editor_file_system.cpp b/editor/editor_file_system.cpp
index 0c284feb37..cc81001efb 100644
--- a/editor/editor_file_system.cpp
+++ b/editor/editor_file_system.cpp
@@ -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) {