diff options
| author | Yuri Sizov <yuris@humnom.net> | 2023-07-12 17:16:53 +0200 |
|---|---|---|
| committer | Yuri Sizov <yuris@humnom.net> | 2023-07-12 17:16:53 +0200 |
| commit | f53329d045ac51ba37c54e7d52c2e6f30273a269 (patch) | |
| tree | 4186ffba2f29016a793b4743ba1eb7d2f1783600 /core | |
| parent | 22b4861d7b52c9011d1c24ab5bffbc72751f18a3 (diff) | |
| parent | 244968c8d13dbb03eb302da5fbf32cdeb67d9a3b (diff) | |
| download | redot-engine-f53329d045ac51ba37c54e7d52c2e6f30273a269.tar.gz | |
Merge pull request #78890 from KoBeWi/who_needs_restart_anyway
Allow change import type without restarting editor
Diffstat (limited to 'core')
| -rw-r--r-- | core/io/resource_format_binary.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/core/io/resource_format_binary.cpp b/core/io/resource_format_binary.cpp index 2a7a675f2d..3037f603c4 100644 --- a/core/io/resource_format_binary.cpp +++ b/core/io/resource_format_binary.cpp @@ -1775,9 +1775,9 @@ void ResourceFormatSaverBinaryInstance::write_variant(Ref<FileAccess> f, const V case Variant::OBJECT: { f->store_32(VARIANT_OBJECT); Ref<Resource> res = p_property; - if (res.is_null()) { + if (res.is_null() || res->get_meta(SNAME("_skip_save_"), false)) { f->store_32(OBJECT_EMPTY); - return; // don't save it + return; // Don't save it. } if (!res->is_built_in()) { @@ -1942,7 +1942,7 @@ void ResourceFormatSaverBinaryInstance::_find_resources(const Variant &p_variant case Variant::OBJECT: { Ref<Resource> res = p_variant; - if (res.is_null() || external_resources.has(res)) { + if (res.is_null() || external_resources.has(res) || res->get_meta(SNAME("_skip_save_"), false)) { return; } |
