Skip to content
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

FPS value in AnimatedSprite (2D) applied to wrong animation when switching to another #26979

Closed
txigreman opened this issue Mar 12, 2019 · 4 comments · Fixed by #28729
Closed

Comments

@txigreman
Copy link

txigreman commented Mar 12, 2019

Godot version:
3.1-RC3

OS/device including version:
Windows 10

Issue description:
If you have 2 animations in a AnimatedSprite (2D) with the same FPS value, and you try to change the FPS of one of them, and then you click in the second one, then the FPS change is wrongly applied to second one.

If the animations do not have the same FPS value them the change is omitted/discarded and both animations preserve the original value.

Steps to reproduce:

  1. Create a AnimatedSprited (2D).
  2. Assign a new SpriteFrames.
  3. Click on the SpriteFrames to open the panel.
  4. Create 2 animations.
  5. Click in the first one.
  6. Change the FPS value. Do not press enter key.
  7. Click in the other animation.

Minimal reproduction project:
Test.zip

@bojidar-bg bojidar-bg added this to the 3.2 milestone Apr 17, 2019
@bojidar-bg
Copy link
Contributor

bojidar-bg commented Apr 17, 2019

Can confirm.
(psst, there is no need to submit the new project template as a MRP. Just say it works from a blank project)

@dozingpip
Copy link
Contributor

Can I take this on as my first issue here?
I think I'd be tweaking this function so that before reassigning edited_anim to the newly selected animation, I would check if the current edited_anim's FPS value has changed and call _animation_fps_changed with the new value if so.

@dozingpip
Copy link
Contributor

dozingpip commented May 6, 2019

I could also do anim_speed->release_focus(), but since _update_library changes anim_speed before the focus_exited signal gets processed that won't work unless I defer the call to _update_library and the change to edited_anim.
Not sure which way would be better or if it makes much of a difference in the end?

@dozingpip
Copy link
Contributor

I did it the first way I mentioned, without release_focus, since I wasn't sure how to defer the change of edited_anim, but if anyone thinks that'd work better, I can change it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants