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

(4.0) Can Tween container greyed out properties, but can't animate them using AnimationPlayer or change them in Editor #57603

Closed
seppoday opened this issue Feb 3, 2022 · 5 comments

Comments

@seppoday
Copy link

seppoday commented Feb 3, 2022

Godot version

4.0 1 alpha

System information

Windows 11

Issue description

Hello. I noticed that there is a problem with consistency with positioning control nodes. That's kinda confusing and probably prone to bugs.

  1. In Editor I can't change control child nodes rect_position:
    image
  2. In Animaton Player I also cannot do it:
    image
  3. But using Tween I can:
    image

Steps to reproduce

Try changing control node position in those 3 ways.

Minimal reproduction project

No response

@seppoday seppoday changed the title (4.0) Can Tween container rect_position, but can't animate it using AnimationPlayer (4.0) Can Tween container greyed out properties, but can't animate them using AnimationPlayer or change them in Editor Feb 3, 2022
@Calinou
Copy link
Member

Calinou commented Feb 3, 2022

Controls within containers cannot be moved manually, as their position will be reset every time the container is updated (e.g. when new elements are added). This was always the case in Godot, but it's made more obvious in master thanks to #30623.

I guess we could display a message when a tween tries to set a rect_ property on a Control node within a container. This check isn't cheap, so it would only be done in debug builds.

@Calinou Calinou added this to the 4.0 milestone Feb 3, 2022
@seppoday
Copy link
Author

seppoday commented Feb 3, 2022

Isn't it kinda weird that you can change control rect_position using tween, but not by using Animation Player? I understand that you can't change it in editor. But Tween and Animation Player difference is kinda weird I guess?

@Calinou
Copy link
Member

Calinou commented Feb 3, 2022

Isn't it kinda weird that you can change control rect_position using tween, but not by using Animation Player? I understand that you can't change it in editor. But Tween and Animation Player difference is kinda weird I guess?

The Tween change happens via code, while #30623 only affects the editor. There is currently no mechanism in place to detect changes done to Controls by code (when they're managed by a parent container).

@TheDuriel
Copy link
Contributor

I guess we could display a message when a tween tries to set a rect_ property on a Control node within a container. This check isn't cheap, so it would only be done in debug builds.

Really not worth it. There are cases in which you want to do this for legitimate reasons, like animating your UI- And then letting containers take over once you're done.

@seppoday
Copy link
Author

seppoday commented Feb 4, 2022

In my case I was happy that I could animate node via code. I was just supprised that Animation Player way didn't work. So @Calinou we can probably close this one. Sorry for adding unnecesary issue. Still learning engine and just trying to help :)

@Calinou Calinou closed this as completed Feb 4, 2022
@Calinou Calinou removed this from the 4.0 milestone Feb 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants