summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2018-09-01 17:37:43 +0200
committerGitHub <noreply@github.com>2018-09-01 17:37:43 +0200
commit88b56634f32a9caa97502e98f2bbafc084c479ea (patch)
tree93188d278cb27042cdde9194c85eae3841dd5849
parent8cff3074b2fe143f1e4956cc8db9437ada568e91 (diff)
parenta35286e24bb344b06dbd79c42148c911d888e7d6 (diff)
Merge pull request #21657 from DualMatrix/array_dup
Fixed duplicating AnimationPlayers leaving empty tracks.
-rw-r--r--core/resource.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/resource.cpp b/core/resource.cpp
index 3078eb135a..f447f785b1 100644
--- a/core/resource.cpp
+++ b/core/resource.cpp
@@ -230,7 +230,7 @@ Ref<Resource> Resource::duplicate(bool p_subresources) const {
Variant p = get(E->get().name);
if ((p.get_type() == Variant::DICTIONARY || p.get_type() == Variant::ARRAY)) {
- p = p.duplicate(p_subresources); //does not make a long of sense but should work?
+ r->set(E->get().name, p.duplicate(p_subresources));
} else if (p.get_type() == Variant::OBJECT && (p_subresources || (E->get().usage & PROPERTY_USAGE_DO_NOT_SHARE_ON_DUPLICATE))) {
RES sr = p;