godotengine / godotengine/godot
animation tree root node instance bug
- Dominant language
- C++
- Stars
- 117k
- Forks
- 26.8k
- PR merge metrics
- PR metrics pending
Description
### Tested versions
4.2.stable
### System information
windows10 godot4.2.1
### Issue description
If you use an Animation Tree to edit animations and save it as an external scene (which is common in networked games), and then create an Animation Tree scene for each character scene to control their Animation Player, you may encounter a bug where the Animation Tree root node is the same instance. Even if the Animation Tree instances are not the same, anim_tree.get_tree_root() will return the same instance regardless of whether "Local to Scene" is enabled or not. This causes an issue where modifying the bone filters of a specific Animation Tree can inadvertently modify the bone filters of other instances.
In this scenario, when modifying the bone filters of one Animation Tree, if there are locally named bones that exist in other instances, it will unintentionally modify the bone filters of those Animation Trees as well.
### Steps to reproduce
animation_tree is different instance 。but anim_tree.get_tree_root() is same
### Minimal reproduction project (MRP)



Contributor guide
Research direction
Start with the AnimationTree and AnimationNode.get_tree_root() behavior in the reported external-scene setup, comparing instances with and without Local to Scene enabled. Reproduce the bone-filter change across character instances; the fix is complete when each Animation Tree has an independent root and changing one instance no longer changes another.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- game-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100