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

Fix invalid 3-to-4 renames of add_animation to add_animation_library #86647

Merged
merged 1 commit into from
Jan 11, 2024

Conversation

AThousandShips
Copy link
Member

This rename breaks SpriteFrames and also isn't valid as the new method takes an AnimationLibrary, not an Animation

This change needs a more elaborate fix and should be mentioned in the migration page, see:

@AThousandShips AThousandShips added bug topic:editor topic:animation cherrypick:4.1 Considered for cherry-picking into a future 4.1.x release cherrypick:4.2 Considered for cherry-picking into a future 4.2.x release labels Dec 30, 2023
@AThousandShips AThousandShips added this to the 4.3 milestone Dec 30, 2023
@@ -644,7 +644,6 @@ const char *RenamesMap3To4::csharp_function_renames[][2] = {
{ "_SetPlaying", "SetPlaying" }, // AnimatedSprite3D
{ "_ToplevelRaiseSelf", "_TopLevelRaiseSelf" }, // CanvasItem
{ "_UpdateWrapAt", "_UpdateWrapAtColumn" }, // TextEdit
{ "AddAnimation", "AddAnimationLibrary" }, // AnimationPlayer
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As none of the commented out conversions are mentioned in the same way in the C# part I just removed it, can add it as a commented out part if desired

@AThousandShips AThousandShips changed the title Fix invalid renames of add_animation to add_animation_library Fix invalid 3-to-4 renames of add_animation to add_animation_library Dec 30, 2023
@@ -163,6 +163,7 @@ const char *RenamesMap3To4::gdscript_function_renames[][2] = {

// { "_set_name", "get_tracker_name" }, // XRPositionalTracker -- CameraFeed uses this.
// { "_unhandled_input", "_unhandled_key_input" }, // BaseButton, ViewportContainer -- Breaks Node, FileDialog, SubViewportContainer.
// { "add_animation", "add_animation_library" }, // AnimationPlayer -- Breaks SpriteFrames (and isn't a correct conversion).
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Technically this now applies to AnimationMixer, but wanting to allow cherry picking of this so not changing this

This rename breaks `SpriteFrames` and also isn't valid as the new method
takes an `AnimationLibrary`, not an `Animation`
@akien-mga akien-mga merged commit 00cc362 into godotengine:master Jan 11, 2024
15 checks passed
@AThousandShips AThousandShips deleted the anim_fix branch January 11, 2024 19:58
@akien-mga
Copy link
Member

Thanks!

@AThousandShips
Copy link
Member Author

Thank you!

@YuriSizov
Copy link
Contributor

Cherry-picked for 4.2.2. (Included the removal from #86301 since it was conflicting with it. Also removed the C# variant during the cherry-pick for simplicity, but here's the PR for master #87533)

@YuriSizov YuriSizov removed cherrypick:4.2 Considered for cherry-picking into a future 4.2.x release cherrypick:4.1 Considered for cherry-picking into a future 4.1.x release labels Jan 24, 2024
@YuriSizov
Copy link
Contributor

Cherry-picked for 4.1.4. (Same caveat.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Upgrading from 3 to 4 changes functions to invalid functions
3 participants