godotengine / godotengine/godot

Copying AnimationLibrary resources(make unique), but no deep duplicate it's sub animation resources.

Open
#111,130 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug topic:animation
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
  1. Copy a AnimationLibrary resource from one to another AnimationPlayer
  2. Make it unique
  3. Tweak a animation e.g named 'idle' in AnimationLibrary
  4. You will find that the original copy be modified at the same time
  5. Open 'manage animations' option in the AnimationEditor, make 'idle' sub animation resource unique and then tweak it
  6. Check the original copy not modified
Minimal reproduction project (MRP)

anim_2025-10-02_02-56-15.zip

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.