Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Ebb <matt@mke3.net>2010-03-09 10:41:27 +0300
committerMatt Ebb <matt@mke3.net>2010-03-09 10:41:27 +0300
commitec303cf980a696fa374dad3b1cdfd6440ed7f846 (patch)
tree578a4dfbf7f86ad49982c257276c6bab2592db1a /source/blender/blenkernel/intern/colortools.c
parentd4756d395bde04dc6cfeed696df1c38211ffbff9 (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.c12
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) {