From 32f835124d54d20f9aea1a33207bc1c660e9878a Mon Sep 17 00:00:00 2001 From: Roeck Victor Date: Fri, 6 Mar 2026 14:52:37 +0100 Subject: [PATCH] Remove previous animation libraries before adding them to dummy player --- editor/animation/animation_player_editor_plugin.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/editor/animation/animation_player_editor_plugin.cpp b/editor/animation/animation_player_editor_plugin.cpp index 5b33fae7e1..53703ba332 100644 --- a/editor/animation/animation_player_editor_plugin.cpp +++ b/editor/animation/animation_player_editor_plugin.cpp @@ -2464,6 +2464,12 @@ void AnimationPlayerEditorPlugin::_update_dummy_player(AnimationMixer *p_mixer) memdelete(default_node); // Library list is dynamically added to property list, should be copied explicitly. + List existing_libs; + dummy_player->get_animation_library_list(&existing_libs); + for (const StringName &K : existing_libs) { + dummy_player->remove_animation_library(K); + } + List libraries; p_mixer->get_animation_library_list(&libraries); for (const StringName &K : libraries) {