godotengine / godotengine/godot
Copying AnimationLibrary resources(make unique), but no deep duplicate it's sub animation resources.
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 117k
- Forks
- 26.8k
- PR merge metrics
- PR metrics pending
Description
Tested versions
- Reproducible in: 4.5stable, 4.4.1stable
System information
Godot v4.5.stable - Windows 10 (build 19045) - Multi-window, 1 monitor - Vulkan (Mobile) - dedicated NVIDIA GeForce RTX 4070 (NVIDIA; 32.0.15.7628) - 12th Gen Intel(R) Core(TM) i5-12490F (12 threads) - 31.81 GiB memory
Issue description
When I try to copy AnimationLibrary resources with using make unique, modifying animation resources still affects the original copy. After a long period of trying😅, I found that the correct behavior can only be obtained by enabling make unique for the sub animation resources in the AnimationEditor. This should indicate that when make unique is enabled for animation library resources by default, but not recursive to sub animation resources. I think is a issue because when we want to copy(duplicate_deep) AnimationLibrary resources(make unique), the objects we want to modify are sub animation resources, so we should default to enabling make unique recursion or add another option 'make unique(recursive)'. Maybe related to #100673.
Demo:
https://github.com/user-attachments/assets/39603012-4396-445f-9c5f-65b4ebd24bec
Steps to reproduce
- Copy a AnimationLibrary resource from one to another AnimationPlayer
- Make it unique
- Tweak a animation e.g named 'idle' in AnimationLibrary
- You will find that the original copy be modified at the same time
- Open 'manage animations' option in the AnimationEditor, make 'idle' sub animation resource unique and then tweak it
- Check the original copy not modified
Minimal reproduction project (MRP)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the attached minimal reproduction project and reproduce the resource-copying steps in the AnimationEditor, focusing on AnimationLibrary and its sub-animation resources. Compare the behavior before and after making the idle animation unique; done means editing the copied animation no longer changes the original, with the intended recursive behavior or option confirmed by the maintainer.
Written by the indexing model from the issue text.
Assessment
- Domain
- game-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100