- 
          
 - 
                Notifications
    
You must be signed in to change notification settings  - Fork 23.5k
 
Open
Labels
Description
Tested versions
4.5 and earlier (didn't test when it started exactly, but not a regression)
System information
W10
Issue description
When you create new animations in AnimationPlayer, they will be saved in the order they were added. Example from MRP:
[sub_resource type="Animation" id="Animation_y32ns"]
resource_name = "Animation"
step = 0.1
[sub_resource type="Animation" id="Animation_wtcfe"]
resource_name = "Cnimation"
step = 0.1
[sub_resource type="Animation" id="Animation_0e48y"]
resource_name = "Bnimation"
step = 0.1
[sub_resource type="AnimationLibrary" id="AnimationLibrary_wtcfe"]
_data = {
&"Animation": SubResource("Animation_y32ns"),
&"Bnimation": SubResource("Animation_0e48y"),
&"Cnimation": SubResource("Animation_wtcfe")
}
However, when you reload the scene and save it again, the animations get sorted:
[sub_resource type="Animation" id="Animation_y32ns"]
resource_name = "Animation"
step = 0.1
[sub_resource type="Animation" id="Animation_0e48y"]
resource_name = "Bnimation"
step = 0.1
[sub_resource type="Animation" id="Animation_wtcfe"]
resource_name = "Cnimation"
step = 0.1
[sub_resource type="AnimationLibrary" id="AnimationLibrary_wtcfe"]
_data = {
&"Animation": SubResource("Animation_y32ns"),
&"Bnimation": SubResource("Animation_0e48y"),
&"Cnimation": SubResource("Animation_wtcfe")
}
As you can see, the animation sub-resources in the scene change order to conform the alphabetical order. Animations are usually tens of lines long, so if you commit the unsorted state and then go back to your scene, you suddenly end up with hundreds of lines of useless diff.
Steps to reproduce
- Create AnimationPlayer and add some animations
 - Open the tscn file and note the animation order
 - Reload the scene and save again
 - Check animation order again
 
Minimal reproduction project (MRP)
animebug.zip
Just save the scene and see how Bnimation swaps places.
coppolaemilio, Mickeon, mgiuca and JekSun97