style cleanup: follow style guide for formatting of if/for/while loops, and else...
[blender.git] / source / blender / nodes / composite / nodes / node_composite_displace.c
index ad7c1fa589eb0f7909c970e67cefa23ff2a567e3..6e4bbc632ea70a3d4ed43545a92d7221b14a4740 100644 (file)
@@ -66,8 +66,8 @@ static void do_displace(bNode *node, CompBuf *stackbuf, CompBuf *cbuf, CompBuf *
        ibuf= IMB_allocImBuf(cbuf->x, cbuf->y, 32, 0);
        ibuf->rect_float= cbuf->rect;
        
-       for(y=0; y < stackbuf->y; y++) {
-               for(x=0; x < stackbuf->x; x++) {
+       for (y=0; y < stackbuf->y; y++) {
+               for (x=0; x < stackbuf->x; x++) {
                        /* calc pixel coordinates */
                        qd_getPixel(vecbuf, x-vecbuf->xof, y-vecbuf->yof, vec);
                        
@@ -117,10 +117,10 @@ static void do_displace(bNode *node, CompBuf *stackbuf, CompBuf *cbuf, CompBuf *
                        ibuf_sample(ibuf, u, v, dxt, dyt, col);
                        qd_setPixel(stackbuf, x, y, col);
                        
-                       if(node->exec & NODE_BREAK) break;
+                       if (node->exec & NODE_BREAK) break;
                }
                
-               if(node->exec & NODE_BREAK) break;
+               if (node->exec & NODE_BREAK) break;
        }
        IMB_freeImBuf(ibuf);
        
@@ -133,8 +133,8 @@ static void do_displace(bNode *node, CompBuf *stackbuf, CompBuf *cbuf, CompBuf *
        float vec[3];
        float col[3];
        
-       for(y=0; y < stackbuf->y; y++) {
-               for(x=0; x < stackbuf->x; x++) {
+       for (y=0; y < stackbuf->y; y++) {
+               for (x=0; x < stackbuf->x; x++) {
                        qd_getPixel(vecbuf, x, y, vec);
                        
                        dx = vec[0] * (xscale[0]);
@@ -153,10 +153,10 @@ static void do_displace(bNode *node, CompBuf *stackbuf, CompBuf *cbuf, CompBuf *
 
 static void node_composit_exec_displace(void *UNUSED(data), bNode *node, bNodeStack **in, bNodeStack **out)
 {
-       if(out[0]->hasoutput==0)
+       if (out[0]->hasoutput==0)
                return;
        
-       if(in[0]->data && in[1]->data) {
+       if (in[0]->data && in[1]->data) {
                CompBuf *cbuf= in[0]->data;
                CompBuf *vecbuf= in[1]->data;
                CompBuf *xbuf= in[2]->data;
@@ -175,9 +175,9 @@ static void node_composit_exec_displace(void *UNUSED(data), bNode *node, bNodeSt
                out[0]->data= stackbuf;
                
                
-               if(cbuf!=in[0]->data)
+               if (cbuf!=in[0]->data)
                        free_compbuf(cbuf);
-               if(vecbuf!=in[1]->data)
+               if (vecbuf!=in[1]->data)
                        free_compbuf(vecbuf);
        }
 }