style cleanup: follow style guide for formatting of if/for/while loops, and else...
[blender.git] / source / blender / nodes / composite / nodes / node_composite_curves.c
index 81424586a115b71e001af674eb35d6047f76b57a..d17a7bf5dc8138e5af02c0c214711a25ec81cabb 100644 (file)
@@ -47,7 +47,7 @@ static void node_composit_exec_curves_time(void *data, bNode *node, bNodeStack *
        /* stack order output: fac */
        float fac= 0.0f;
        
-       if(node->custom1 < node->custom2)
+       if (node->custom1 < node->custom2)
                fac= (rd->cfra - node->custom1)/(float)(node->custom2-node->custom1);
        
        fac= curvemapping_evaluateF(node->storage, 0, fac);
@@ -140,9 +140,9 @@ static void do_curves(bNode *node, float *out, float *in)
 static void do_curves_fac(bNode *node, float *out, float *in, float *fac)
 {
        
-       if(*fac >= 1.0f)
+       if (*fac >= 1.0f)
                curvemapping_evaluate_premulRGBF(node->storage, out, in);
-       else if(*fac <= 0.0f) {
+       else if (*fac <= 0.0f) {
                copy_v3_v3(out, in);
        }
        else {
@@ -160,11 +160,11 @@ static void node_composit_exec_curve_rgb(void *UNUSED(data), bNode *node, bNodeS
        /* stack order input:  fac, image, black level, white level */
        /* stack order output: image */
        
-       if(out[0]->hasoutput==0)
+       if (out[0]->hasoutput==0)
                return;
 
        /* input no image? then only color operation */
-       if(in[1]->data==NULL) {
+       if (in[1]->data==NULL) {
                curvemapping_evaluateRGBF(node->storage, out[0]->vec, in[1]->vec);
        }
        else {
@@ -174,7 +174,7 @@ static void node_composit_exec_curve_rgb(void *UNUSED(data), bNode *node, bNodeS
                
                curvemapping_set_black_white(node->storage, in[2]->vec, in[3]->vec);
                
-               if(in[0]->data==NULL && in[0]->vec[0] == 1.0f)
+               if (in[0]->data==NULL && in[0]->vec[0] == 1.0f)
                        composit1_pixel_processor(node, stackbuf, in[1]->data, in[1]->vec, do_curves, CB_RGBA);
                else
                        composit2_pixel_processor(node, stackbuf, in[1]->data, in[1]->vec, in[0]->data, in[0]->vec, do_curves_fac, CB_RGBA, CB_VAL);