godot
godot copied to clipboard
4.4 Beta 1 - Animation Sub-Properties Create Wrong Key Type
Tested versions
4.4.beta1
System information
Godot v4.4.beta1 - Windows 11 (build 22631) - Multi-window, 1 monitor - Vulkan (Forward+) - dedicated NVIDIA GeForce RTX 3060 Laptop GPU (NVIDIA; 31.0.15.4633) - AMD Ryzen 7 5800H with Radeon Graphics (16 threads)
Issue description
I noticed that 4.4 Beta 1 introduced individual property selection for animations, which is great. It's bugged however. Picking the Y value for Position when adding a track still creates a Vector2 key.
The key also shows up as a red X in the timeline when a value is assigned to it.
Steps to reproduce
1 - Create an animation 2 - Add a track for a property like Position's Y
Minimal reproduction project (MRP)
Can you help narrow down when this broke?
Edited. This is a new feature, so I need to find the pull request and see if the original implementers are available.
Can you help narrow down when this broke?
Edited. This is a new feature, so I need to find the pull request and see if the original implementers are available.
https://github.com/godotengine/godot/pull/97563
Might be this?
The reason https://github.com/godotengine/godot/pull/97563 was implemented was for keying properties of subresources. Probably we should limit the selection to Ref<Resource>, since it is not intended for uses such as splitting Vector elements (although the bezier editor uses it as a hack). cc @SaracenOne
Please keep the ability to be able to only pick one axis of a Vector2 to animate though.
It's very useful for when you only want to animate the Y axis for 2D where the fire point has to move up and down along the idle and running animations, for example.
I need it for the game I'm making and it's bugged in 4.3. I was hoping 4.4 would fix it.
On Thu, 30 Jan 2025, 11:53 Silc Lizard (Tokage) Renew, < @.***> wrote:
The reason #97563 https://github.com/godotengine/godot/pull/97563 was implemented was for keying properties of subresources. Probably we should limit the selection to Ref<Resource>, since it is not intended for uses such as splitting Vector elements (although the bezier editor uses it as a hack). cc @SaracenOne https://github.com/SaracenOne
— Reply to this email directly, view it on GitHub https://github.com/godotengine/godot/issues/102130#issuecomment-2624283364, or unsubscribe https://github.com/notifications/unsubscribe-auth/AI4N6V7WMUWP5LW3TMQJS7T2NIHC5AVCNFSM6AAAAABWA7CC2CVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMMRUGI4DGMZWGQ . You are receiving this because you authored the thread.Message ID: @.***>
There are two serious problems when dealing with each of the Vector elements separately:
-
The property “x” does not distinguish whether it is a Vector2, Vector3 or other some type's element or other some class's property. It is a hack to use the element as a path, and is the cause of the underlying problem of incompatible bezier track and value track paths as reported in https://github.com/godotengine/godot/issues/43848 and https://github.com/godotengine/godot/issues/49431.
-
This is not a good thing from a mathematical point of view. For example, each property of a quaternion should not be interpolated individually, but all should be interpolated with normalizing.
While this is a future decision that has not yet been made, I believe that when the rework of the bezier track occurs in 5.0, access from animation to the elements of such vectors "by using track path" will be discontinued, for the reasons stated above; The track path should have one path to VectorX, and access to each element should be the role of the editor. In other words, it should have such as “separate dimensions option” and be closer to AfterEffects or some DCCs behavior.
I can guarantee that the track path with vector element will work during 4.x, but we can expect that it will be migrated to the original type of element when the project is converted to 5.0.
I disagree that this use-case is unsupported. It is a regression for :x as a subproperty.
As far as I know beizer system in godot engine only operate on float,time values.
It is arbitrary that vector4,3,2 can or cannot be interpolated.
For a quaternion if you restrict interpolating of axis to the Vector3 component it is interpolate-able.
Would switching the :x and :y tracks to be beziers solve the issue? It sounds to me like it should work as a workaround, and that :x and :y on value (non-bezier) tracks might not currently be supported. @TokageItLab does the workaround of using bezier tracks make sense for the example case of :y and :x ?
Given that a workaround exists, is there anything else we should practically do about this given the feature freeze and release candidate nature of 4.4?
@lyuma It does not make sense because the Bezier insertion is broken at this point.
The subproperty selection appears to have been added by https://github.com/godotengine/godot/pull/95554. I also investigated and https://github.com/godotengine/godot/pull/97563 does not seem to be relevant to this issue so if it was working correctly at https://github.com/godotengine/godot/pull/95554, then it should be bisected to find out the true cause of the problem.
The reason #97563 was implemented was for keying properties of subresources. Probably we should limit the selection to
Ref<Resource>, since it is not intended for uses such as splitting Vector elements (although the bezier editor uses it as a hack).
You should've used get_indexed to get sub members, which supports all Variant types out of the box, instead of this ad hoc hack that the PR has introduced.
The issue likely comes from https://github.com/godotengine/godot/pull/92842 which changed some things which the animation editor relies on implicitly. The value type of the track is defined by the type of the Variant that is stored in it. The linked PR dropped the value that comes from the caller that is adding the keyed property and is instead doing obj.get() which doesn't support indexed paths. Which Saracen tried to fix, but didn't fix fully.
obj.get_indexed() should resolve everything, I believe.
Duplicate of #99115.