Skip to content

Add some options to Project Settings to silence warnings in AnimationMixer caching#86608

Merged
akien-mga merged 1 commit into
godotengine:masterfrom
TokageItLab:add-warn-setting-anim
Feb 16, 2024
Merged

Add some options to Project Settings to silence warnings in AnimationMixer caching#86608
akien-mga merged 1 commit into
godotengine:masterfrom
TokageItLab:add-warn-setting-anim

Conversation

@TokageItLab

@TokageItLab TokageItLab commented Dec 29, 2023

Copy link
Copy Markdown
Member

This PR is a salvaged version of #69480 with corrected error handling for finding path as pointed out in #85368. Also, as discussed several times in the past, invalid paths will be changed to a warning instead of an error since it is not a critical.

However, since cases where animations do not play due to path mismatches may occur to a certain extent in beginners, so the default is true; There are cases where the destination of add_child scenes is wrong, the name of the Skeleton is changed due to the use of retargeting and etc. It means, flag have been inverted from the original PR (#69480).

And finally, I added a statement in the warning that it is possible to turn off that warning in project settings.

@TokageItLab TokageItLab added this to the 4.3 milestone Dec 29, 2023
@TokageItLab TokageItLab requested review from a team as code owners December 29, 2023 14:26
@TokageItLab TokageItLab changed the title Add option to silence some warnings in AnimationMixer caching Add some options to Project Settings to silence warnings in AnimationMixer caching Dec 29, 2023
@TokageItLab TokageItLab marked this pull request as draft December 29, 2023 14:33
@TokageItLab TokageItLab force-pushed the add-warn-setting-anim branch 2 times, most recently from c95f058 to 05a9f54 Compare December 29, 2023 14:41
@TokageItLab TokageItLab marked this pull request as ready for review December 29, 2023 14:43
@TokageItLab TokageItLab force-pushed the add-warn-setting-anim branch from 05a9f54 to e9aa879 Compare January 8, 2024 20:06
@TokageItLab TokageItLab force-pushed the add-warn-setting-anim branch from e9aa879 to 6936732 Compare February 5, 2024 21:38
@TokageItLab TokageItLab requested review from KoBeWi and fire February 10, 2024 23:37
Comment thread core/config/project_settings.cpp Outdated
@KoBeWi

KoBeWi commented Feb 11, 2024

Copy link
Copy Markdown
Member

Even if you disable the warning, the AnimationPlayer will spam errors:
image
It should be using get_node_or_null() to avoid that.

Comment thread scene/animation/animation_mixer.cpp Outdated
@TokageItLab TokageItLab force-pushed the add-warn-setting-anim branch from 6936732 to 07b7a14 Compare February 12, 2024 00:23
@TokageItLab

TokageItLab commented Feb 12, 2024

Copy link
Copy Markdown
Member Author

Even if you disable the warning, the AnimationPlayer will spam errors:

@KoBeWi Can you send an MRP? I assume the error is the problem somewhere else where the setting not affected (maybe AnimationTrackEditor?).

@TokageItLab TokageItLab force-pushed the add-warn-setting-anim branch 3 times, most recently from 599f52c to bb3b178 Compare February 12, 2024 00:57
@KoBeWi

KoBeWi commented Feb 12, 2024

Copy link
Copy Markdown
Member

Spam is probably exaggerated, there is just a single error print when clicking the AnimationPlayer.

Bug.tscn.txt

@TokageItLab TokageItLab force-pushed the add-warn-setting-anim branch from bb3b178 to 1b7ef45 Compare February 12, 2024 01:58
@TokageItLab

Copy link
Copy Markdown
Member Author

@KoBeWi The null checks in AnimationTrackEditor were missing in some places, so I fixed them. Errors have gone.

The KeyType determination in ValueTrack fails when the node cannot be found with path, but I assume it seems to be expected behavior.

image

Comment thread scene/animation/animation_mixer.cpp Outdated
@TokageItLab TokageItLab force-pushed the add-warn-setting-anim branch from 1b7ef45 to a1107f2 Compare February 13, 2024 08:39
@TokageItLab TokageItLab requested review from a team as code owners February 13, 2024 08:39
@TokageItLab TokageItLab requested a review from a team February 13, 2024 08:39
@TokageItLab TokageItLab force-pushed the add-warn-setting-anim branch 2 times, most recently from 2c63ec6 to 56ecd6b Compare February 13, 2024 10:42
@TokageItLab TokageItLab removed request for a team February 13, 2024 22:41
@TokageItLab TokageItLab deleted the add-warn-setting-anim branch February 14, 2024 05:19
@TokageItLab TokageItLab restored the add-warn-setting-anim branch February 14, 2024 05:20
@TokageItLab TokageItLab reopened this Feb 14, 2024
@TokageItLab

Copy link
Copy Markdown
Member Author

Oops, sorry I accidentally closed it while cleaning up an old branch.

@TokageItLab TokageItLab force-pushed the add-warn-setting-anim branch from 56ecd6b to dc4b7bc Compare February 14, 2024 05:48
@TokageItLab

TokageItLab commented Feb 14, 2024

Copy link
Copy Markdown
Member Author

Changed some lines to adopt #88247.

@TokageItLab TokageItLab requested a review from KoBeWi February 14, 2024 05:50
@akien-mga akien-mga merged commit b6ef996 into godotengine:master Feb 16, 2024
@akien-mga

Copy link
Copy Markdown
Member

Thanks!

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

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Animation cache errors immediately after deleting node AnimationTree spamming error when switching scene

4 participants