Repository: godot
Issue: Errors using AnimationPlayer with relative paths
Labels: bug,needs testing,topic:animation

### Godot version

3.3.3 stable

### System information

Linux

### Issue description

I've struggled to create a minimal reproduction project that captures all the errors I'm seeing, but I'm finding it very difficult to understand how `AnimationPlayer` is supposed to work with relative paths.

I'm trying to set up a node encapsulating an `AnimationPlayer` that is capable of applying an animation to its parent and children.  A simple example would be an `AnimationPlayer` that carries with it a `Sprite` (to overlay over the animation target) and an `AudioStreamPlayer` (for associated sound effects).

![image](https://user-images.githubusercontent.com/857660/135376898-2d397889-5413-4fc4-8fb3-a488c425713c.png)

The minimal reproduction project tries to use this to make the node it is attached to flash red.  So I've set the "Root Node" of the `AnimationPlayer` to "..", and manually edited the track path inside the animation editor to refer to `..:modulate` -- the hope being to animate the `modulate` property of the `AnimationPlayer`'s parent:

![image](https://user-images.githubusercontent.com/857660/135377217-b5063e6c-772e-49b7-a44e-487d98aafcfe.png)

It's not obvious to me why the track name changes to `@@5908` or whether that's related to the behavior I'm seeing.

Sometimes the animation will play correctly without any errors.  At other times, I see error messages like the below:
```
scene/animation/animation_player.cpp:883 - Failed setting key at time 0 in Animation '' at Node
'/root/EditorNode/@@580/@@581/@@589/@@591/@@595/@@599/@@600/@@601/@@617/@@618/@@627/@@628/@@6066/@@5905/@@5906/@@5907/@@5908/@@5909/Sprite/AnimationPlayer', Track '..:modulate'.
Check if property exists or the type of key is right for the property
```

I can't tell from the errors if I'm using `AnimationPlayer` incorrectly, or if this is expected to work.  If these sorts of relative paths aren't supported or advisable, I'd appreciate some suggestions on other ways to achieve what I'm going for.


### Steps to reproduce

Open `RelocatableAnimationPlayer.tscn`, switch to the Animation tab and hit Shift + D.  The whole screen flashes red, as expected.

Open `BrokenScene.tscn` and select the `AnimationPlayer` node in the tree.  My output at this point shows:
```
scene/animation/animation_player.cpp:883 - Failed setting key at time 0 in Animation '' at Node
'/root/EditorNode/@@580/@@581/@@589/@@591/@@595/@@599/@@600/@@601/@@617/@@618/@@627/@@628/@@6066/@@5905/@@5906/@@5907/@@5908/@@5909/Sprite/AnimationPlayer', Track '..:modulate'.
Check if property exists or the type of key is right for the property
```

Switch to the Animation tab and hit Shift + D.   My output at this point shows the following for every timestep of the animation:
```
scene/animation/animation_player.cpp:883 - Failed setting key at time 0.006667 in Animation 'FlashRed' at Node
'/root/EditorNode/@@580/@@581/@@589/@@591/@@595/@@599/@@600/@@601/@@617/@@618/@@627/@@628/@@6066/@@5905/@@5906/@@5907/@@5908/@@5909/Sprite/AnimationPlayer', Track '..:modulate'.
Check if property exists or the type of key is right for the property
```

Even after all the error messages above, if you run the game and press Space, the Godot icon flashes red and produces no errors.  In my real project, errors like the above sometimes appear while executing the game, but I have not been able to reproduce that in a smaller project yet.

### Minimal reproduction project

[AnimationPlayer-RelativePath.zip](https://github.com/godotengine/godot/files/7256209/AnimationPlayer-RelativePath.zip)