X Tutup
Skip to content

Fix empty 2D skeleton modification keeps printing error messages#113176

Merged
akien-mga merged 1 commit intogodotengine:masterfrom
xuhuisheng:dev/ske-mod-error
Dec 1, 2025
Merged

Fix empty 2D skeleton modification keeps printing error messages#113176
akien-mga merged 1 commit intogodotengine:masterfrom
xuhuisheng:dev/ske-mod-error

Conversation

@xuhuisheng
Copy link
Contributor

Issue Description

When we create an empty skeleton modification, editor will try to call _draw_editor_gizmo() every idle frame, but forget to consider whether bone_idx is valid.

Solution

Check bone_idx before calling get_bone() can prevent printing error message in every frame.

@xuhuisheng xuhuisheng requested a review from a team as a code owner November 26, 2025 04:35
@AThousandShips AThousandShips added this to the 4.6 milestone Nov 26, 2025
@fire fire requested a review from a team November 26, 2025 13:40
@fire fire moved this to Ready for review in Animation Team Issue Triage Nov 26, 2025
@fire
Copy link
Member

fire commented Nov 26, 2025

@AThousandShips We probably want to add 2d animation to the animation team as a github repo codeowner.

@AThousandShips AThousandShips changed the title Fix empty skeleton modification keeps print error messages Fix empty skeleton modification keeps printing error messages Nov 26, 2025
@fire fire changed the title Fix empty skeleton modification keeps printing error messages Fix empty 2d skeleton modification keeps printing error messages Nov 26, 2025
@fire fire changed the title Fix empty 2d skeleton modification keeps printing error messages Fix empty 2D skeleton modification keeps printing error messages Nov 26, 2025
Copy link
Contributor

@lyuma lyuma left a comment

Choose a reason for hiding this comment

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

Looks safe. Only affects editor, and seems reasonable to early-return if a bone is < 0.

@lyuma lyuma moved this from Ready for review to Approved, Waiting for Production in Animation Team Issue Triage Dec 1, 2025
@akien-mga akien-mga added the cherrypick:4.5 Considered for cherry-picking into a future 4.5.x release label Dec 1, 2025
@akien-mga akien-mga merged commit 996c9a6 into godotengine:master Dec 1, 2025
20 checks passed
@github-project-automation github-project-automation bot moved this from Approved, Waiting for Production to Done in Animation Team Issue Triage Dec 1, 2025
@akien-mga
Copy link
Member

Thanks!

@xuhuisheng xuhuisheng deleted the dev/ske-mod-error branch December 1, 2025 14:30
@akien-mga
Copy link
Member

Cherry-picked for 4.5.2.

@akien-mga akien-mga removed the cherrypick:4.5 Considered for cherry-picking into a future 4.5.x release label Jan 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Skeleton2D prints an error every frame after adding a SkeletonModification2DTwoBoneIK to the modification list

5 participants

X Tutup