Cleanup: style
authorCampbell Barton <ideasman42@gmail.com>
Mon, 11 Mar 2019 21:21:13 +0000 (08:21 +1100)
committerCampbell Barton <ideasman42@gmail.com>
Mon, 11 Mar 2019 21:21:13 +0000 (08:21 +1100)
source/blender/blenkernel/intern/DerivedMesh.c
source/blender/blenkernel/intern/gpencil.c
source/blender/blenloader/intern/readfile.c
source/blender/editors/gpencil/annotate_paint.c
source/blender/editors/mesh/editmesh_bevel.c
source/blender/editors/mesh/editmesh_inset.c
source/blender/editors/mesh/editmesh_undo.c

index 574333b..b8fbca0 100644 (file)
@@ -1482,7 +1482,12 @@ static void mesh_calc_modifiers(
                                }
 
                                nextmask.vmask &= ~CD_MASK_ORCO;
-                               CustomData_MeshMasks temp_cddata_masks = {.vmask=CD_MASK_ORIGINDEX, .emask=CD_MASK_ORIGINDEX, .fmask=CD_MASK_ORIGINDEX, .pmask=CD_MASK_ORIGINDEX};
+                               CustomData_MeshMasks temp_cddata_masks = {
+                                       .vmask = CD_MASK_ORIGINDEX,
+                                       .emask = CD_MASK_ORIGINDEX,
+                                       .fmask = CD_MASK_ORIGINDEX,
+                                       .pmask = CD_MASK_ORIGINDEX,
+                               };
                                if (mti->requiredDataMask != NULL) {
                                        mti->requiredDataMask(ob, md, &temp_cddata_masks);
                                }
index 88c4e12..5380507 100644 (file)
@@ -1131,8 +1131,7 @@ BoundBox *BKE_gpencil_boundbox_get(Object *ob)
                return NULL;
 
        bGPdata *gpd = (bGPdata *)ob->data;
-       if ((ob->runtime.bb) && ((gpd->flag & GP_DATA_CACHE_IS_DIRTY) == 0))
-       {
+       if ((ob->runtime.bb) && ((gpd->flag & GP_DATA_CACHE_IS_DIRTY) == 0)) {
                return ob->runtime.bb;
        }
 
index 4b1ca9a..cc34aa1 100644 (file)
@@ -3614,13 +3614,15 @@ static void direct_link_nodetree(FileData *fd, bNodeTree *ntree)
                                }
                        }
                        else if (ntree->type == NTREE_COMPOSIT) {
-                               if (ELEM(node->type, CMP_NODE_TIME, CMP_NODE_CURVE_VEC, CMP_NODE_CURVE_RGB, CMP_NODE_HUECORRECT))
+                               if (ELEM(node->type, CMP_NODE_TIME, CMP_NODE_CURVE_VEC, CMP_NODE_CURVE_RGB, CMP_NODE_HUECORRECT)) {
                                        direct_link_curvemapping(fd, node->storage);
+                               }
                                else if (ELEM(node->type, CMP_NODE_IMAGE, CMP_NODE_R_LAYERS, CMP_NODE_VIEWER, CMP_NODE_SPLITVIEWER)) {
                                        ImageUser *iuser = node->storage;
                                        iuser->ok = 1;
                                        iuser->scene = NULL;
-                               } else if (node->type == CMP_NODE_CRYPTOMATTE) {
+                               }
+                               else if (node->type == CMP_NODE_CRYPTOMATTE) {
                                        NodeCryptomatte *nc = (NodeCryptomatte *)node->storage;
                                        nc->matte_id = newdataadr(fd, nc->matte_id);
                                }
index 1c2ad3d..1bc860d 100644 (file)
@@ -223,8 +223,9 @@ static bool gpencil_draw_poll(bContext *C)
        Object *obact = CTX_data_active_object(C);
        ScrArea *sa = CTX_wm_area(C);
        if ((sa) && (sa->spacetype == SPACE_VIEW3D)) {
-               if ((obact) && (obact->type == OB_GPENCIL)
-                       && (obact->mode == OB_MODE_PAINT_GPENCIL)) {
+               if ((obact) && (obact->type == OB_GPENCIL) &&
+                   (obact->mode == OB_MODE_PAINT_GPENCIL))
+               {
                        CTX_wm_operator_poll_msg_set(C,
                                "Annotation cannot be used in grease pencil draw mode");
                        return false;
index 1b301f8..0b079fd 100644 (file)
@@ -623,7 +623,7 @@ static int edbm_bevel_modal(bContext *C, wmOperator *op, const wmEvent *event)
        }
        /* Modal numinput active, try to handle numeric inputs first... */
        if (etype != EVT_MODAL_MAP && eval == KM_PRESS && has_numinput &&
-                               handleNumInput(C, &opdata->num_input[opdata->value_mode], event))
+           handleNumInput(C, &opdata->num_input[opdata->value_mode], event))
        {
                edbm_bevel_numinput_set_value(op);
                edbm_bevel_calc(op);
index c63f0db..3b48c4e 100644 (file)
@@ -383,12 +383,14 @@ static int edbm_inset_modal(bContext *C, wmOperator *op, const wmEvent *event)
                                        mdiff[0] = opdata->mcenter[0] - event->mval[0];
                                        mdiff[1] = opdata->mcenter[1] - event->mval[1];
 
-                                       if (opdata->modify_depth)
+                                       if (opdata->modify_depth) {
                                                amount = opdata->old_depth +
                                                        ((len_v2(mdiff) - opdata->initial_length) * opdata->pixel_size) / opdata->max_obj_scale;
-                                       else
+                                       }
+                                       else {
                                                amount = opdata->old_thickness -
                                                        ((len_v2(mdiff) - opdata->initial_length) * opdata->pixel_size) / opdata->max_obj_scale;
+                                       }
 
                                        /* Fake shift-transform... */
                                        if (opdata->shift)
index e22addd..649566e 100644 (file)
@@ -509,7 +509,7 @@ static void *undomesh_from_editmesh(UndoMesh *um, BMEditMesh *em, Key *key)
                NULL, em->bm, &um->me, (&(struct BMeshToMeshParams){
                    /* Undo code should not be manipulating 'G_MAIN->object' hooks/vertex-parent. */
                    .calc_object_remap = false,
-                   .cd_mask_extra = {.vmask=CD_MASK_SHAPE_KEYINDEX},
+                   .cd_mask_extra = {.vmask = CD_MASK_SHAPE_KEYINDEX},
                }));
 
        um->selectmode = em->selectmode;