Files
test/source
Christoph Lendenfeld d7dd45e4da Fix #138399: Key handle jumping when scaling to 0
When moving a handle so its length is 0, the other handle was automatically set to 0 as well.
Cancelling the action didn't move the other handle back to 0, but set its length to 1.

The reason for that was that the code tries to maintain the relation between the two handles,
but that would lead to a divide by 0 when either of the handles has a length of 0.
So it would set the handle length to 1 in that case.

The fix is to ensure that the length of a handle is never 0. This is done by clamping it at the key
position with a threshold of 0.001 and an extra floating point step to support large floating
point values.
This should not affect animation in any way.

This was discussed in the animation & rigging module meeting
https://devtalk.blender.org/t/2025-06-26-animation-rigging-module-meeting/41272#p-153605-patches-review-decision-time-5

Co-authored by Nathan Vegdahl

Pull Request: https://projects.blender.org/blender/blender/pulls/141029
2025-07-03 12:47:15 +02:00
..