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 5 additions and 5 deletions
Showing only changes of commit aaf9ae70e0 - Show all commits

View File

@ -525,8 +525,8 @@ void blend_to_infinity_fcurve_segment(FCurve *fcu, FCurveSegment *segment, const
/* The factor goes from 0 to 1, but for this tool it needs to go from 0 to 1 on each side of the slider. */
const float ping_pong_factor = fabs(factor * 2 - 1);

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.
float x_delta = 0;
float y_delta = 0;
float x_delta;
float y_delta;
/* This delta values are used to know the relationship between the bookend keys and the

since this is now outside of the if else, you can to
const float y_delta = ...
and then remove the lines 503 and 504

since this is now outside of the if else, you can to `const float y_delta = ...` and then remove the lines 503 and 504
* reference keys beyong those. */
@ -545,9 +545,9 @@ void blend_to_infinity_fcurve_segment(FCurve *fcu, FCurveSegment *segment, const
for (int i = segment->start_index; i < segment->start_index + segment->length; i++) {
float new_x_delta = 0;
float new_y_delta = 0;
float refe = 0;
float new_x_delta;
float new_y_delta;
float refe;
/* This new deltas are used to determin the relationship between the current key and the bookend ones. */
if (slider_right_side) {