Animation: blend to infinity slider #106517
|
@ -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);
|
||||
|
||||
|
||||
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
|
||||
* 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) {
|
||||
|
|
Loading…
Reference in New Issue
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.