Cleanup: style
authorCampbell Barton <ideasman42@gmail.com>
Sun, 2 Sep 2018 06:45:00 +0000 (16:45 +1000)
committerCampbell Barton <ideasman42@gmail.com>
Sun, 2 Sep 2018 06:49:45 +0000 (16:49 +1000)
13 files changed:
source/blender/blenkernel/BKE_lattice.h
source/blender/blenkernel/intern/gpencil_modifier.c
source/blender/draw/engines/gpencil/gpencil_draw_utils.c
source/blender/editors/armature/armature_skinning.c
source/blender/editors/gpencil/gpencil_armature.c
source/blender/editors/gpencil/gpencil_fill.c
source/blender/editors/gpencil/gpencil_paint.c
source/blender/editors/include/ED_gpencil.h
source/blender/editors/mesh/editmesh_tools.c
source/blender/editors/object/object_relations.c
source/blender/editors/space_view3d/view3d_snap.c
source/blender/gpencil_modifiers/intern/MOD_gpencilarmature.c
source/blender/gpencil_modifiers/intern/MOD_gpencilsubdiv.c

index 2ca6a35eec515ab9c2b6f326afbed012ed874e95..2e093ba11a2de4d938b6b9b96c9f8cc63bb1f9b8 100644 (file)
@@ -62,20 +62,24 @@ void end_latt_deform(struct LatticeDeformData *lattice_deform_data);
 bool object_deform_mball(struct Object *ob, struct ListBase *dispbase);
 void outside_lattice(struct Lattice *lt);
 
-void curve_deform_verts(struct Object *cuOb, struct Object *target,
+void curve_deform_verts(
+        struct Object *cuOb, struct Object *target,
         struct Mesh *mesh, float (*vertexCos)[3],
         int numVerts, const char *vgroup, short defaxis);
-void curve_deform_vector(struct Object *cuOb, struct Object *target,
-                         float orco[3], float vec[3], float mat[3][3], int no_rot_axis);
-
-void lattice_deform_verts(struct Object *laOb, struct Object *target,
-                          struct Mesh *mesh, float (*vertexCos)[3],
-                          int numVerts, const char *vgroup, float influence);
-void armature_deform_verts(struct Object *armOb, struct Object *target,
-                           const struct Mesh *mesh, float (*vertexCos)[3],
-                           float (*defMats)[3][3], int numVerts, int deformflag,
-                           float (*prevCos)[3], const char *defgrp_name,
-                                                  struct bGPDstroke *gps);
+void curve_deform_vector(
+        struct Object *cuOb, struct Object *target,
+        float orco[3], float vec[3], float mat[3][3], int no_rot_axis);
+
+void lattice_deform_verts(
+        struct Object *laOb, struct Object *target,
+        struct Mesh *mesh, float (*vertexCos)[3],
+        int numVerts, const char *vgroup, float influence);
+void armature_deform_verts(
+        struct Object *armOb, struct Object *target,
+        const struct Mesh *mesh, float (*vertexCos)[3],
+        float (*defMats)[3][3], int numVerts, int deformflag,
+        float (*prevCos)[3], const char *defgrp_name,
+        struct bGPDstroke *gps);
 
 float (*BKE_lattice_vertexcos_get(struct Object *ob, int *r_numVerts))[3];
 void    BKE_lattice_vertexcos_apply(struct Object *ob, float (*vertexCos)[3]);
index af82d8fa20078f63c4e696a81c486e701e30eedf..bff71f648719053ddfe7842d81b250722e8d233d 100644 (file)
@@ -423,10 +423,10 @@ void BKE_gpencil_stroke_modifiers(Depsgraph *depsgraph, Object *ob, bGPDlayer *g
                                /* some modifiers could require a recalc of fill triangulation data */
                                if (gpd->flag & GP_DATA_STROKE_FORCE_RECALC) {
                                        if (ELEM(md->type,
-                                                       eGpencilModifierType_Armature,
-                                                       eGpencilModifierType_Hook,
-                                                       eGpencilModifierType_Lattice,
-                                                       eGpencilModifierType_Offset))
+                                                eGpencilModifierType_Armature,
+                                                eGpencilModifierType_Hook,
+                                                eGpencilModifierType_Lattice,
+                                                eGpencilModifierType_Offset))
                                        {
 
                                                gps->flag |= GP_STROKE_RECALC_CACHES;
index 29544a601d52db5da8acd02b1c00168af5fa664d..f1d3ad37e671e75491e906c29d7be765d91ae427 100644 (file)
@@ -866,7 +866,7 @@ static void gpencil_draw_strokes(
                        if ((fillgrp) && (!stl->storage->simplify_fill)) {
                                gpencil_add_fill_shgroup(
                                        cache, fillgrp, ob, derived_gpf, gps,
-                                               opacity, tintcolor, false, custonion);
+                                       opacity, tintcolor, false, custonion);
                        }
                        /* stroke */
                        if (strokegrp) {
@@ -1245,7 +1245,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;
                }
index 63068e61ba331d17627db694a37ef9bf65aa83b5..834be3b69ef2dbef0c74ea2248fe340a8de3e50f 100644 (file)
@@ -104,7 +104,7 @@ static int bone_skinnable_cb(Object *UNUSED(ob), Bone *bone, void *datap)
 
                                for (a = 0; a < segments; a++) {
                                        **hbone = bone;
-                                       ++*hbone;
+                                       (*hbone)++;
                                }
                        }
                        return segments;
@@ -180,7 +180,7 @@ static int dgroup_skinnable_cb(Object *ob, Bone *bone, void *datap)
 
                                for (a = 0; a < segments; a++) {
                                        **hgroup = defgroup;
-                                       ++*hgroup;
+                                       (*hgroup)++;
                                }
                        }
                        return segments;
