Fix T47366: Single slope linear curve was wrongly using vector handle

Vector handle is only required for a symmetric curve to give nice a /\ shape.
Single slope curves better to use AUTO handle by default.
This commit is contained in:
Sergey Sharybin 2016-02-09 14:51:32 +01:00
parent 02b538ec83
commit 24e6411be6
Notes: blender-bot 2023-02-14 08:14:46 +01:00
Referenced by issue #47366, New Curve interpolation in Color Management works as the old method unless it gets reset.
1 changed files with 4 additions and 2 deletions

View File

@ -293,10 +293,12 @@ void curvemap_reset(CurveMap *cuma, const rctf *clipr, int preset, int slope)
case CURVE_PRESET_LINE:
cuma->curve[0].x = clipr->xmin;
cuma->curve[0].y = clipr->ymax;
cuma->curve[0].flag |= CUMA_VECTOR;
cuma->curve[1].x = clipr->xmax;
cuma->curve[1].y = clipr->ymin;
cuma->curve[1].flag |= CUMA_VECTOR;
if (slope == CURVEMAP_SLOPE_POS_NEG) {
cuma->curve[0].flag |= CUMA_VECTOR;
cuma->curve[1].flag |= CUMA_VECTOR;
}
break;
case CURVE_PRESET_SHARP:
cuma->curve[0].x = 0;