Open Taywee opened 4 years ago
I double-checked, and it doesn't matter if the animation is saved to disk. The same thing happens for built-in animations in Root
. It doesn't seem to happen until a grandchild is made. A simple parent-child relationship appears to work fine, but once a grandchild is present, the child also doesn't properly want to reference the parent.
Godot version:
3.2.3
OS/device including version:
Gentoo Linux
Issue description:
When an AnimationPlayer has local-to-scene animations in some specific configurations of inherited scenes, they can't reference the on-disk resources that the parent does. I need this because I have a root node with an AnimationPlayer that I have subscenes of, but I need to modify the animations in each instance in code (specifically, I'm using it for some really cool rewind behavior) and have them behave separately. I want each AnimationPlayer to reference the same on-disk resource because they all start with some primitive set of animations and keys that are modified per-instance. This doesn't prevent it from working, but it does mean that I have to manually reupdate each inherited scene whenever I change the root.
This doesn't appear to happen when the animation is not "Local To Scene", but I wouldn't expect local to scene to do something like this, based on its description, which claims that the resource is made unique in each instance of the scene, not that the resource can't be inherited.
Steps to reproduce:
Root
Root
namedChild
, and save it.Child
namedGrandchild
, and save it.Child
andGrandchild
animations don't reference the .tres file, but are built-in. No amount of fiddling can make Godot not make them reference the same tres.Minimal reproduction project:
InheritanceTestLocal.zip