BKE: Update default smooth curve preset

Updates the `CurveMapping` `CURVE_PRESET_SMOOTH` curve to more closely
approximate the smoothstep function (y = 3x^2 - 2x^3). This has the
implication of changing what happens when the curve is reset, but does
not change any existing curves already stored in blendfiles.

Notably, this change primarily affects three operators:
* brush.curve_preset (Mesh Sculpting)
* brush.sculpt_curves_falloff_preset (Curves Sculpting)
* render.shutter_curve_preset (Motion Blur)

Pull Request: https://projects.blender.org/blender/blender/pulls/146710
This commit is contained in:
Sean Kim
2025-09-26 16:43:22 +02:00
committed by Sean Kim
parent 0e2316c2bc
commit 9b5f23c7a3

View File

@@ -288,7 +288,7 @@ void BKE_curvemap_reset(CurveMap *cuma, const rctf *clipr, int preset, CurveMapS
cuma->totpoint = 4;
break;
case CURVE_PRESET_SMOOTH:
cuma->totpoint = 4;
cuma->totpoint = 8;
break;
case CURVE_PRESET_MAX:
cuma->totpoint = 2;
@@ -348,12 +348,20 @@ void BKE_curvemap_reset(CurveMap *cuma, const rctf *clipr, int preset, CurveMapS
case CURVE_PRESET_SMOOTH:
cuma->curve[0].x = 0;
cuma->curve[0].y = 1;
cuma->curve[1].x = 0.25;
cuma->curve[1].y = 0.94;
cuma->curve[2].x = 0.75;
cuma->curve[2].y = 0.06;
cuma->curve[3].x = 1;
cuma->curve[3].y = 0;
cuma->curve[1].x = 0.12;
cuma->curve[1].y = 0.96;
cuma->curve[2].x = 0.25;
cuma->curve[2].y = 0.84;
cuma->curve[3].x = 0.42;
cuma->curve[3].y = 0.62;
cuma->curve[4].x = 0.58;
cuma->curve[4].y = 0.38;
cuma->curve[5].x = 0.75;
cuma->curve[5].y = 0.16;
cuma->curve[6].x = 0.88;
cuma->curve[6].y = 0.04;
cuma->curve[7].x = 1;
cuma->curve[7].y = 0;
break;
case CURVE_PRESET_MAX:
cuma->curve[0].x = 0;