You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-09 12:50:35 +00:00
Fixed duplicating AnimationPlayers leaving empty tracks.
Fixed duplicating AnimationPlayers leaving empty tracks. I don't think duplicating arrays worked before. There was even this weird //does not make a long of sense but should work comment at the changed line. Fixes #21616
This commit is contained in:
@@ -230,7 +230,7 @@ Ref<Resource> Resource::duplicate(bool p_subresources) const {
|
|||||||
Variant p = get(E->get().name);
|
Variant p = get(E->get().name);
|
||||||
|
|
||||||
if ((p.get_type() == Variant::DICTIONARY || p.get_type() == Variant::ARRAY)) {
|
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))) {
|
} else if (p.get_type() == Variant::OBJECT && (p_subresources || (E->get().usage & PROPERTY_USAGE_DO_NOT_SHARE_ON_DUPLICATE))) {
|
||||||
|
|
||||||
RES sr = p;
|
RES sr = p;
|
||||||
|
|||||||
Reference in New Issue
Block a user