Skip to content

Fix BlendSpace point insertion shift at a specific index#119069

Merged
Repiteo merged 1 commit into
godotengine:masterfrom
Ryan-000:fix-animation-9
May 12, 2026
Merged

Fix BlendSpace point insertion shift at a specific index#119069
Repiteo merged 1 commit into
godotengine:masterfrom
Ryan-000:fix-animation-9

Conversation

@Ryan-000
Copy link
Copy Markdown
Contributor

Split from #119029

The shift loop must start from blend_points_used, which is the first free slot, not blend_points_used - 1, which is the last occupied slot. Otherwise, the last shifted point is overwritten instead of preserved.

For example inserting B at index 1 into [A, C, empty] should result in [A, B, C] but currently it is [A, B, empty]

Copy link
Copy Markdown
Contributor

@BlueCube3310 BlueCube3310 left a comment

Choose a reason for hiding this comment

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

Tested, this fixes issues with the last node disappearing after undoing removing other nodes. The changes make sense to me

@BlueCube3310 BlueCube3310 modified the milestones: 4.x, 4.7 May 10, 2026
@Repiteo Repiteo merged commit 2828be9 into godotengine:master May 12, 2026
20 checks passed
@Repiteo
Copy link
Copy Markdown
Contributor

Repiteo commented May 12, 2026

Thanks!

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.

4 participants