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

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

Closed
Tracked by #73960
Proggle opened this issue Oct 6, 2022 · 8 comments · Fixed by #97380

Comments

@Proggle
Copy link
Contributor

Proggle commented Oct 6, 2022

Godot version

v3.5.stable.official [991bb6a], v4.0.beta2.official [f8745f2]

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 Proggle changed the title V3.5.1 to V4Beta conversion process deletes bezier curves from animationplayers V3.5.1 to V4Beta2 conversion process deletes bezier curves from animationplayers Oct 6, 2022
@Proggle
Copy link
Contributor Author

Proggle commented Oct 6, 2022

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

@gotnospirit
Copy link
Contributor

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)

@Calinou
Copy link
Member

Calinou commented Oct 7, 2022

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 🙂

@Proggle
Copy link
Contributor Author

Proggle commented Oct 9, 2022

whoops, this one

#65502

@Proggle
Copy link
Contributor Author

Proggle commented Oct 11, 2022

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 Proggle changed the title V3.5.1 to V4Beta2 conversion process deletes bezier curves from animationplayers V3.5.1 to V4Beta2 conversion process deletes bezier curves (and malforms other keys) in animationplayers Oct 11, 2022
@akien-mga akien-mga added this to the 4.0 milestone Nov 21, 2022
@akien-mga akien-mga moved this to To Assess in 4.x Priority Issues Nov 21, 2022
@TokageItLab TokageItLab modified the milestones: 4.0, 4.x Jan 14, 2023
@KnightNine
Copy link

KnightNine commented Mar 16, 2023

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.

@TheSofox
Copy link
Contributor

TheSofox commented Sep 23, 2024

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
Copy link
Contributor

I've submitted a PR that should fix this issue: #97380

@akien-mga akien-mga added this to the 4.4 milestone Sep 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants