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 errors with invalid bone node path in Polygon2D #54527

Merged

Conversation

pouleyKetchoupp
Copy link
Contributor

NodePath properties are designed to be relative to the given node, so validity checks are failing in the editor for Polygon2D nodes, which are relative to the Skeleton2D node rather than the Polygon2D node.

Fixed by saving bone paths as String properties instead of NodePath.

Shouldn't cause a difference for performance since NodePath properties are technically saved as String anyway.

Fixes #52126 (regression from #49812).

@pouleyKetchoupp pouleyKetchoupp added bug topic:core topic:editor regression cherrypick:3.x Considered for cherry-picking into a future 3.x release topic:2d labels Nov 2, 2021
@pouleyKetchoupp pouleyKetchoupp added this to the 4.0 milestone Nov 2, 2021
@pouleyKetchoupp pouleyKetchoupp requested a review from a team November 2, 2021 22:55
@pouleyKetchoupp pouleyKetchoupp requested a review from a team as a code owner November 2, 2021 22:55
NodePath properties are designed to be relative to the given node, so
validity checks are failing in the editor for Polygon2D nodes, which are
relative to the Skeleton2D node rather than the Polygon2D node.

Fixed by saving bone paths as String properties instead of NodePath.

Shouldn't cause a difference for performance since NodePath properties
are technically saved as String anyway.
@pouleyKetchoupp pouleyKetchoupp force-pushed the fix-polygon-bone-path-errors branch from 231c229 to 8d9619a Compare November 3, 2021 15:28
Copy link
Member

@akien-mga akien-mga left a comment

Choose a reason for hiding this comment

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

As we discussed on Rocket.Chat, this may not be the "correct" fix for this issue, but for the purpose of the imminent 3.4 release, it's the safest option.

A refactor/compat breaking change could be done to do this better for 4.0 (thus undoing these changes on the way).

@akien-mga akien-mga merged commit 25bea73 into godotengine:master Nov 3, 2021
@akien-mga
Copy link
Member

akien-mga commented Nov 3, 2021

Thanks!

Cherry-picked for 3.4.

@akien-mga akien-mga removed the cherrypick:3.x Considered for cherry-picking into a future 3.x release label Nov 3, 2021
@pouleyKetchoupp pouleyKetchoupp deleted the fix-polygon-bone-path-errors branch November 3, 2021 16:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants