Animation: shear left slider #106521
|
@ -499,6 +499,12 @@ void shear_left_fcurve_segment(FCurve *fcu, FCurveSegment *segment, const float
|
||||||
const float key_x_range = right_key->vec[1][0] - left_key->vec[1][0];
|
const float key_x_range = right_key->vec[1][0] - left_key->vec[1][0];
|
||||||
const float key_y_range = right_key->vec[1][1] - left_key->vec[1][1];
|
const float key_y_range = right_key->vec[1][1] - left_key->vec[1][1];
|
||||||
|
|
||||||
|
/* Happens if there is only 1 key on the FCurve. Needs to be skipped because it
|
||||||
|
* would be a divide by 0. */
|
||||||
|
if (IS_EQF(key_x_range, 0.0f)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/* The factor goes from 0 to 1, but for this tool it needs to go from -1 to 1. */
|
/* The factor goes from 0 to 1, but for this tool it needs to go from -1 to 1. */
|
||||||
const float long_factor = factor * 2 - 1;
|
const float long_factor = factor * 2 - 1;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue