Animation: blend to infinity slider #106517

Closed
AresDeveaux wants to merge 15 commits from AresDeveaux/blender:blend_to_infinity_slider into main

When changing the target branch, be careful to rebase the branch in your fork to match. See documentation.
1 changed files with 1 additions and 1 deletions
Showing only changes of commit c2111305f4 - Show all commits

View File

@ -523,7 +523,7 @@ bool blend_to_infinity_fcurve_segment(FCurve *fcu, FCurveSegment *segment, const

This would be clearer if you checked explicitly to 0
segment->start_index == 0

the start index will never be smaller than 0

This would be clearer if you checked explicitly to 0 `segment->start_index == 0` the start index will never be smaller than 0

I am glad you didn't listen to me here, because I just realized what I suggested is wrong 🤦

I am glad you didn't listen to me here, because I just realized what I suggested is wrong 🤦
/* Avoids dividing by 0. */
if (x_delta == 0) {
return true;
return false;

shouldn't this return false?
also now that I think about it, I am not sure x_delta can ever be 0. It would only be 0 if the beyond key and the reference key are the same, which they cannot be since you are getting different indices.
Hm ok writing this now, you can have the curve in a state where two keys are at the same point in time. Shouldn't happen, but could...

Anyway, the function should return true if it ran and false if it didn't. Since you are exiting early here, I think it should return false.

shouldn't this return false? also now that I think about it, I am not sure x_delta can ever be 0. It would only be 0 if the beyond key and the reference key are the same, which they cannot be since you are getting different indices. Hm ok writing this now, you can have the curve in a state where two keys are at the same point in time. Shouldn't happen, but could... Anyway, the function should return true if it ran and false if it didn't. Since you are exiting early here, I think it should return false.
}
for (int i = segment->start_index; i < segment->start_index + segment->length; i++) {