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

Skeleton3D: Only reset rest_dirty after ALL bone transforms have finished update #78025

Merged
merged 1 commit into from
Jun 9, 2023

Conversation

lyuma
Copy link
Contributor

@lyuma lyuma commented Jun 9, 2023

Fixes #77995

Special thanks to @TokageItLab for identifying the line of code during a debug session. I wouldn't have found it without that.

cc @TokageItLab @fire

@lyuma lyuma requested a review from a team as a code owner June 9, 2023 02:24
Copy link
Member

@fire fire left a comment

Choose a reason for hiding this comment

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

Tested on test case project with Tokage in Discord.

@fire fire added cherrypick:4.0 cherrypick:4.1 Considered for cherry-picking into a future 4.1.x release labels Jun 9, 2023
@fire fire requested a review from a team June 9, 2023 02:28
Copy link
Member

@TokageItLab TokageItLab left a comment

Choose a reason for hiding this comment

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

Yes, I am pretty sure it is the global_rest calculation that is broken. This PR fix not only #77995 but also the issue of SkeletonGizmo not displaying correctly when there is more than one bone root.

force_update_bone_children_transforms() is only used one line of force_update_all_bone_transforms() and process for each parentless bones, so it would be correct to put dirty = false there.

@TokageItLab TokageItLab added this to the 4.1 milestone Jun 9, 2023
@akien-mga akien-mga removed the cherrypick:4.1 Considered for cherry-picking into a future 4.1.x release label Jun 9, 2023
@akien-mga akien-mga merged commit da68c70 into godotengine:master Jun 9, 2023
@akien-mga
Copy link
Member

Thanks!

@akien-mga akien-mga changed the title Skeleton3D: Only reset rest_dirty after ALL bone transforms have finished update Skeleton3D: Only reset rest_dirty after ALL bone transforms have finished update Jun 14, 2023
@fire fire deleted the skeleton3d_rest_dirty branch September 2, 2023 02:50
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.

BoneMap Overwrite Axis breaks mesh bind poses in converted FBX
4 participants