Cleanup: style
authorCampbell Barton <ideasman42@gmail.com>
Sun, 21 Oct 2018 05:22:46 +0000 (16:22 +1100)
committerCampbell Barton <ideasman42@gmail.com>
Sun, 21 Oct 2018 05:23:15 +0000 (16:23 +1100)
source/blender/draw/engines/gpencil/gpencil_cache_utils.c
source/blender/draw/engines/gpencil/gpencil_draw_utils.c
source/blender/draw/engines/gpencil/gpencil_engine.c
source/blender/editors/space_action/action_draw.c
source/blender/editors/uvedit/uvedit_parametrizer.c

index dec14b30e5961f921b49200b056b66ca56a9c600..30887e3fb196458a108d40a5ec50eaf8a089349d 100644 (file)
@@ -89,8 +89,8 @@ static int gpencil_len_datablock_duplicated(
        for (int i = 0; i < gp_cache_used; i++) {
                tGPencilObjectCache *cache_elem = &cache_array[i];
                if ((cache_elem->ob != ob) &&
-                       (cache_elem->gpd == gpd) &&
-                       (!cache_elem->is_dup_ob))
+                   (cache_elem->gpd == gpd) &&
+                   (!cache_elem->is_dup_ob))
                {
                        tot++;
                }
@@ -134,9 +134,10 @@ tGPencilObjectCache *gpencil_object_cache_add(
        cache_elem->idx = *gp_cache_used;
 
        /* check if object is duplicated */
-       cache_elem->is_dup_ob = gpencil_check_ob_duplicated(cache_array,
-                                                                       *gp_cache_used, ob_orig,
-                                                                       &cache_elem->data_idx);
+       cache_elem->is_dup_ob = gpencil_check_ob_duplicated(
+               cache_array,
+               *gp_cache_used, ob_orig,
+               &cache_elem->data_idx);
 
        if (!cache_elem->is_dup_ob) {
                /* check if object reuse datablock */
index 28802130df7834c7865301f815b5c13cba654b1e..f03947ddf87c7d144c118618b4ce116f01f25cfc 100644 (file)
@@ -1281,7 +1281,7 @@ void DRW_gpencil_populate_datablock(
 
                /* if pose mode, maybe the overlay to fade geometry is enabled */
                if ((draw_ctx->obact) && (draw_ctx->object_mode == OB_MODE_POSE) &&
-                       (v3d->overlay.flag & V3D_OVERLAY_BONE_SELECT))
+                   (v3d->overlay.flag & V3D_OVERLAY_BONE_SELECT))
                {
                        opacity = gpl->opacity * v3d->overlay.bone_select_alpha;
                }
@@ -1292,7 +1292,7 @@ void DRW_gpencil_populate_datablock(
                /* create derived array data or expand */
                if (cache_ob->data_idx + 1 > gpl->runtime.len_derived) {
                        if ((gpl->runtime.len_derived == 0) ||
-                               (gpl->runtime.derived_array == NULL))
+                           (gpl->runtime.derived_array == NULL))
                        {
                                p = MEM_callocN(sizeof(struct bGPDframe), "bGPDframe array");
                                gpl->runtime.len_derived = 1;
@@ -1321,7 +1321,7 @@ void DRW_gpencil_populate_datablock(
                /* draw onion skins */
                if (!ID_IS_LINKED(&gpd->id)) {
                        if ((!cache_ob->is_dup_data) &&
-                               (gpd->flag & GP_DATA_SHOW_ONIONSKINS) &&
+                           (gpd->flag & GP_DATA_SHOW_ONIONSKINS) &&
                            (do_onion) && (gpl->onion_flag & GP_LAYER_ONIONSKIN) &&
                            ((!playing) || (gpd->onion_flag & GP_ONION_GHOST_ALWAYS)) &&
                            (!cache_ob->is_dup_ob) && (gpd->id.us <= 1))
index 71e3c6a22efe992d067323ee3096129c9a29452d..ba64288d147f684adf617c2a9620d26fc449b218 100644 (file)
@@ -583,7 +583,7 @@ void GPENCIL_cache_populate(void *vedata, Object *ob)
                * (only if region is equal to originated paint region)
                */
                if ((draw_ctx->obact == ob) &&
-                       ((gpd->runtime.ar == NULL) || (gpd->runtime.ar == draw_ctx->ar)))
+                   ((gpd->runtime.ar == NULL) || (gpd->runtime.ar == draw_ctx->ar)))
                {
                        DRW_gpencil_populate_buffer_strokes(&e_data, vedata, ts, ob);
                }
index 9da128469cda9111860d7d6af9495a38b9de3b15..3ea3d067216fb8216282bc64fb9f45aa0e6ba765 100644 (file)
@@ -302,7 +302,7 @@ void draw_channel_strips(bAnimContext *ac, SpaceAction *saction, ARegion *ar)
                                        immRectf(pos, 0.0f, (float)y - ACHANNEL_HEIGHT_HALF(ac), v2d->cur.xmin, (float)y + ACHANNEL_HEIGHT_HALF(ac));
 
                                        /* frames one and higher get a saturated background */
-                                       immUniformColor3ubvAlpha(color, MIN2(255, color[3]*2));
+                                       immUniformColor3ubvAlpha(color, MIN2(255, color[3] * 2));
                                        immRectf(pos, v2d->cur.xmin, (float)y - ACHANNEL_HEIGHT_HALF(ac), v2d->cur.xmax + EXTRA_SCROLL_PAD,  (float)y + ACHANNEL_HEIGHT_HALF(ac));
                                }
                                else if (ac->datatype == ANIMCONT_MASK) {
@@ -313,7 +313,7 @@ void draw_channel_strips(bAnimContext *ac, SpaceAction *saction, ARegion *ar)
                                        immRectf(pos, 0.0f, (float)y - ACHANNEL_HEIGHT_HALF(ac), v2d->cur.xmin, (float)y + ACHANNEL_HEIGHT_HALF(ac));
 
                                        /* frames one and higher get a saturated background */
-                                       immUniformColor3ubvAlpha(color, MIN2(255, color[3]*2));
+                                       immUniformColor3ubvAlpha(color, MIN2(255, color[3] * 2));
                                        immRectf(pos, v2d->cur.xmin, (float)y - ACHANNEL_HEIGHT_HALF(ac), v2d->cur.xmax + EXTRA_SCROLL_PAD,  (float)y + ACHANNEL_HEIGHT_HALF(ac));
                                }
                        }
index 352bfbf9a9e12d0dbbfc842c1785908af659d1c0..412d68a5d4ddf16174572fd037ebd0f39c7ff552 100644 (file)
@@ -4189,7 +4189,7 @@ static void p_add_ngon(ParamHandle *handle, ParamKey key, int nverts,
        float normal[3];
        zero_v3(normal);
 
-       const float *co_curr, *co_prev = co[nverts-1];
+       const float *co_curr, *co_prev = co[nverts - 1];
        for (int j = 0; j < nverts; j++) {
                co_curr = co[j];
                add_newell_cross_v3_v3v3(normal, co_prev, co_curr);