Allow passing UID to importer

This helps, for importers spitting out new resources to the res://
filesystem to actually hash them to generate deterministic UIDs.

This PR also fixes the determinism for translations.
This commit is contained in:
Juan 2024-09-23 16:07:40 +02:00 committed by Rémi Verschelde
parent 0f5f3bc954
commit fe34c45d2a
No known key found for this signature in database
GPG key ID: C3336907360768E1
38 changed files with 54 additions and 41 deletions

View file

@ -91,7 +91,7 @@ static Node *_gltf_export_then_import(Node *p_root, String &p_tempfilebase) {
options["gltf/naming_version"] = 1;
// Process gltf file, note that this generates `.scn` resource from the 2nd argument.
err = import_scene->import(p_tempfilebase + ".gltf", p_tempfilebase, options, nullptr, nullptr, nullptr);
err = import_scene->import(0, p_tempfilebase + ".gltf", p_tempfilebase, options, nullptr, nullptr, nullptr);
CHECK_MESSAGE(err == OK, "GLTF import failed.");
ResourceImporterScene::remove_scene_importer(import_gltf);