Merge pull request #21657 from DualMatrix/array_dup

Fixed duplicating AnimationPlayers leaving empty tracks.
This commit is contained in:
Rémi Verschelde 2018-09-01 17:37:43 +02:00 committed by GitHub
commit 88b56634f3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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;