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

Selecting AnimationTree Node didn't jump to the bottom panel of AnimationTree #93455

Open
snougo opened this issue Jun 22, 2024 · 5 comments · May be fixed by #93659
Open

Selecting AnimationTree Node didn't jump to the bottom panel of AnimationTree #93455

snougo opened this issue Jun 22, 2024 · 5 comments · May be fixed by #93659

Comments

@snougo
Copy link

snougo commented Jun 22, 2024

Tested versions

reproducible in 4.3 beta2 (didn't test in previous 4.3 version)

System information

MacOS14.5 Godot4.3beta2 vulkan forward+

Issue description

Unless you have selected AnimationPlayer Node first, otherwise selecting AnimationTree Node will not jump to the bottom panel of AnimationTree

2024-06-22.15-18-58.mp4

Steps to reproduce

open MRP
open test.tscn file
select AnimationPlayer
selecr AnimationTree
select other Type Node
select AnimationTree

Minimal reproduction project (MRP)

project43b2.zip

@KoBeWi
Copy link
Member

KoBeWi commented Jun 26, 2024

The problem is that both AnimationPlayerEditorPlugin and AnimationTreeEditorPlugin handle AnimationTree. AnimationTree should be handled only by one plugin. Is there any reason why it is this way? What's the expected behavior?
CC @godotengine/animation

@sys010611
Copy link

sys010611 commented Jun 27, 2024

When I blocked AnimationPlayerEditorPlugin by code, AnimationTree itself worked fine.
image

@sys010611
Copy link

sys010611 commented Jun 27, 2024

So, I thought it would work when AnimationPlayerEditorPlugin::handles() func gets modified.

from
bool AnimationPlayerEditorPlugin::handles(Object *p_object) const { return p_object->is_class("AnimationPlayer") || p_object->is_class("AnimationTree") || p_object->is_class("AnimationMixer"); }
to
bool AnimationPlayerEditorPlugin::handles(Object *p_object) const { return p_object->is_class("AnimationPlayer") || p_object->is_class("AnimationMixer"); }

But it still didn't solve the issue because (AnimationTree)->is_class("AnimationMixer") returns true and AnimationPlayerEditorPlugin cuts in again.

The condition p_object->is_class("AnimationMixer") is still needed because without it AnimationPlayer gets broken.(Not playing animation)

@sys010611
Copy link

sys010611 commented Jun 27, 2024

image
This solves the bottom panel problem, but as I mentioned above it breaks AnimationPlayer.

However, that only happens when there is any connection in AnimationTree.

_.test.tscn.-.Project.43b.2.-.Godot.Engine.2024-06-27.17-45-34.mp4

Edit: It was not just broken, the AnimationTree was dominating animation viewport.
And with an animation made right in the project(not external), it worked fine.
Is this okay to go?

@AThousandShips AThousandShips added this to the 4.3 milestone Jun 27, 2024
@TokageItLab
Copy link
Member

TokageItLab commented Jun 30, 2024

The problem is that both AnimationPlayerEditorPlugin and AnimationTreeEditorPlugin handle AnimationTree. AnimationTree should be handled only by one plugin. Is there any reason why it is this way? What's the expected behavior?

@KoBeWi AnimationTree now be able to have its own AnimationLibrary in 4.2, allowing it to store and edit Animations/AnimationLibraries even without an external AnimationPlayer. Internally, when an AnimationTree is handled by the AnimationPlayerEditor, the AnimationPlayerEditor creates a dummy animation player inside.

So while it may need to be modified to give priority to the AnimationTreeEditor when selecting AnimationTree node, but there is nothing wrong with the AnimationPlayerEditor handling both the AnimationPlayer and the AnimationTree.

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