diff options
author | Aaron Franke <arnfranke@yahoo.com> | 2023-01-10 14:42:05 -0600 |
---|---|---|
committer | Aaron Franke <arnfranke@yahoo.com> | 2023-01-24 16:37:50 -0600 |
commit | 2a65f6812b98ef24ad2fb156376932a87b55062f (patch) | |
tree | 01d90507671fb2b70cdb2c2c6e2073c43dbf8dfc /core/io | |
parent | 2bc0bcbd26c809ce09f6c869515ce68d18120fdf (diff) |
Add PROPERTY_USAGE_NEVER_DUPLICATE flag and use for script
Co-authored-by: Yakov Borevich <j.borevich@gmail.com>
Diffstat (limited to 'core/io')
-rw-r--r-- | core/io/resource.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/io/resource.cpp b/core/io/resource.cpp index 022e34ecc6..e44bbc246b 100644 --- a/core/io/resource.cpp +++ b/core/io/resource.cpp @@ -262,7 +262,7 @@ Ref<Resource> Resource::duplicate(bool p_subresources) const { if ((p.get_type() == Variant::DICTIONARY || p.get_type() == Variant::ARRAY)) { r->set(E.name, p.duplicate(p_subresources)); - } else if (p.get_type() == Variant::OBJECT && (p_subresources || (E.usage & PROPERTY_USAGE_ALWAYS_DUPLICATE))) { + } else if (p.get_type() == Variant::OBJECT && !(E.usage & PROPERTY_USAGE_NEVER_DUPLICATE) && (p_subresources || (E.usage & PROPERTY_USAGE_ALWAYS_DUPLICATE))) { Ref<Resource> sr = p; if (sr.is_valid()) { r->set(E.name, sr->duplicate(p_subresources)); |