index b55239deadc18bd9d48e09f56a637e93f30d9e97..3626528414ab1fcf7485652996ed6260ce2f4a71 100644 (file)
@@ -144,7 +144,7 @@ static int gpencil_bone_skinnable_cb(Object *UNUSED(ob), Bone *bone, void *datap
        if (!(bone->flag & BONE_HIDDEN_P)) {
                if (!(bone->flag & BONE_NO_DEFORM)) {
                        if (data->heat && data->armob->pose &&
-                               BKE_pose_channel_find_name(data->armob->pose, bone->name))
+                           BKE_pose_channel_find_name(data->armob->pose, bone->name))
                        {
                                segments = bone->segments;
                        }
@@ -157,7 +157,7 @@ static int gpencil_bone_skinnable_cb(Object *UNUSED(ob), Bone *bone, void *datap
 
                                for (a = 0; a < segments; a++) {
                                        **hbone = bone;
-                                       ++*hbone;
+                                       (*hbone)++;
                                }
                        }
                        return segments;
@@ -214,7 +214,7 @@ static int dgroup_skinnable_cb(Object *ob, Bone *bone, void *datap)
        if (!(bone->flag & BONE_HIDDEN_P)) {
                if (!(bone->flag & BONE_NO_DEFORM)) {
                        if (data->heat && data->armob->pose &&
-                               BKE_pose_channel_find_name(data->armob->pose, bone->name))
+                           BKE_pose_channel_find_name(data->armob->pose, bone->name))
                        {
                                segments = bone->segments;
                        }
@@ -237,7 +237,7 @@ static int dgroup_skinnable_cb(Object *ob, Bone *bone, void *datap)
 
                                for (a = 0; a < segments; a++) {
                                        **hgroup = defgroup;
-                                       ++*hgroup;
+                                       (*hgroup)++;
                                }
                        }
                        return segments;
@@ -319,7 +319,7 @@ static void gpencil_add_verts_to_dgroups(
                        bbone = NULL;
 
                        if ((ob_arm->pose) &&
-                               (pchan = BKE_pose_channel_find_name(ob_arm->pose, bone->name)))
+                           (pchan = BKE_pose_channel_find_name(ob_arm->pose, bone->name)))
                        {
                                if (bone->segments > 1) {
                                        segments = bone->segments;
@@ -366,7 +366,7 @@ static void gpencil_add_verts_to_dgroups(
 
                for (bGPDframe *gpf = init_gpf; gpf; gpf = gpf->next) {
                        if ((gpf == gpl->actframe) ||
-                               ((gpf->flag & GP_FRAME_SELECT) && (is_multiedit)))
+                           ((gpf->flag & GP_FRAME_SELECT) && (is_multiedit)))
                        {
 
                                if (gpf == NULL)
@@ -463,8 +463,9 @@ static void gpencil_object_vgroup_calc_from_armature(
        /* Traverse the bone list, trying to create empty vertex
                * groups corresponding to the bone.
                */
-       defbase_add = gpencil_bone_looper(ob, arm->bonebase.first, NULL,
-                                                                       vgroup_add_unique_bone_cb);
+       defbase_add = gpencil_bone_looper(
+               ob, arm->bonebase.first, NULL,
+               vgroup_add_unique_bone_cb);
 
        if (defbase_add) {
                /* its possible there are DWeight's outside the range of the current
@@ -493,11 +494,12 @@ bool ED_gpencil_add_armature_weights(
        /* if no armature modifier, add a new one */
        GpencilModifierData *md = BKE_gpencil_modifiers_findByType(ob, eGpencilModifierType_Armature);
        if (md == NULL) {
-               md = ED_object_gpencil_modifier_add(reports, bmain, scene,
-                                                                               ob, "Armature", eGpencilModifierType_Armature);
+               md = ED_object_gpencil_modifier_add(
+                       reports, bmain, scene,
+                       ob, "Armature", eGpencilModifierType_Armature);
                if (md == NULL) {
                        BKE_report(reports, RPT_ERROR,
-                               "Unable to add a new Armature modifier to object");
+                                  "Unable to add a new Armature modifier to object");
                        return false;
                }
                DEG_id_tag_update(&ob->id, OB_RECALC_OB | OB_RECALC_DATA);
@@ -511,7 +513,7 @@ bool ED_gpencil_add_armature_weights(
        else {
                if (ob_arm != mmd->object) {
                        BKE_report(reports, RPT_ERROR,
-                               "The existing Armature modifier is already using a different Armature object");
+                                  "The existing Armature modifier is already using a different Armature object");
                        return false;
                }
        }
@@ -586,7 +588,7 @@ static int gpencil_generate_weights_exec(bContext *C, wmOperator *op)
 
        if (ob_arm == NULL) {
                BKE_report(op->reports, RPT_ERROR,
-                               "No Armature object in the view layer");
+                          "No Armature object in the view layer");
                return OPERATOR_CANCELLED;
        }
 
index 2ff7e45d7a263a5e8d3bdeab004ca6b1fe0a6cea..6aeaa04f2bd924db0f50ec284742182447767e41 100644 (file)
@@ -248,7 +248,7 @@ static void gp_draw_datablock(tGPDfill *tgpf, float ink[4])
 
                        /* normal strokes */
                        if ((tgpf->fill_draw_mode == GP_FILL_DMODE_STROKE) ||
-                               (tgpf->fill_draw_mode == GP_FILL_DMODE_BOTH))
+                           (tgpf->fill_draw_mode == GP_FILL_DMODE_BOTH))
                        {
                                ED_gp_draw_fill(&tgpw);
 
@@ -256,7 +256,7 @@ static void gp_draw_datablock(tGPDfill *tgpf, float ink[4])
 
                        /* 3D Lines with basic shapes and invisible lines */
                        if ((tgpf->fill_draw_mode == GP_FILL_DMODE_CONTROL) ||
-                               (tgpf->fill_draw_mode == GP_FILL_DMODE_BOTH))
+                           (tgpf->fill_draw_mode == GP_FILL_DMODE_BOTH))
                        {
                                gp_draw_basic_stroke(tgpf, gps, tgpw.diff_mat, gps->flag & GP_STROKE_CYCLIC, ink,
                                        tgpf->flag, tgpf->fill_threshold);
@@ -676,7 +676,7 @@ static  void gpencil_get_outline_points(tGPDfill *tgpf)
                int cur_back_offset = -1;
                for (int i = 0; i < NEIGHBOR_COUNT; i++) {
                        if (backtracked_offset[0][0] == offset[i][0] &&
-                               backtracked_offset[0][1] == offset[i][1])
+                           backtracked_offset[0][1] == offset[i][1])
                        {
                                /* Finding the bracktracked pixel offset index */
                                cur_back_offset = i;
@@ -710,7 +710,7 @@ static  void gpencil_get_outline_points(tGPDfill *tgpf)
                }
                /* current pixel is equal to starting pixel */
                if (boundary_co[0] == start_co[0] &&
-                       boundary_co[1] == start_co[1])
+                   boundary_co[1] == start_co[1])
                {
                        BLI_stack_pop(tgpf->stack, &v);
                        // boundary_found = true;
@@ -758,9 +758,9 @@ static void gpencil_get_depth_array(tGPDfill *tgpf)
                        copy_v2_v2_int(mval, &ptc->x);
 
                        if ((ED_view3d_autodist_depth(
-                               tgpf->ar, mval, depth_margin, tgpf->depth_arr + i) == 0) &&
-                               (i && (ED_view3d_autodist_depth_seg(
-                                       tgpf->ar, mval, mval_prev, depth_margin + 1, tgpf->depth_arr + i) == 0)))
+                                    tgpf->ar, mval, depth_margin, tgpf->depth_arr + i) == 0) &&
+                           (i && (ED_view3d_autodist_depth_seg(
+                                          tgpf->ar, mval, mval_prev, depth_margin + 1, tgpf->depth_arr + i) == 0)))
                        {
                                interp_depth = true;
                        }
index f000eac5f94aa00be8b992434fe8486ef4446001..807fa94fa8a45c45b18575428a058a08f54a1305 100644 (file)
@@ -639,7 +639,7 @@ static short gp_stroke_addpoint(
                }
                /* apply randomness to pressure */
                if ((brush->gpencil_settings->flag & GP_BRUSH_GROUP_RANDOM) &&
-                       (brush->gpencil_settings->draw_random_press > 0.0f))
+                   (brush->gpencil_settings->draw_random_press > 0.0f))
                {
                        float curvef = curvemapping_evaluateF(brush->gpencil_settings->curve_sensitivity, 0, pressure);
                        float tmp_pressure = curvef * brush->gpencil_settings->draw_sensitivity;
@@ -668,7 +668,7 @@ static short gp_stroke_addpoint(
 
                /* apply angle of stroke to brush size */
                if ((brush->gpencil_settings->flag & GP_BRUSH_GROUP_RANDOM) &&
-                       (brush->gpencil_settings->draw_angle_factor > 0.0f))
+                   (brush->gpencil_settings->draw_angle_factor > 0.0f))
                {
                        gp_brush_angle(gpd, brush, pt, mval);
                }
@@ -687,7 +687,7 @@ static short gp_stroke_addpoint(
 
                /* apply randomness to color strength */
                if ((brush->gpencil_settings->flag & GP_BRUSH_GROUP_RANDOM) &&
-                       (brush->gpencil_settings->draw_random_strength > 0.0f))
+                   (brush->gpencil_settings->draw_random_strength > 0.0f))
                {
                        if (BLI_rng_get_float(p->rng) > 0.5f) {
                                pt->strength -= pt->strength * brush->gpencil_settings->draw_random_strength * BLI_rng_get_float(p->rng);
@@ -1109,7 +1109,7 @@ static void gp_stroke_newfrombuffer(tGPsdata *p)
                                copy_v2_v2_int(mval, &ptc->x);
 
                                if ((ED_view3d_autodist_depth(p->ar, mval, depth_margin, depth_arr + i) == 0) &&
-                                       (i && (ED_view3d_autodist_depth_seg(p->ar, mval, mval_prev, depth_margin + 1, depth_arr + i) == 0)))
+                                   (i && (ED_view3d_autodist_depth_seg(p->ar, mval, mval_prev, depth_margin + 1, depth_arr + i) == 0)))
                                {
                                        interp_depth = true;
                                }
@@ -1185,7 +1185,7 @@ static void gp_stroke_newfrombuffer(tGPsdata *p)
                }
                /* apply randomness to stroke */
                if ((brush->gpencil_settings->flag & GP_BRUSH_GROUP_RANDOM) &&
-                       (brush->gpencil_settings->draw_random_sub > 0.0f))
+                   (brush->gpencil_settings->draw_random_sub > 0.0f))
                {
                        gp_randomize_stroke(gps, brush, p->rng);
                }
@@ -1195,7 +1195,7 @@ static void gp_stroke_newfrombuffer(tGPsdata *p)
                 * the original stroke
                 */
                if ((brush->gpencil_settings->flag & GP_BRUSH_GROUP_SETTINGS) &&
-                       (brush->gpencil_settings->draw_smoothfac > 0.0f))
+                   (brush->gpencil_settings->draw_smoothfac > 0.0f))
                {
                        float reduce = 0.0f;
                        for (int r = 0; r < brush->gpencil_settings->draw_smoothlvl; r++) {
@@ -1208,7 +1208,7 @@ static void gp_stroke_newfrombuffer(tGPsdata *p)
                }
                /* smooth thickness */
                if ((brush->gpencil_settings->flag & GP_BRUSH_GROUP_SETTINGS) &&
-                       (brush->gpencil_settings->thick_smoothfac > 0.0f))
+                   (brush->gpencil_settings->thick_smoothfac > 0.0f))
                {
                        for (int r = 0; r < brush->gpencil_settings->thick_smoothlvl * 2; r++) {
                                for (i = 0; i < gps->totpoints; i++) {
@@ -1276,7 +1276,7 @@ static bool gp_stroke_eraser_is_occluded(tGPsdata *p, const bGPDspoint *pt, cons
        Object *obact = (Object *)p->ownerPtr.data;
 
        if ((p->sa->spacetype == SPACE_VIEW3D) &&
-               (p->flags & GP_PAINTFLAG_V3D_ERASER_DEPTH))
+           (p->flags & GP_PAINTFLAG_V3D_ERASER_DEPTH))
        {
                RegionView3D *rv3d = p->ar->regiondata;
                bGPDlayer *gpl = p->gpl;
@@ -1448,7 +1448,7 @@ static void gp_stroke_eraser_dostroke(tGPsdata *p,
 
                        /* Check that point segment of the boundbox of the eraser stroke */
                        if (((!ELEM(V2D_IS_CLIPPED, pc1[0], pc1[1])) && BLI_rcti_isect_pt(rect, pc1[0], pc1[1])) ||
-                               ((!ELEM(V2D_IS_CLIPPED, pc2[0], pc2[1])) && BLI_rcti_isect_pt(rect, pc2[0], pc2[1])))
+                           ((!ELEM(V2D_IS_CLIPPED, pc2[0], pc2[1])) && BLI_rcti_isect_pt(rect, pc2[0], pc2[1])))
                        {
                                /* Check if point segment of stroke had anything to do with
                                 * eraser region  (either within stroke painted, or on its lines)
@@ -1456,7 +1456,7 @@ static void gp_stroke_eraser_dostroke(tGPsdata *p,
                                 */
                                if (gp_stroke_inside_circle(mval, mvalo, radius, pc1[0], pc1[1], pc2[0], pc2[1])) {
                                        if ((gp_stroke_eraser_is_occluded(p, pt1, pc1[0], pc1[1]) == false) ||
-                                               (gp_stroke_eraser_is_occluded(p, pt2, pc2[0], pc2[1]) == false))
+                                           (gp_stroke_eraser_is_occluded(p, pt2, pc2[0], pc2[1]) == false))
                                        {
                                                /* Point is affected: */
                                                /* 1) Adjust thickness
@@ -1468,13 +1468,13 @@ static void gp_stroke_eraser_dostroke(tGPsdata *p,
 
                                                /* 2) Tag any point with overly low influence for removal in the next pass */
                                                if ((pt1->pressure < cull_thresh) || (p->flags & GP_PAINTFLAG_HARD_ERASER) ||
-                                                       (eraser->gpencil_settings->eraser_mode == GP_BRUSH_ERASER_HARD))
+                                                   (eraser->gpencil_settings->eraser_mode == GP_BRUSH_ERASER_HARD))
                                                {
                                                        pt1->flag |= GP_SPOINT_TAG;
                                                        do_cull = true;
                                                }
                                                if ((pt2->pressure < cull_thresh) || (p->flags & GP_PAINTFLAG_HARD_ERASER) ||
-                                                       (eraser->gpencil_settings->eraser_mode == GP_BRUSH_ERASER_HARD))
+                                                   (eraser->gpencil_settings->eraser_mode == GP_BRUSH_ERASER_HARD))
                                                {
                                                        pt2->flag |= GP_SPOINT_TAG;
                                                        do_cull = true;
@@ -1587,7 +1587,7 @@ static Brush *gp_get_default_eraser(Main *bmain, ToolSettings *ts)
        Brush *brush_old = paint->brush;
        for (Brush *brush = bmain->brush.first; brush; brush = brush->id.next) {
                if ((brush->ob_mode == OB_MODE_GPENCIL_PAINT) &&
-                       (brush->gpencil_settings->brush_type == GP_BRUSH_TYPE_ERASE))
+                   (brush->gpencil_settings->brush_type == GP_BRUSH_TYPE_ERASE))
                {
                        /* save first eraser to use later if no default */
                        if (brush_dft == NULL) {
@@ -2293,7 +2293,7 @@ static void gpencil_draw_cursor_set(tGPsdata *p)
 {
        Brush *brush = p->brush;
        if ((p->paintmode == GP_PAINTMODE_ERASER) ||
-               (brush->gpencil_settings->brush_type == GP_BRUSH_TYPE_ERASE))
+           (brush->gpencil_settings->brush_type == GP_BRUSH_TYPE_ERASE))
        {
                WM_cursor_modal_set(p->win, BC_CROSSCURSOR);  /* XXX need a better cursor */
        }
@@ -2436,7 +2436,7 @@ static void gpencil_draw_apply(bContext *C, wmOperator *op, tGPsdata *p, Depsgra
                }
        }
        else if ((p->brush->gpencil_settings->flag & GP_BRUSH_STABILIZE_MOUSE_TEMP) &&
-               (gpd->runtime.sbuffer_size > 0))
+                (gpd->runtime.sbuffer_size > 0))
        {
                pt = (tGPspoint *)gpd->runtime.sbuffer + gpd->runtime.sbuffer_size - 1;
                if (p->paintmode != GP_PAINTMODE_ERASER) {
@@ -2942,7 +2942,7 @@ static int gpencil_draw_modal(bContext *C, wmOperator *op, const wmEvent *event)
         */
         /* if polyline and release shift must cancel */
        if ((ELEM(event->type, RETKEY, PADENTER, ESCKEY, SPACEKEY, EKEY)) ||
-               ((p->paintmode == GP_PAINTMODE_DRAW_POLY) && (event->shift == 0)))
+           ((p->paintmode == GP_PAINTMODE_DRAW_POLY) && (event->shift == 0)))
        {
                /* exit() ends the current stroke before cleaning up */
                /* printf("\t\tGP - end of paint op + end of stroke\n"); */
@@ -3140,7 +3140,7 @@ static int gpencil_draw_modal(bContext *C, wmOperator *op, const wmEvent *event)
                }
                /* eraser size */
                else if ((p->paintmode == GP_PAINTMODE_ERASER) &&
-                       ELEM(event->type, WHEELUPMOUSE, WHEELDOWNMOUSE, PADPLUSKEY, PADMINUS))
+                        ELEM(event->type, WHEELUPMOUSE, WHEELDOWNMOUSE, PADPLUSKEY, PADMINUS))
                {
                        /* just resize the brush (local version)
                         * TODO: fix the hardcoded size jumps (set to make a visible difference) and hardcoded keys
index 25dc6743a338b9f286a163d38c85e9315202df55..09095ede556896acee6984dfe2879904e15562a9 100644 (file)
@@ -195,8 +195,9 @@ int ED_gpencil_session_active(void);
 int ED_undo_gpencil_step(struct bContext *C, int step, const char *name);
 
 /* ------------ Grease-Pencil Armature weights ------------------ */
-bool ED_gpencil_add_armature_weights(const struct bContext *C, struct ReportList *reports,
-                                                                       struct Object *ob, struct Object *ob_arm, int mode);
+bool ED_gpencil_add_armature_weights(
+        const struct bContext *C, struct ReportList *reports,
+        struct Object *ob, struct Object *ob_arm, int mode);
 
 /* keep this aligned with gpencil_armature enum */
 #define GP_PAR_ARMATURE_NAME     0
index 936ab038ec705a7df56116f78344d5749661a3e1..37a2fc8edb5efa2794d71b6dc1f7a024d2b0874f 100644 (file)
@@ -2325,11 +2325,11 @@ static int edbm_do_smooth_laplacian_vertex_exec(bContext *C, wmOperator *op)
        }
        MEM_freeN(objects);
 
-       if (tot_unselected == objects_len){
+       if (tot_unselected == objects_len) {
                BKE_report(op->reports, RPT_WARNING, "No selected vertex");
                return OPERATOR_CANCELLED;
        }
-       else if (tot_invalid == objects_len){
+       else if (tot_invalid == objects_len) {
                BKE_report(op->reports, RPT_WARNING, "Selected faces must be triangles or quads");
                return OPERATOR_CANCELLED;
        }
@@ -3076,9 +3076,9 @@ static int edbm_shape_propagate_to_all_exec(bContext *C, wmOperator *op)
                }
                tot_selected_verts_objects++;
 
-               if (shape_propagate(em)){
+               if (shape_propagate(em)) {
                        tot_shapekeys++;
-               };
+               }
 
                EDBM_update_generic(em, false, false);
        }
@@ -3088,12 +3088,13 @@ static int edbm_shape_propagate_to_all_exec(bContext *C, wmOperator *op)
                BKE_report(op->reports, RPT_ERROR, "No selected vertex");
                return OPERATOR_CANCELLED;
        }
-       else if (tot_shapekeys == 0){
-               BKE_report(op->reports,
-                          RPT_ERROR,
-                          objects_len > 1 ?
-                              "Meshes do not have shape keys" :
-                              "Mesh does not have shape keys");
+       else if (tot_shapekeys == 0) {
+               BKE_report(
+                       op->reports,
+                       RPT_ERROR,
+                       objects_len > 1 ?
+                       "Meshes do not have shape keys" :
+                       "Mesh does not have shape keys");
                return OPERATOR_CANCELLED;
        }
 
index e022d65de63e60c634fdea86d72fca8eddf56fa5..3e92c736db7dbae588d55335acd64dcd267016b3 100644 (file)
@@ -803,7 +803,7 @@ bool ED_object_parent_set(ReportList *reports, const bContext *C, Scene *scene,
                                        ED_gpencil_add_armature_weights(C, reports, ob, par, GP_PAR_ARMATURE_NAME);
                                }
                                else if ((partype == PAR_ARMATURE_AUTO) ||
-                                       (partype == PAR_ARMATURE_ENVELOPE))
+                                        (partype == PAR_ARMATURE_ENVELOPE))
                                {
                                        WM_cursor_wait(1);
                                        ED_gpencil_add_armature_weights(C, reports, ob, par, GP_PAR_ARMATURE_AUTO);
index 36fc23b35c9ab86820ae54c06714c3088106bcd7..c33d71b97752f0f73d0909093f8766c1bb34ef24 100644 (file)
@@ -321,11 +321,11 @@ static int snap_selected_to_location(bContext *C, const float snap_target_global
 
                        for (pchan = ob->pose->chanbase.first; pchan; pchan = pchan->next) {
                                if ((pchan->bone->flag & BONE_SELECTED) &&
-                                       (PBONE_VISIBLE(arm, pchan->bone)) &&
-                                       /* if the bone has a parent and is connected to the parent,
-                                        * don't do anything - will break chain unless we do auto-ik.
-                                        */
-                                       (pchan->bone->flag & BONE_CONNECTED) == 0)
+                                   (PBONE_VISIBLE(arm, pchan->bone)) &&
+                                   /* if the bone has a parent and is connected to the parent,
+                                    * don't do anything - will break chain unless we do auto-ik.
+                                    */
+                                   (pchan->bone->flag & BONE_CONNECTED) == 0)
                                {
                                        pchan->bone->flag |= BONE_TRANSFORM;
                                }
@@ -336,9 +336,9 @@ static int snap_selected_to_location(bContext *C, const float snap_target_global
 
                        for (pchan = ob->pose->chanbase.first; pchan; pchan = pchan->next) {
                                if ((pchan->bone->flag & BONE_TRANSFORM) &&
-                                       /* check that our parents not transformed (if we have one) */
-                                       ((pchan->bone->parent &&
-                                         BKE_armature_bone_flag_test_recursive(pchan->bone->parent, BONE_TRANSFORM)) == 0))
+                                   /* check that our parents not transformed (if we have one) */
+                                   ((pchan->bone->parent &&
+                                     BKE_armature_bone_flag_test_recursive(pchan->bone->parent, BONE_TRANSFORM)) == 0))
                                {
                                        /* Get position in pchan (pose) space. */
                                        float cursor_pose[3];
index 4ae48e73d0fc3a97277473c4a239365ef9a02897..5bab95cf6f620565b87d5369349c3bfa8550aa80 100644 (file)
@@ -92,12 +92,13 @@ static void gpencil_deform_verts(
        }
 
        /* deform verts */
-       armature_deform_verts(mmd->object, target, NULL,
-                                               (float(*)[3])all_vert_coords,
-                                               NULL, gps->totpoints,
-                                               mmd->deformflag,
-                                               (float(*)[3])mmd->prevCos,
-                                               mmd->vgname, gps);
+       armature_deform_verts(
+               mmd->object, target, NULL,
+               (float(*)[3])all_vert_coords,
+               NULL, gps->totpoints,
+               mmd->deformflag,
+               (float(*)[3])mmd->prevCos,
+               mmd->vgname, gps);
 
        /* Apply deformed coordinates */
        pt = gps->points;
index 3ba53250abde79c29c55b9bb851cc1181695d69d..2e91c51d3da341441bc2312fc641f261fdca64d5 100644 (file)
@@ -70,9 +70,10 @@ static void deformStroke(
 {
        SubdivGpencilModifierData *mmd = (SubdivGpencilModifierData *)md;
 
-       if (!is_stroke_affected_by_modifier(ob,
-               mmd->layername, mmd->pass_index, 3, gpl, gps,
-               mmd->flag & GP_SUBDIV_INVERT_LAYER, mmd->flag & GP_SUBDIV_INVERT_PASS))
+       if (!is_stroke_affected_by_modifier(
+                   ob,
+                   mmd->layername, mmd->pass_index, 3, gpl, gps,
+                   mmd->flag & GP_SUBDIV_INVERT_LAYER, mmd->flag & GP_SUBDIV_INVERT_PASS))
        {
                return;
        }