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 2 additions and 2 deletions
Showing only changes of commit 227980c797 - Show all commits

View File

@ -511,7 +511,7 @@ void blend_to_infinity_fcurve_segment(FCurve *fcu, FCurveSegment *segment, const
return;
}
const BezTriple *beyond_right_key = fcurve_segment_end_get(

this can also be clearer.
segment->start_index + segment->length > fcu->totvert

this can also be clearer. `segment->start_index + segment->length > fcu->totvert`

I tried this change as well as the next one and it doesn't work as it should. Remember, we need 2 keys before and after the segment, the way you suggest just account for one. If I don't prevent not having 2 keys at each side of the segment the tool goes crazy.

I tried this change as well as the next one and it doesn't work as it should. Remember, we need 2 keys before and after the segment, the way you suggest just account for one. If I don't prevent not having 2 keys at each side of the segment the tool goes crazy.
fcu, segment->start_index + segment->length + 1);
fcu, segment->start_index + segment->length + 1);
y_delta = beyond_right_key->vec[1][1] - right_key->vec[1][1];
x_delta = beyond_right_key->vec[1][0] - right_key->vec[1][0];

I don't think you need this. At least I can't see it being used other than the check for 0.0f

If it is required that there is more than 1 key selected, update the comment because there is no potential divide by 0

I don't think you need this. At least I can't see it being used other than the check for 0.0f If it is required that there is more than 1 key selected, update the comment because there is no potential divide by 0
@ -550,7 +550,7 @@ void blend_to_infinity_fcurve_segment(FCurve *fcu, FCurveSegment *segment, const
}
/* We use compound rule of 3 to find the "Y" delta we are missing using the other deltas we
* know. */
* know. */
new_y_delta = new_x_delta * y_delta / x_delta;
const float delta = reference_key->vec[1][1] + new_y_delta - fcu->bezt[i].vec[1][1];