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/nodes/intern/CMP_nodes/CMP_huecorrect.c
parentd4756d395bde04dc6cfeed696df1c38211ffbff9 (diff)
Fix [#21188] HueCorrection Node, when reseting Curve, it goes to a incline instead of flat/straight
Diffstat (limited to 'source/blender/nodes/intern/CMP_nodes/CMP_huecorrect.c')
-rw-r--r--source/blender/nodes/intern/CMP_nodes/CMP_huecorrect.c23
1 files changed, 4 insertions, 19 deletions
diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_huecorrect.c b/source/blender/nodes/intern/CMP_nodes/CMP_huecorrect.c
index 0517811fe0d..58850cf3568 100644
--- a/source/blender/nodes/intern/CMP_nodes/CMP_huecorrect.c
+++ b/source/blender/nodes/intern/CMP_nodes/CMP_huecorrect.c
@@ -137,28 +137,13 @@ static void node_composit_exec_huecorrect(void *data, bNode *node, bNodeStack **
static void node_composit_init_huecorrect(bNode* node)
{
CurveMapping *cumapping = node->storage= curvemapping_add(1, 0.0f, 0.0f, 1.0f, 1.0f);
- int c, i;
+ int c;
+
+ cumapping->preset = CURVE_PRESET_MID9;
for (c=0; c<3; c++) {
CurveMap *cuma = &cumapping->cm[c];
-
- /* set default horizontal curve */
- if(cuma->curve)
- MEM_freeN(cuma->curve);
-
- cuma->totpoint= 9;
- cuma->curve= MEM_callocN(cuma->totpoint*sizeof(CurveMapPoint), "curve points");
-
- 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) {
- MEM_freeN(cuma->table);
- cuma->table= NULL;
- }
+ curvemap_reset(cuma, &cumapping->clipr, cumapping->preset);
}
/* default to showing Saturation */