-
-
Notifications
You must be signed in to change notification settings - Fork 21.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Transition / blend times in AnimationPlayer are reordered upon saving #76491
Comments
I've noticed there is a similar issue with mesh libraries. I have a project that has a @@ -106,7 +106,7 @@ data = {
}
[sub_resource type="ImageTexture" id="ImageTexture_kh4xs"]
-image = SubResource("Image_f12pa")
+image = SubResource("Image_mp7od")
[sub_resource type="BoxShape3D" id="BoxShape3D_0kusy"]
size = Vector3(1.12986, 1.00339, 0.87913) |
I'm also seeing this bug in |
I think I found where the bug lives, I will hopefully have a fix PR up soon. |
Ok so I see that when the I believe the problem is that the it uses the This matches the behavior where each time I open godot and a scene with My proposed fix is to just cast the pointers as strings on bool operator<(const BlendKey &bk) const {
if (String(from) == String(bk.from)) {
return String(to) < String(bk.to);
} else {
return String(from) < String(bk.from);
}
} I tested this locally and it did the trick - no re-ordering each time I open the scene in godot. Any thoughts? This seems kind of hacky but i'm not sure of a better way without affecting other parts of the program.
|
Godot version
v4.0.1.stable.official [cacf499]
System information
Kubuntu 23.04
Issue description
When setting up an
AnimationPlayer
with several animations, it is possible to hit the "Animation" button to the left of the animation name / dropdown box and click "Edit Transitions..." which will let you create a blend time between the animations. The blend times of these animations are then stored in the tscn file like so:If an unrelated change is then made to the scene (for example, adding another child node), after saving, the blend times are then regenerated. Although the blend times remain correct, the order in the file is changed, which results in version control noise every time the file is saved.
An example of this can be seen on line 85 of the following diff: RobTheFiveNine/godot-animation-blend-reorder-bug@3ab62ba#diff-d3989be7149720fdbe62886f9bcc0644e7012d3c8b3f239c3d618e0760c307d0R85
The only change made in this sample project was to add a
Node3D
child object to the root node, but the order of the blend times changes and makes the version control flag more changes.The same issue can also be triggered by simply hitting CTRL+S on an unchanged scene, doing this can result in the
blend_times
property being changed, as can be seen in this commit: RobTheFiveNine/godot-animation-blend-reorder-bug@806b2b4Steps to reproduce
AnimationPlayer
which has several animationsMinimal reproduction project
https://github.com/RobTheFiveNine/godot-animation-blend-reorder-bug
The text was updated successfully, but these errors were encountered: