You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Following PR #70788 solving issue #70769, there are still a few bugs remaining.
Editing any animation name to empty string will auto-fix it with "new_animation[suffix]" as expected, but still show the Output error just before:
Animation '' doesn't exist.
Rename Animation
Renaming an animation already named "new_animation[suffix]" will consider the old name to be reserved, causing a conflict with itself and increment the suffix without needing to. For instance, "new_animation" -> empty string will become "new_animation_1". If "new_animation_1" already exists, it will become "new_animation_2", etc.
Basically, it should behave as if the user actually input "new_animation" instead of empty string. Looking at 6297665 I'd say that the empty -> "new_animation" fallback should be done earlier, before if (new_name == String(edited_anim)) to fix 2. and before if (!frames->has_animation(edited_anim)) to fix 1. But I'm not sure of possible side effects, so this needs to be tested.
Steps to reproduce
In any project: create new Sprite Frames resource
In SpriteFrames window: you'll see "default" animation. Try to rename it to empty string -> becomes "new_animation" as it should.
Check the Output console: observe error "Animation '' doesn't exist."
Rename the animation to empty string again. This time, it becomes "new_animation_1".
Try various combinations of existing suffixes by adding new animations multiple times, and observe how number resolution by increment occurs as usual, but unnecessarily skipping the very animation that is renamed.
Minimal reproduction project
N/A
The text was updated successfully, but these errors were encountered:
akien-mga
changed the title
v4.0.rc4 - SpriteFrames window renaming animation to empty still causes error and spurious naming conflict if already "new_animation"
SpriteFrames window renaming animation to empty still causes error and spurious naming conflict if already "new_animation"
Feb 24, 2023
Godot version
v4.0.rc4.official [e0de357]
System information
Linux Ubuntu 20.04 with Unity desktop
Issue description
Following PR #70788 solving issue #70769, there are still a few bugs remaining.
Basically, it should behave as if the user actually input "new_animation" instead of empty string. Looking at 6297665 I'd say that the empty -> "new_animation" fallback should be done earlier, before
if (new_name == String(edited_anim))
to fix 2. and beforeif (!frames->has_animation(edited_anim))
to fix 1. But I'm not sure of possible side effects, so this needs to be tested.Steps to reproduce
Minimal reproduction project
N/A
The text was updated successfully, but these errors were encountered: