Browse Source

Merge pull request #94429 from mihe/animation-res-ref

Fix animation library copy-paste not preserving resource reference
Rémi Verschelde 1 year ago
parent
commit
abce2babe1
1 changed files with 3 additions and 1 deletions
  1. 3 1
      editor/plugins/animation_library_editor.cpp

+ 3 - 1
editor/plugins/animation_library_editor.cpp

@@ -561,7 +561,9 @@ void AnimationLibraryEditor::_button_pressed(TreeItem *p_item, int p_column, int
 					return;
 				}
 
-				anim = anim->duplicate(); // Users simply dont care about referencing, so making a copy works better here.
+				if (!anim->get_path().is_resource_file()) {
+					anim = anim->duplicate(); // Users simply dont care about referencing, so making a copy works better here.
+				}
 
 				String base_name;
 				if (anim->get_name() != "") {