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

Ensure handle_modes is given default values rather than flagging error if undefined #97380

Merged
merged 1 commit into from
Sep 25, 2024

Conversation

TheSofox
Copy link
Contributor

Fixes #66964

Bezier animations weren't being properly converted to from Godot 3.x to 4.x, raising errors such as Condition "!d.has("handle_modes")" is true. Returning: false. This seems to be because 4.x expected a Handle Mode to be defined for each individual key, whereas in Godot 3.x seems to have the Handle Mode as an Editor setting. When Godot 4.x opened a Godot 3.x project, it looked for handle_modes that weren't there, and failed when it couldn't find them. To fix this, I've changed it so that if handle_modes is not defined, they are all initialised to 0. (This corresponds to Free is also the default when creating animations in the Editor)

This fix should make it a lot easier to import Bezier animations from Godot 3.x to 4.x.

@AThousandShips AThousandShips added this to the 4.4 milestone Sep 24, 2024
@AThousandShips AThousandShips added cherrypick:4.2 Considered for cherry-picking into a future 4.2.x release cherrypick:4.3 Considered for cherry-picking into a future 4.3.x release labels Sep 24, 2024
@AThousandShips AThousandShips requested a review from a team September 24, 2024 08:17
@akien-mga akien-mga merged commit 4c5e879 into godotengine:master Sep 25, 2024
19 checks passed
@akien-mga
Copy link
Member

Thanks!

ahxgamma referenced this pull request in ahxgamma/redot-engine Oct 1, 2024
…fix"

This reverts commit 4c5e879, reversing
changes made to 65c94ec.
@akien-mga akien-mga removed the cherrypick:4.2 Considered for cherry-picking into a future 4.2.x release label Mar 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug cherrypick:4.3 Considered for cherry-picking into a future 4.3.x release topic:animation topic:editor
Projects
None yet
Development

Successfully merging this pull request may close these issues.

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