style cleanup
authorCampbell Barton <ideasman42@gmail.com>
Sat, 16 Mar 2013 14:42:05 +0000 (14:42 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Sat, 16 Mar 2013 14:42:05 +0000 (14:42 +0000)
source/blender/editors/sculpt_paint/paint_stroke.c
source/blender/editors/space_clip/clip_ops.c
source/blender/editors/space_text/text_format_osl.c
source/blender/editors/space_view3d/view3d_draw.c
source/blender/gpu/shaders/gpu_shader_material.glsl

index 66df3a8be330675ddcbc6b2eb62001f07820873d..8c5552f48bc3a6a16b1efef010a567908658449b 100644 (file)
@@ -147,7 +147,7 @@ static float event_tablet_data(const wmEvent *event, int *pen_flip)
 /* Initialize the stroke cache variants from operator properties */
 static void paint_brush_update(bContext *C, Brush *brush, PaintMode mode,
                                          struct PaintStroke *stroke,
-                                                                                const float mouse[2], float pressure)
+                                         const float mouse[2], float pressure)
 {
        Scene *scene = CTX_data_scene(C);
        UnifiedPaintSettings *ups = &scene->toolsettings->unified_paint_settings;
@@ -289,7 +289,7 @@ static void paint_brush_stroke_add_step(bContext *C, wmOperator *op, const wmEve
                /* XXX: meh, this is round about because
                 * BKE_brush_jitter_pos isn't written in the best way to
                 * be reused here */
-               if(factor != 1.0f) {
+               if (factor != 1.0f) {
                        sub_v2_v2v2(delta, mouse_out, mouse_in);
                        mul_v2_fl(delta, factor);
                        add_v2_v2v2(mouse_out, mouse_in, delta);
@@ -324,7 +324,7 @@ static int paint_smooth_stroke(PaintStroke *stroke, float output[2],
        output[1] = sample->mouse[1];
 
        if (paint_supports_smooth_stroke(stroke->brush, mode)) {
-               float radius = stroke->brush->smooth_stroke_radius*stroke->zoom_2d;
+               float radius = stroke->brush->smooth_stroke_radius * stroke->zoom_2d;
                float u = stroke->brush->smooth_stroke_factor, v = 1.0f - u;
                float dx = stroke->last_mouse_position[0] - sample->mouse[0];
                float dy = stroke->last_mouse_position[1] - sample->mouse[1];
@@ -483,9 +483,9 @@ bool paint_supports_dynamic_size(Brush *br, PaintMode mode)
 
 bool paint_supports_smooth_stroke(Brush *br, PaintMode mode)
 {
-       if(!(br->flag & BRUSH_SMOOTH_STROKE) ||
-           (br->flag & BRUSH_ANCHORED) ||
-           (br->flag & BRUSH_RESTORE_MESH))
+       if (!(br->flag & BRUSH_SMOOTH_STROKE) ||
+            (br->flag & BRUSH_ANCHORED) ||
+            (br->flag & BRUSH_RESTORE_MESH))
        {
                return false;
        }
index a38673daeb94b242f4a7a6ab2a7e1790ec2893aa..914eb9526a85c695c78593aaf99d813ff9bfcbee 100644 (file)
@@ -1134,7 +1134,7 @@ static void *do_proxy_thread(void *data_v)
 
 static void do_sequence_proxy(void *pjv, int *build_sizes, int build_count,
                               int *build_undistort_sizes, int build_undistort_count,
-                                                         short *stop, short *do_update, float *progress)
+                              short *stop, short *do_update, float *progress)
 {
        ProxyJob *pj = pjv;
        MovieClip *clip = pj->clip;
index 59bbd82a569bb8cb7589acd2e414e066b6f59930..c95929a720f04a3b8488750b26da8658db4681a2 100644 (file)
@@ -141,10 +141,10 @@ static int txtfmt_osl_find_specialvar(const char *string)
        int i, len;
        
        /* OSL shader types */
-       if      (STR_LITERAL_STARTSWITH(string, "shader",               len)) i = len;
-       else if (STR_LITERAL_STARTSWITH(string, "surface",              len)) i = len;
-       else if (STR_LITERAL_STARTSWITH(string, "volume",               len)) i = len;
-       else if (STR_LITERAL_STARTSWITH(string, "displacement", len)) i = len;
+       if      (STR_LITERAL_STARTSWITH(string, "shader",       len)) i = len;
+       else if (STR_LITERAL_STARTSWITH(string, "surface",      len)) i = len;
+       else if (STR_LITERAL_STARTSWITH(string, "volume",       len)) i = len;
+       else if (STR_LITERAL_STARTSWITH(string, "displacement", len)) i = len;
        else                                                    i = 0;
 
        /* If next source char is an identifier (eg. 'i' in "definate") no match */
index 252a27947fb31b9a7836b9c506b7434bc242dca7..18e5aaf2964ab7888c673377539c4d415f437d72 100644 (file)
@@ -1357,8 +1357,9 @@ static void backdrawview3d(Scene *scene, ARegion *ar, View3D *v3d)
                char error[256];
 
                if (rv3d->gpuoffscreen) {
-                       if (GPU_offscreen_width(rv3d->gpuoffscreen) != w ||
-                           GPU_offscreen_height(rv3d->gpuoffscreen) != h) {
+                       if (GPU_offscreen_width(rv3d->gpuoffscreen)  != w ||
+                           GPU_offscreen_height(rv3d->gpuoffscreen) != h)
+                       {
                                GPU_offscreen_free(rv3d->gpuoffscreen);
                                rv3d->gpuoffscreen = NULL;
                        }
index 8fc18bf872646c20c6843673f7c0774ebcf859ee..4fc04175bba196925fd96acb09d738e562026206 100644 (file)
@@ -233,7 +233,7 @@ void math_pow(float val1, float val2, out float outval)
        else {
                float val2_mod_1 = mod(abs(val2), 1.0);
 
-               if (val2_mod_1 > 0.999 || val2_mod_1 < 0.001)
+               if (val2_mod_1 > 0.999 || val2_mod_1 < 0.001)
                        outval = compatible_pow(val1, floor(val2 + 0.5));
                else
                        outval = 0.0;