summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuillaume Laforte <guillaume.laforte@gmail.com>2018-12-11 08:56:36 -0500
committerGuillaume Laforte <guillaume.laforte@gmail.com>2018-12-11 08:56:36 -0500
commitd09ccf6f8196478427a0615d13bcaeb40ee5172c (patch)
tree365cfdaecde3142b4e3e15fdc0038bf29a39b92c
parent6343d05d9b812ef0fa4388ff796077b15bb39f0d (diff)
Fixes the support of the 'keep on reimport' flag - Issue #20878.
-rw-r--r--editor/import/resource_importer_scene.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/editor/import/resource_importer_scene.cpp b/editor/import/resource_importer_scene.cpp
index c5a5980fc1..cbbe4974d3 100644
--- a/editor/import/resource_importer_scene.cpp
+++ b/editor/import/resource_importer_scene.cpp
@@ -972,7 +972,7 @@ void ResourceImporterScene::_make_external_resources(Node *p_node, const String
} else {
ResourceSaver::save(ext_name, mat, ResourceSaver::FLAG_CHANGE_PATH);
- p_materials[mat] = ResourceLoader::load(ext_name);
+ p_materials[mat] = ResourceLoader::load(ext_name, "", true); // disable loading from the cache.
}
}
@@ -1018,13 +1018,13 @@ void ResourceImporterScene::_make_external_resources(Node *p_node, const String
String ext_name = p_base_path.plus_file(_make_extname(mat->get_name()) + ".material");
;
- if (FileAccess::exists(ext_name)) {
+ if (p_keep_materials && FileAccess::exists(ext_name)) {
//if exists, use it
p_materials[mat] = ResourceLoader::load(ext_name);
} else {
ResourceSaver::save(ext_name, mat, ResourceSaver::FLAG_CHANGE_PATH);
- p_materials[mat] = ResourceLoader::load(ext_name);
+ p_materials[mat] = ResourceLoader::load(ext_name, "", true); // disable loading from the cache.
}
}