diff options
author | Matt Ebb <matt@mke3.net> | 2010-03-09 10:41:27 +0300 |
---|---|---|
committer | Matt Ebb <matt@mke3.net> | 2010-03-09 10:41:27 +0300 |
commit | ec303cf980a696fa374dad3b1cdfd6440ed7f846 (patch) | |
tree | 578a4dfbf7f86ad49982c257276c6bab2592db1a /source/blender/blenkernel/intern/colortools.c | |
parent | d4756d395bde04dc6cfeed696df1c38211ffbff9 (diff) |
Fix [#21188] HueCorrection Node, when reseting Curve, it goes to a incline instead of flat/straight
Diffstat (limited to 'source/blender/blenkernel/intern/colortools.c')
-rw-r--r-- | source/blender/blenkernel/intern/colortools.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/colortools.c b/source/blender/blenkernel/intern/colortools.c index 71b497660e9..28b70b539c1 100644 --- a/source/blender/blenkernel/intern/colortools.c +++ b/source/blender/blenkernel/intern/colortools.c @@ -239,7 +239,7 @@ void curvemap_insert(CurveMap *cuma, float x, float y) cuma->curve= cmp; } -void curvemap_reset(CurveMap *cuma, rctf *clipr, CurveMappingPreset preset) +void curvemap_reset(CurveMap *cuma, rctf *clipr, int preset) { if(cuma->curve) MEM_freeN(cuma->curve); @@ -249,6 +249,7 @@ void curvemap_reset(CurveMap *cuma, rctf *clipr, CurveMappingPreset preset) case CURVE_PRESET_SHARP: cuma->totpoint= 3; break; case CURVE_PRESET_SMOOTH: cuma->totpoint= 4; break; case CURVE_PRESET_MAX: cuma->totpoint= 2; break; + case CURVE_PRESET_MID9: cuma->totpoint= 9; } cuma->curve= MEM_callocN(cuma->totpoint*sizeof(CurveMapPoint), "curve points"); @@ -286,6 +287,15 @@ void curvemap_reset(CurveMap *cuma, rctf *clipr, CurveMappingPreset preset) cuma->curve[1].x= 1; cuma->curve[1].y= 1; break; + case CURVE_PRESET_MID9: + { + int i; + for (i=0; i < cuma->totpoint; i++) + { + cuma->curve[i].x= i / ((float)cuma->totpoint-1); + cuma->curve[i].y= 0.5; + } + } } if(cuma->table) { |