Anim: Add Sharpness to Ease operator #117287

Merged
Christoph Lendenfeld merged 20 commits from ChrisLend/blender:graph_slider_ease_ease into main 2024-03-22 13:22:45 +01:00
1 changed files with 0 additions and 4 deletions
Showing only changes of commit 6c6a16f0d9 - Show all commits

View File

@ -704,10 +704,6 @@ void ease_fcurve_segment(FCurve *fcu, FCurveSegment *segment, const float factor
static float s_curve(const float x, const float width, const float shift)
{
/* Formula for 'S' curve we use for the "ease" sliders. The shift values move the curve verticaly
* or horizontaly. The range of the curve used is from 0 to 1 on "x" and "y" so we can scale it
* (width and height) and move it (xshift and y yshift) to crop the part of the curve we need.
* Slope determins how curvy the shape is */
const float x_shift = (x - shift) * width;

This comment seems to be out of sync with the parameters.

This comment seems to be out of sync with the parameters.
const float y = x_shift / sqrt(1 + pow2f(x_shift));
/* Normalize result to 0-1. */