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

Fix some animation state corruptions on activate and reset on save #86644

Merged
merged 1 commit into from
Feb 19, 2024

Conversation

TokageItLab
Copy link
Member

@TokageItLab TokageItLab commented Dec 30, 2023

I have commented there on the following:

BTW, there is a bug with reset on save for arrays, but it exists before this PR, so I will look into it separately.

The main cause of this was that the inactive or duplicated AnimationMixer would do the processing for reset_on_save many times. So this PR adds 2 checks:

  1. An inactive AnimationMixer should not affect the scene.
  2. AnimationTree that is assigned to a Player that may perform a reset on save will not perform a reset on save.

The conversion of the track cache to blendwise for backup is not necessary in practice, but added for safety.


Also, the dummy player is made inactive when it is generated; The dummy player is added to the scene when an AnimationTree is selected, but if it is activated by default, an invisible dummy player would play the animation when an inactive AnimationTree is selected. Fixed.

Moreover, regarding @YuriSizov concern in #85794 (comment), I have found that the problem occurs at the moment of activating, so I have reverted it so that it is not handled twice. I confirmed that #85640 works well, so regression will not occur.

@akien-mga akien-mga merged commit 8f9147f into godotengine:master Feb 19, 2024
16 checks passed
@akien-mga
Copy link
Member

Thanks!

@TokageItLab TokageItLab deleted the fix-reset-on-save branch February 19, 2024 10:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug cherrypick:4.2 Considered for cherry-picking into a future 4.2.x release regression topic:animation topic:editor
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants