Skip to content

Add unit tests for AnimationNodeAnimation#119988

Open
chocola-mint wants to merge 1 commit into
godotengine:masterfrom
chocola-mint:animation-blend-tree-tests
Open

Add unit tests for AnimationNodeAnimation#119988
chocola-mint wants to merge 1 commit into
godotengine:masterfrom
chocola-mint:animation-blend-tree-tests

Conversation

@chocola-mint
Copy link
Copy Markdown
Contributor

What problem(s) does this PR solve?

Additional information

This PR adds much-needed unit tests to catch regressions involved with AnimationNodeAnimation. Almost all playback patterns (including custom timelines) are covered with this PR.

I've verified that these tests used to fail before #119871 was merged and are now passing.

Note that blending is beyond the scope of this PR and is not tested. (So there's only one AnimationNodeAnimation instance here) This can be future work for other contributors.

Comment thread tests/scene/test_animation_blend_tree.cpp Outdated
@chocola-mint chocola-mint force-pushed the animation-blend-tree-tests branch from a12d425 to 519109f Compare June 3, 2026 09:16
animation.instantiate();
Ref<AnimationLibrary> animation_library;
animation_library.instantiate();
animation_library->add_animation(test_animation_name, animation);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As I mentioned in #119980, we should add cases where the duration is not 1.0 seconds (default value).

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have updated the test cases to use a duration of 8 seconds instead of 1.

This is done by scaling every keyframe's time by 8.

@chocola-mint chocola-mint force-pushed the animation-blend-tree-tests branch from 519109f to 09cbbde Compare June 4, 2026 11:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants