1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-14 13:41:12 +00:00

gltf: fix three bugs which prevented extracted textures from being refreshed.

1. Extracted texture paths in `GLTFDocument::_parse_image_save_image` at the project root started with res:/// which broke cache invalidation
2. md5 hashes were not being written to generator_parameters for new imports, which led Godot to think the file was manually created.
3. `EditorFileSystem::reimport_append` must emit the `resources_reimported` signal in order for the resource cache to be updated.

(cherry picked from commit fea4165ca8)
This commit is contained in:
Lyuma
2023-12-25 00:58:38 -08:00
committed by Yuri Sizov
parent d11ef2d908
commit 80bf0cff65
2 changed files with 10 additions and 2 deletions

View File

@@ -2351,7 +2351,13 @@ void EditorFileSystem::reimport_files(const Vector<String> &p_files) {
Error EditorFileSystem::reimport_append(const String &p_file, const HashMap<StringName, Variant> &p_custom_options, const String &p_custom_importer, Variant p_generator_parameters) {
ERR_FAIL_COND_V_MSG(!importing, ERR_INVALID_PARAMETER, "Can only append files to import during a current reimport process.");
return _reimport_file(p_file, p_custom_options, p_custom_importer, &p_generator_parameters);
Error ret = _reimport_file(p_file, p_custom_options, p_custom_importer, &p_generator_parameters);
// Emit the resource_reimported signal for the single file we just reimported.
Vector<String> reloads;
reloads.append(p_file);
emit_signal(SNAME("resources_reimported"), reloads);
return ret;
}
Error EditorFileSystem::_resource_import(const String &p_path) {