diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2019-05-30 16:42:50 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-05-30 16:42:50 +0200 |
commit | c957e567417acd472c9dddd28cde14c32631a6db (patch) | |
tree | d7476abf31f2b9bfde23732bae6c08269fa65afe | |
parent | 7310c84367ad336f3c58253f7adea6ba21e24b91 (diff) | |
parent | d09ccf6f8196478427a0615d13bcaeb40ee5172c (diff) |
Merge pull request #24286 from glaforte/bugfix/20878
Fixes the support of the 'keep on reimport' flag - Issue #20878.
-rw-r--r-- | editor/import/resource_importer_scene.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/editor/import/resource_importer_scene.cpp b/editor/import/resource_importer_scene.cpp index 5da731b0a0..0989a43705 100644 --- a/editor/import/resource_importer_scene.cpp +++ b/editor/import/resource_importer_scene.cpp @@ -1024,7 +1024,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. } } @@ -1070,13 +1070,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. } } |