godot icon indicating copy to clipboard operation
godot copied to clipboard

V3.5.1 to V4Beta2 conversion process deletes bezier curves (and malforms other keys) in animationplayers

Open Proggle opened this issue 3 years ago • 8 comments

Godot version

v3.5.stable.official [991bb6ac7], v4.0.beta2.official [f8745f2f7]

System information

Windows 10

Issue description

When converting from Godot 3 to Godot 4 Beta 2, it appears that the Bezier curves in animation players get deleted. Sometimes this also results in producing this error message when Godot was expecting the curves to exist.

E 0:00:01:0137 _set: Condition "!d.has("handle_modes")" is true. Returning: false <C++ Source> scene/resources/animation.cpp:319 @ _set()

Steps to reproduce

Make an animation player in V3.5.1. Have a bezier curve in that player. Automatically convert the project into Godot 4 Beta 2.

Minimal reproduction project

Here's a minimal godot 3 project, and the broken converted version.

BezierFadeConversionBug.zip

Proggle avatar Oct 06 '22 06:10 Proggle

Possibly related to this https://github.com/godotengine/godot/issues/66964 but this is conversion between the stable and beta, not between alpha versions.

Proggle avatar Oct 06 '22 06:10 Proggle

This one will be harder because at the moment ProjectConverter works line by line and only replace substrings, here "handle_modes" definition should be added for each track with type bezier.

I also noticed that loop = true was not renamed in loop_mode = 1, but here again I think the converter can't do it for the moment because it would need some context (knowing that this line belongs to an Animation sub-resource)

gotnospirit avatar Oct 07 '22 03:10 gotnospirit

Possibly related to this #66964 but this is conversion between the stable and beta, not between alpha versions.

You linked to this issue, but you probably meant to link to another issue :slightly_smiling_face:

Calinou avatar Oct 07 '22 17:10 Calinou

whoops, this one

https://github.com/godotengine/godot/issues/65502

Proggle avatar Oct 09 '22 05:10 Proggle

As an update, it seems like this isn't limited solely to bezier curves, but hits a variety of different animation keys. This is especially bad because the values appear to be correct in the editor, but when the animation player is actually run they fail to function (for instance, a texture keyframe displays the proper texture in editor, but does not load anything in game).

Deleting and recreating the keys makes them function properly.

Proggle avatar Oct 11 '22 02:10 Proggle

the godot 4.0 conversion completely warped my mesh skeletons as well as deleting the keyframes of all my bezier tracks in all my animation nodes.😭 rip conversion

So I'm needing to re-import all my animated 3D meshes from blender as well as re-animate all my 2D nodes manually which is not fun. Any vague estimation on when this issue will be fixed or if there's any workarounds (does any version of Godot convert the animations correctly?)? Reimporting all my stuff from blender might take a day or two but re-animating all the animations I created in-engine could take weeks.

KnightNine avatar Mar 16 '23 01:03 KnightNine

I got it working indirectly:

  1. I took the Godot 3 example project and ran the conversion program for Godot 4.
  2. I opened up Test.tscn in a text editor (BEFORE opening/saving the project in Godot 4)
  3. On the line after every tracks/*/keys = { line, I added the line "handle_modes": PackedInt32Array(0, 0), EDIT: Later discovered that the length of this array needs to match the length of times.
  4. I saved the file
  5. I opened the project in Godot 4 and found the animation imported fine:

image

So the problem with this clearly seems to be related to handle_modes

TheSofox avatar Sep 23 '24 18:09 TheSofox

I've submitted a PR that should fix this issue: https://github.com/godotengine/godot/pull/97380

TheSofox avatar Sep 23 '24 19:09 TheSofox