style cleanup: switch statements, include break statements within braces & indent.
authorCampbell Barton <ideasman42@gmail.com>
Fri, 19 Jul 2013 15:23:42 +0000 (15:23 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Fri, 19 Jul 2013 15:23:42 +0000 (15:23 +0000)
also indent case's within the switch (we already did both of these almost everywhere)

55 files changed:
source/blender/blenkernel/intern/action.c
source/blender/blenkernel/intern/armature.c
source/blender/blenkernel/intern/colortools.c
source/blender/blenkernel/intern/constraint.c
source/blender/blenkernel/intern/fcurve.c
source/blender/blenkernel/intern/fmodifier.c
source/blender/blenkernel/intern/ipo.c
source/blender/blenkernel/intern/linestyle.c
source/blender/blenkernel/intern/material.c
source/blender/blenkernel/intern/node.c
source/blender/blenkernel/intern/object.c
source/blender/blenkernel/intern/writeffmpeg.c
source/blender/blenlib/intern/DLRB_tree.c
source/blender/compositor/intern/COM_ExecutionGroup.cpp
source/blender/editors/animation/anim_channels_defines.c
source/blender/editors/animation/anim_channels_edit.c
source/blender/editors/animation/anim_draw.c
source/blender/editors/animation/anim_filter.c
source/blender/editors/animation/drivers.c
source/blender/editors/animation/fmodifier_ui.c
source/blender/editors/animation/keyframes_draw.c
source/blender/editors/animation/keyframing.c
source/blender/editors/animation/keyingsets.c
source/blender/editors/armature/pose_slide.c
source/blender/editors/gpencil/drawgpencil.c
source/blender/editors/gpencil/gpencil_edit.c
source/blender/editors/gpencil/gpencil_paint.c
source/blender/editors/interface/view2d.c
source/blender/editors/interface/view2d_ops.c
source/blender/editors/object/object_lattice.c
source/blender/editors/object/object_relations.c
source/blender/editors/render/render_shading.c
source/blender/editors/screen/screen_ops.c
source/blender/editors/space_action/action_draw.c
source/blender/editors/space_action/action_select.c
source/blender/editors/space_clip/space_clip.c
source/blender/editors/space_graph/graph_buttons.c
source/blender/editors/space_graph/space_graph.c
source/blender/editors/space_nla/nla_buttons.c
source/blender/editors/space_nla/nla_channels.c
source/blender/editors/space_nla/nla_draw.c
source/blender/editors/space_node/node_draw.c
source/blender/editors/space_node/node_templates.c
source/blender/editors/space_outliner/outliner_draw.c
source/blender/editors/space_outliner/outliner_edit.c
source/blender/editors/space_outliner/outliner_tools.c
source/blender/editors/space_outliner/outliner_tree.c
source/blender/editors/space_time/space_time.c
source/blender/editors/space_view3d/drawarmature.c
source/blender/editors/transform/transform.c
source/blender/editors/transform/transform_constraints.c
source/blender/makesrna/intern/rna_color.c
source/blender/makesrna/intern/rna_object.c
source/blender/nodes/shader/nodes/node_shader_math.c
source/blender/windowmanager/intern/wm_event_system.c

index fa85f6e4f86e8d214992df23b5a57b5990c9a00f..70fbf2d39e8584ce7fb8beabe7d58b6353b747f8 100644 (file)
@@ -930,9 +930,8 @@ void calc_action_range(const bAction *act, float *start, float *end, short incl_
                                                if (fmd->flag & FCM_LIMIT_XMAX) {
                                                        max = max_ff(max, fmd->rect.xmax);
                                                }
+                                               break;
                                        }
-                                       break;
-                                               
                                        case FMODIFIER_TYPE_CYCLES: /* Cycles F-Modifier */
                                        {
                                                FMod_Cycles *fmd = (FMod_Cycles *)fcm->data;
@@ -941,9 +940,8 @@ void calc_action_range(const bAction *act, float *start, float *end, short incl_
                                                        min = MINAFRAMEF;
                                                if (fmd->after_mode != FCM_EXTRAPOLATE_NONE)
                                                        max = MAXFRAMEF;
+                                               break;
                                        }
-                                       break;
-                                               
                                        /* TODO: function modifier may need some special limits */
                                                
                                        default: /* all other standard modifiers are on the infinite range... */
index 8fae35864390a21d3324c789f3a5d6c4f17535e9..2ede5acd6e94d58843e79a65a98a0f86c9097dd9 100644 (file)
@@ -2100,8 +2100,8 @@ static void splineik_evaluate_bone(tSplineIK_Tree *tree, Scene *scene, Object *o
                                /* z-axis scale */
                                scale = len_v3(pchan->pose_mat[2]);
                                mul_v3_fl(poseMat[2], scale);
+                               break;
                        }
-                       break;
                        case CONSTRAINT_SPLINEIK_XZS_VOLUMETRIC:
                        {
                                /* 'volume preservation' */
@@ -2123,8 +2123,8 @@ static void splineik_evaluate_bone(tSplineIK_Tree *tree, Scene *scene, Object *o
                                /* apply the scaling */
                                mul_v3_fl(poseMat[0], scale);
                                mul_v3_fl(poseMat[2], scale);
+                               break;
                        }
-                       break;
                }
 
                /* finally, multiply the x and z scaling by the radius of the curve too,
index 9323531e5fe0ea6194a75bfef2c39994caf31909..7e878e86c1e00ebc8bbbf334704f274c3b350d51 100644 (file)
@@ -328,8 +328,8 @@ void curvemap_reset(CurveMap *cuma, const rctf *clipr, int preset, int slope)
                                cuma->curve[i].x = i / ((float)cuma->totpoint - 1);
                                cuma->curve[i].y = 0.5;
                        }
+                       break;
                }
-               break;
                case CURVE_PRESET_ROUND:
                        cuma->curve[0].x = 0;
                        cuma->curve[0].y = 1;
index c78038c0f6673a7acfd92628a1fb562eea0b4510..b8d851d082ac15b077b74de576a38c44f343223a 100644 (file)
@@ -132,8 +132,8 @@ bConstraintOb *BKE_constraints_make_evalob(Scene *scene, Object *ob, void *subda
                                unit_m4(cob->matrix);
                        
                        copy_m4_m4(cob->startmat, cob->matrix);
+                       break;
                }
-               break;
                case CONSTRAINT_OBTYPE_BONE:
                {
                        /* only set if we have valid bone, otherwise default */
@@ -158,9 +158,8 @@ bConstraintOb *BKE_constraints_make_evalob(Scene *scene, Object *ob, void *subda
                                unit_m4(cob->matrix);
                                
                        copy_m4_m4(cob->startmat, cob->matrix);
+                       break;
                }
-               break;
-                       
                default: /* other types not yet handled */
                        unit_m4(cob->matrix);
                        unit_m4(cob->startmat);
@@ -195,8 +194,8 @@ void BKE_constraints_clear_evalob(bConstraintOb *cob)
                                /* copy inverse of delta back to owner */
                                invert_m4_m4(cob->ob->constinv, delta);
                        }
+                       break;
                }
-               break;
                case CONSTRAINT_OBTYPE_BONE:
                {
                        /* cob->ob or cob->pchan might not exist */
@@ -207,8 +206,8 @@ void BKE_constraints_clear_evalob(bConstraintOb *cob)
                                /* copy inverse of delta back to owner */
                                invert_m4_m4(cob->pchan->constinv, delta);
                        }
+                       break;
                }
-               break;
        }
        
        /* free tempolary struct */
@@ -246,8 +245,8 @@ void BKE_constraint_mat_convertspace(Object *ob, bPoseChannel *pchan, float mat[
                                        /* call self with slightly different values */
                                        BKE_constraint_mat_convertspace(ob, pchan, mat, CONSTRAINT_SPACE_POSE, to);
                                }
+                               break;
                        }
-                       break;
                        case CONSTRAINT_SPACE_POSE: /* ---------- FROM POSESPACE ---------- */
                        {
                                /* pose to world */
@@ -267,8 +266,8 @@ void BKE_constraint_mat_convertspace(Object *ob, bPoseChannel *pchan, float mat[
                                                mul_m4_m4m4(mat, imat, mat);
                                        }
                                }
+                               break;
                        }
-                       break;
                        case CONSTRAINT_SPACE_LOCAL: /* ------------ FROM LOCALSPACE --------- */
                        {
                                /* local to pose - do inverse procedure that was done for pose to local */
@@ -282,8 +281,8 @@ void BKE_constraint_mat_convertspace(Object *ob, bPoseChannel *pchan, float mat[
                                        /* call self with slightly different values */
                                        BKE_constraint_mat_convertspace(ob, pchan, mat, CONSTRAINT_SPACE_POSE, to);
                                }
+                               break;
                        }
-                       break;
                        case CONSTRAINT_SPACE_PARLOCAL: /* -------------- FROM LOCAL WITH PARENT ---------- */
                        {
                                /* local + parent to pose */
@@ -297,8 +296,8 @@ void BKE_constraint_mat_convertspace(Object *ob, bPoseChannel *pchan, float mat[
                                        /* call self with slightly different values */
                                        BKE_constraint_mat_convertspace(ob, pchan, mat, CONSTRAINT_SPACE_POSE, to);
                                }
+                               break;
                        }
-                       break;
                }
        }
        else {
@@ -2235,8 +2234,8 @@ static void locktrack_evaluate(bConstraint *con, bConstraintOb *cob, ListBase *t
                                        
                                                /* the z axis gets mapped onto a third orthogonal vector */
                                                cross_v3_v3v3(totmat[2], totmat[0], totmat[1]);
+                                               break;
                                        }
-                                       break;
                                        case TRACK_Z: /* LOCK X TRACK Z */
                                        {
                                                /* Projection of Vector on the plane */
@@ -2249,8 +2248,8 @@ static void locktrack_evaluate(bConstraint *con, bConstraintOb *cob, ListBase *t
                                        
                                                /* the z axis gets mapped onto a third orthogonal vector */
                                                cross_v3_v3v3(totmat[1], totmat[2], totmat[0]);
+                                               break;
                                        }
-                                       break;
                                        case TRACK_nY: /* LOCK X TRACK -Y */
                                        {
                                                /* Projection of Vector on the plane */
@@ -2264,8 +2263,8 @@ static void locktrack_evaluate(bConstraint *con, bConstraintOb *cob, ListBase *t
                                        
                                                /* the z axis gets mapped onto a third orthogonal vector */
                                                cross_v3_v3v3(totmat[2], totmat[0], totmat[1]);
+                                               break;
                                        }
-                                       break;
                                        case TRACK_nZ: /* LOCK X TRACK -Z */
                                        {
                                                /* Projection of Vector on the plane */
@@ -2279,16 +2278,16 @@ static void locktrack_evaluate(bConstraint *con, bConstraintOb *cob, ListBase *t
                                                
                                                /* the z axis gets mapped onto a third orthogonal vector */
                                                cross_v3_v3v3(totmat[1], totmat[2], totmat[0]);
+                                               break;
                                        }
-                                       break;
                                        default:
                                        {
                                                unit_m3(totmat);
+                                               break;
                                        }
-                                       break;
                                }
+                               break;
                        }
-                       break;
                        case LOCK_Y: /* LOCK Y */
                        {
                                switch (data->trackflag) {
@@ -2304,8 +2303,8 @@ static void locktrack_evaluate(bConstraint *con, bConstraintOb *cob, ListBase *t
 
                                                /* the z axis gets mapped onto a third orthogonal vector */
                                                cross_v3_v3v3(totmat[2], totmat[0], totmat[1]);
+                                               break;
                                        }
-                                       break;
                                        case TRACK_Z: /* LOCK Y TRACK Z */
                                        {
                                                /* Projection of Vector on the plane */
@@ -2318,8 +2317,8 @@ static void locktrack_evaluate(bConstraint *con, bConstraintOb *cob, ListBase *t
                                        
                                                /* the z axis gets mapped onto a third orthogonal vector */
                                                cross_v3_v3v3(totmat[0], totmat[1], totmat[2]);
+                                               break;
                                        }
-                                       break;
                                        case TRACK_nX: /* LOCK Y TRACK -X */
                                        {
                                                /* Projection of Vector on the plane */
@@ -2333,8 +2332,8 @@ static void locktrack_evaluate(bConstraint *con, bConstraintOb *cob, ListBase *t
                                        
                                                /* the z axis gets mapped onto a third orthogonal vector */
                                                cross_v3_v3v3(totmat[2], totmat[0], totmat[1]);
+                                               break;
                                        }
-                                       break;
                                        case TRACK_nZ: /* LOCK Y TRACK -Z */
                                        {
                                                /* Projection of Vector on the plane */
@@ -2348,16 +2347,16 @@ static void locktrack_evaluate(bConstraint *con, bConstraintOb *cob, ListBase *t
                                        
                                                /* the z axis gets mapped onto a third orthogonal vector */
                                                cross_v3_v3v3(totmat[0], totmat[1], totmat[2]);
+                                               break;
                                        }
-                                       break;
                                        default:
                                        {
                                                unit_m3(totmat);
+                                               break;
                                        }
-                                       break;
                                }
+                               break;
                        }
-                       break;
                        case LOCK_Z: /* LOCK Z */
                        {
                                switch (data->trackflag) {
@@ -2373,8 +2372,8 @@ static void locktrack_evaluate(bConstraint *con, bConstraintOb *cob, ListBase *t
                                        
                                                /* the x axis gets mapped onto a third orthogonal vector */
                                                cross_v3_v3v3(totmat[1], totmat[2], totmat[0]);
+                                               break;
                                        }
-                                       break;
                                        case TRACK_Y: /* LOCK Z TRACK Y */
                                        {
                                                /* Projection of Vector on the plane */
@@ -2387,8 +2386,8 @@ static void locktrack_evaluate(bConstraint *con, bConstraintOb *cob, ListBase *t
                                                
                                                /* the x axis gets mapped onto a third orthogonal vector */
                                                cross_v3_v3v3(totmat[0], totmat[1], totmat[2]);
+                                               break;
                                        }
-                                       break;
                                        case TRACK_nX: /* LOCK Z TRACK -X */
                                        {
                                                /* Projection of Vector on the plane */
@@ -2402,8 +2401,8 @@ static void locktrack_evaluate(bConstraint *con, bConstraintOb *cob, ListBase *t
                                        
                                                /* the x axis gets mapped onto a third orthogonal vector */
                                                cross_v3_v3v3(totmat[1], totmat[2], totmat[0]);
+                                               break;
                                        }
-                                       break;
                                        case TRACK_nY: /* LOCK Z TRACK -Y */
                                        {
                                                /* Projection of Vector on the plane */
@@ -2417,21 +2416,21 @@ static void locktrack_evaluate(bConstraint *con, bConstraintOb *cob, ListBase *t
                                                
                                                /* the x axis gets mapped onto a third orthogonal vector */
                                                cross_v3_v3v3(totmat[0], totmat[1], totmat[2]);
+                                               break;
                                        }
-                                       break;
                                        default:
                                        {
                                                unit_m3(totmat);
+                                               break;
                                        }
-                                       break;
                                }
+                               break;
                        }
-                       break;
                        default:
                        {
                                unit_m3(totmat);
+                               break;
                        }
-                       break;
                }
                /* Block to keep matrix heading */
                copy_m3_m4(tmpmat, cob->matrix);
@@ -4414,8 +4413,8 @@ static bConstraint *add_new_constraint(Object *ob, bPoseChannel *pchan, const ch
                                con->ownspace = CONSTRAINT_SPACE_POSE;
                                con->flag |= CONSTRAINT_SPACEONCE;
                        }
+                       break;
                }
-               break;
        }
        
        return con;
@@ -4640,8 +4639,8 @@ void BKE_get_constraint_target_matrix(Scene *scene, bConstraint *con, int index,
                                        unit_m4(cob->matrix);
                                        unit_m4(cob->startmat);
                                }
+                               break;
                        }
-                       break;
                        case CONSTRAINT_OBTYPE_BONE: /* this may occur in some cases */
                        {
                                cob->ob = NULL; /* this might not work at all :/ */
@@ -4654,8 +4653,8 @@ void BKE_get_constraint_target_matrix(Scene *scene, bConstraint *con, int index,
                                        unit_m4(cob->matrix);
                                        unit_m4(cob->startmat);
                                }
+                               break;
                        }
-                       break;
                }
                
                /* get targets - we only need the first one though (and there should only be one) */
index bd282095c333943a10d8634c2f88dbd82361b0cb..55a312f31ba9a384e61ec3f4a2e5e71871dee515 100644 (file)
@@ -667,17 +667,16 @@ short fcurve_are_keyframes_usable(FCurve *fcu)
                                        
                                        if ((data->flag & FCM_GENERATOR_ADDITIVE) == 0)
                                                return 0;
+                                       break;
                                }
-                               break;
                                case FMODIFIER_TYPE_FN_GENERATOR:
                                {
                                        FMod_FunctionGenerator *data = (FMod_FunctionGenerator *)fcm->data;
                                        
                                        if ((data->flag & FCM_GENERATOR_ADDITIVE) == 0)
                                                return 0;
+                                       break;
                                }
-                               break;
-                                       
                                /* always harmful - cannot allow */
                                default:
                                        return 0;
@@ -1703,9 +1702,8 @@ static float evaluate_driver(ChannelDriver *driver, const float evaltime)
                                else
                                        driver->curval = value;
                        }
+                       break;
                }
-               break;
-                       
                case DRIVER_TYPE_MIN: /* smallest value */
                case DRIVER_TYPE_MAX: /* largest value */
                {
@@ -1738,9 +1736,8 @@ static float evaluate_driver(ChannelDriver *driver, const float evaltime)
                        
                        /* store value in driver */
                        driver->curval = value;
+                       break;
                }
-               break;
-                       
                case DRIVER_TYPE_PYTHON: /* expression */
                {
 #ifdef WITH_PYTHON
@@ -1759,9 +1756,8 @@ static float evaluate_driver(ChannelDriver *driver, const float evaltime)
 #else /* WITH_PYTHON*/
                        (void)evaltime;
 #endif /* WITH_PYTHON*/
+                       break;
                }
-               break;
-               
                default:
                {
                        /* special 'hack' - just use stored value 
index 19912a19d943cbe5ef91d4a340a4cc60c903d1ce..234f8667632b1db20875c0376d79985a91d0333d 100644 (file)
@@ -213,9 +213,8 @@ static void fcm_generator_evaluate(FCurve *UNUSED(fcu), FModifier *fcm, float *c
                        /* cleanup */
                        if (powers) 
                                MEM_freeN(powers);
+                       break;
                }
-               break;
-                       
                case FCM_GENERATOR_POLYNOMIAL_FACTORISED: /* Factorized polynomial */
                {
                        float value = 1.0f, *cp = NULL;
@@ -232,8 +231,8 @@ static void fcm_generator_evaluate(FCurve *UNUSED(fcu), FModifier *fcm, float *c
                                else
                                        *cvalue = value;
                        }
+                       break;
                }
-               break;
        }
 }
 
@@ -316,8 +315,8 @@ static void fcm_fn_generator_evaluate(FCurve *UNUSED(fcu), FModifier *fcm, float
                        }
                        else
                                fn = tan;
+                       break;
                }
-               break;
                case FCM_GENERATOR_FN_LN: /* natural log */
                {
                        /* check that value is greater than 1? */
@@ -328,8 +327,8 @@ static void fcm_fn_generator_evaluate(FCurve *UNUSED(fcu), FModifier *fcm, float
                                if ((data->flag & FCM_GENERATOR_ADDITIVE) == 0)
                                        *cvalue = 0.0f;  /* no value possible here */
                        }
+                       break;
                }
-               break;
                case FCM_GENERATOR_FN_SQRT: /* square root */
                {
                        /* no negative numbers */
@@ -340,9 +339,8 @@ static void fcm_fn_generator_evaluate(FCurve *UNUSED(fcu), FModifier *fcm, float
                                if ((data->flag & FCM_GENERATOR_ADDITIVE) == 0)
                                        *cvalue = 0.0f;  /* no value possible here */
                        }
+                       break;
                }
-               break;
-               
                default:
                        printf("Invalid Function-Generator for F-Modifier - %d\n", data->type);
        }
index 10226ade786c12d7e82cf52836d115721e2d56f5..ecc4a03d2551e8c436ce4239e6a8baf7d21aa1f7 100644 (file)
@@ -1174,9 +1174,8 @@ static void icu_to_fcurves(ID *id, ListBase *groups, ListBase *list, IpoCurve *i
                {
                        /* just copy, as the new defines match the old ones... */
                        fcu->extend = icu->extrap;
+                       break;
                }
-               break;
-                       
                case IPO_CYCL: /* cyclic extrapolation */
                case IPO_CYCLX: /* cyclic extrapolation + offset */
                {
@@ -1191,8 +1190,8 @@ static void icu_to_fcurves(ID *id, ListBase *groups, ListBase *list, IpoCurve *i
                                data->before_mode = data->after_mode = FCM_EXTRAPOLATE_CYCLIC_OFFSET;
                        else
                                data->before_mode = data->after_mode = FCM_EXTRAPOLATE_CYCLIC;
+                       break;
                }
-               break;
        }
        
        /* -------- */
index 3ab1a8093bee6333a6f9bbb9288a768cf4675fa5..497554be11347ed6c667942bafcda6ee18e6ae09 100644 (file)
@@ -201,20 +201,20 @@ static LineStyleModifier *alloc_color_modifier(int type)
        size_t size;
 
        switch (type) {
-       case LS_MODIFIER_ALONG_STROKE:
-               size = sizeof(LineStyleColorModifier_AlongStroke);
-               break;
-       case LS_MODIFIER_DISTANCE_FROM_CAMERA:
-               size = sizeof(LineStyleColorModifier_DistanceFromCamera);
-               break;
-       case LS_MODIFIER_DISTANCE_FROM_OBJECT:
-               size = sizeof(LineStyleColorModifier_DistanceFromObject);
-               break;
-       case LS_MODIFIER_MATERIAL:
-               size = sizeof(LineStyleColorModifier_Material);
-               break;
-       default:
-               return NULL; /* unknown modifier type */
+               case LS_MODIFIER_ALONG_STROKE:
+                       size = sizeof(LineStyleColorModifier_AlongStroke);
+                       break;
+               case LS_MODIFIER_DISTANCE_FROM_CAMERA:
+                       size = sizeof(LineStyleColorModifier_DistanceFromCamera);
+                       break;
+               case LS_MODIFIER_DISTANCE_FROM_OBJECT:
+                       size = sizeof(LineStyleColorModifier_DistanceFromObject);
+                       break;
+               case LS_MODIFIER_MATERIAL:
+                       size = sizeof(LineStyleColorModifier_Material);
+                       break;
+               default:
+                       return NULL; /* unknown modifier type */
        }
 
        return new_modifier(type, size);
@@ -228,26 +228,26 @@ LineStyleModifier *BKE_add_linestyle_color_modifier(FreestyleLineStyle *linestyl
        m->blend = MA_RAMP_BLEND;
 
        switch (type) {
-       case LS_MODIFIER_ALONG_STROKE:
-               ((LineStyleColorModifier_AlongStroke *)m)->color_ramp = add_colorband(1);
-               break;
-       case LS_MODIFIER_DISTANCE_FROM_CAMERA:
-               ((LineStyleColorModifier_DistanceFromCamera *)m)->color_ramp = add_colorband(1);
-               ((LineStyleColorModifier_DistanceFromCamera *)m)->range_min = 0.0f;
-               ((LineStyleColorModifier_DistanceFromCamera *)m)->range_max = 10000.0f;
-               break;
-       case LS_MODIFIER_DISTANCE_FROM_OBJECT:
-               ((LineStyleColorModifier_DistanceFromObject *)m)->target = NULL;
-               ((LineStyleColorModifier_DistanceFromObject *)m)->color_ramp = add_colorband(1);
-               ((LineStyleColorModifier_DistanceFromObject *)m)->range_min = 0.0f;
-               ((LineStyleColorModifier_DistanceFromObject *)m)->range_max = 10000.0f;
-               break;
-       case LS_MODIFIER_MATERIAL:
-               ((LineStyleColorModifier_Material *)m)->color_ramp = add_colorband(1);
-               ((LineStyleColorModifier_Material *)m)->mat_attr = LS_MODIFIER_MATERIAL_DIFF;
-               break;
-       default:
-               return NULL; /* unknown modifier type */
+               case LS_MODIFIER_ALONG_STROKE:
+                       ((LineStyleColorModifier_AlongStroke *)m)->color_ramp = add_colorband(1);
+                       break;
+               case LS_MODIFIER_DISTANCE_FROM_CAMERA:
+                       ((LineStyleColorModifier_DistanceFromCamera *)m)->color_ramp = add_colorband(1);
+                       ((LineStyleColorModifier_DistanceFromCamera *)m)->range_min = 0.0f;
+                       ((LineStyleColorModifier_DistanceFromCamera *)m)->range_max = 10000.0f;
+                       break;
+               case LS_MODIFIER_DISTANCE_FROM_OBJECT:
+                       ((LineStyleColorModifier_DistanceFromObject *)m)->target = NULL;
+                       ((LineStyleColorModifier_DistanceFromObject *)m)->color_ramp = add_colorband(1);
+                       ((LineStyleColorModifier_DistanceFromObject *)m)->range_min = 0.0f;
+                       ((LineStyleColorModifier_DistanceFromObject *)m)->range_max = 10000.0f;
+                       break;
+               case LS_MODIFIER_MATERIAL:
+                       ((LineStyleColorModifier_Material *)m)->color_ramp = add_colorband(1);
+                       ((LineStyleColorModifier_Material *)m)->mat_attr = LS_MODIFIER_MATERIAL_DIFF;
+                       break;
+               default:
+                       return NULL; /* unknown modifier type */
        }
        add_to_modifier_list(&linestyle->color_modifiers, m);
 
@@ -264,23 +264,23 @@ LineStyleModifier *BKE_copy_linestyle_color_modifier(FreestyleLineStyle *linesty
        new_m->blend = m->blend;
 
        switch (m->type) {
-       case LS_MODIFIER_ALONG_STROKE:
+               case LS_MODIFIER_ALONG_STROKE:
                {
                        LineStyleColorModifier_AlongStroke *p = (LineStyleColorModifier_AlongStroke *)m;
                        LineStyleColorModifier_AlongStroke *q = (LineStyleColorModifier_AlongStroke *)new_m;
                        q->color_ramp = MEM_dupallocN(p->color_ramp);
+                       break;
                }
-               break;
-       case LS_MODIFIER_DISTANCE_FROM_CAMERA:
+               case LS_MODIFIER_DISTANCE_FROM_CAMERA:
                {
                        LineStyleColorModifier_DistanceFromCamera *p = (LineStyleColorModifier_DistanceFromCamera *)m;
                        LineStyleColorModifier_DistanceFromCamera *q = (LineStyleColorModifier_DistanceFromCamera *)new_m;
                        q->color_ramp = MEM_dupallocN(p->color_ramp);
                        q->range_min = p->range_min;
                        q->range_max = p->range_max;
+                       break;
                }
-               break;
-       case LS_MODIFIER_DISTANCE_FROM_OBJECT:
+               case LS_MODIFIER_DISTANCE_FROM_OBJECT:
                {
                        LineStyleColorModifier_DistanceFromObject *p = (LineStyleColorModifier_DistanceFromObject *)m;
                        LineStyleColorModifier_DistanceFromObject *q = (LineStyleColorModifier_DistanceFromObject *)new_m;
@@ -290,19 +290,19 @@ LineStyleModifier *BKE_copy_linestyle_color_modifier(FreestyleLineStyle *linesty
                        q->color_ramp = MEM_dupallocN(p->color_ramp);
                        q->range_min = p->range_min;
                        q->range_max = p->range_max;
+                       break;
                }
-               break;
-       case LS_MODIFIER_MATERIAL:
+               case LS_MODIFIER_MATERIAL:
                {
                        LineStyleColorModifier_Material *p = (LineStyleColorModifier_Material *)m;
                        LineStyleColorModifier_Material *q = (LineStyleColorModifier_Material *)new_m;
                        q->color_ramp = MEM_dupallocN(p->color_ramp);
                        q->flags = p->flags;
                        q->mat_attr = p->mat_attr;
+                       break;
                }
-               break;
-       default:
-               return NULL; /* unknown modifier type */
+               default:
+                       return NULL; /* unknown modifier type */
        }
        add_to_modifier_list(&linestyle->color_modifiers, new_m);
 
@@ -312,18 +312,18 @@ LineStyleModifier *BKE_copy_linestyle_color_modifier(FreestyleLineStyle *linesty
 void BKE_remove_linestyle_color_modifier(FreestyleLineStyle *linestyle, LineStyleModifier *m)
 {
        switch (m->type) {
-       case LS_MODIFIER_ALONG_STROKE:
-               MEM_freeN(((LineStyleColorModifier_AlongStroke *)m)->color_ramp);
-               break;
-       case LS_MODIFIER_DISTANCE_FROM_CAMERA:
-               MEM_freeN(((LineStyleColorModifier_DistanceFromCamera *)m)->color_ramp);
-               break;
-       case LS_MODIFIER_DISTANCE_FROM_OBJECT:
-               MEM_freeN(((LineStyleColorModifier_DistanceFromObject *)m)->color_ramp);
-               break;
-       case LS_MODIFIER_MATERIAL:
-               MEM_freeN(((LineStyleColorModifier_Material *)m)->color_ramp);
-               break;
+               case LS_MODIFIER_ALONG_STROKE:
+                       MEM_freeN(((LineStyleColorModifier_AlongStroke *)m)->color_ramp);
+                       break;
+               case LS_MODIFIER_DISTANCE_FROM_CAMERA:
+                       MEM_freeN(((LineStyleColorModifier_DistanceFromCamera *)m)->color_ramp);
+                       break;
+               case LS_MODIFIER_DISTANCE_FROM_OBJECT:
+                       MEM_freeN(((LineStyleColorModifier_DistanceFromObject *)m)->color_ramp);
+                       break;
+               case LS_MODIFIER_MATERIAL:
+                       MEM_freeN(((LineStyleColorModifier_Material *)m)->color_ramp);
+                       break;
        }
        BLI_freelinkN(&linestyle->color_modifiers, m);
 }
@@ -333,20 +333,20 @@ static LineStyleModifier *alloc_alpha_modifier(int type)
        size_t size;
 
        switch (type) {
-       case LS_MODIFIER_ALONG_STROKE:
-               size = sizeof(LineStyleAlphaModifier_AlongStroke);
-               break;
-       case LS_MODIFIER_DISTANCE_FROM_CAMERA:
-               size = sizeof(LineStyleAlphaModifier_DistanceFromCamera);
-               break;
-       case LS_MODIFIER_DISTANCE_FROM_OBJECT:
-               size = sizeof(LineStyleAlphaModifier_DistanceFromObject);
-               break;
-       case LS_MODIFIER_MATERIAL:
-               size = sizeof(LineStyleAlphaModifier_Material);
-               break;
-       default:
-               return NULL; /* unknown modifier type */
+               case LS_MODIFIER_ALONG_STROKE:
+                       size = sizeof(LineStyleAlphaModifier_AlongStroke);
+                       break;
+               case LS_MODIFIER_DISTANCE_FROM_CAMERA:
+                       size = sizeof(LineStyleAlphaModifier_DistanceFromCamera);
+                       break;
+               case LS_MODIFIER_DISTANCE_FROM_OBJECT:
+                       size = sizeof(LineStyleAlphaModifier_DistanceFromObject);
+                       break;
+               case LS_MODIFIER_MATERIAL:
+                       size = sizeof(LineStyleAlphaModifier_Material);
+                       break;
+               default:
+                       return NULL; /* unknown modifier type */
        }
        return new_modifier(type, size);
 }
@@ -359,38 +359,38 @@ LineStyleModifier *BKE_add_linestyle_alpha_modifier(FreestyleLineStyle *linestyl
        m->blend = LS_VALUE_BLEND;
 
        switch (type) {
-       case LS_MODIFIER_ALONG_STROKE:
+               case LS_MODIFIER_ALONG_STROKE:
                {
                        LineStyleAlphaModifier_AlongStroke *p = (LineStyleAlphaModifier_AlongStroke *)m;
                        p->curve = curvemapping_add(1, 0.0f, 0.0f, 1.0f, 1.0f);
+                       break;
                }
-               break;
-       case LS_MODIFIER_DISTANCE_FROM_CAMERA:
+               case LS_MODIFIER_DISTANCE_FROM_CAMERA:
                {
                        LineStyleAlphaModifier_DistanceFromCamera *p = (LineStyleAlphaModifier_DistanceFromCamera *)m;
                        p->curve = curvemapping_add(1, 0.0f, 0.0f, 1.0f, 1.0f);
                        p->range_min = 0.0f;
                        p->range_max = 10000.0f;
+                       break;
                }
-               break;
-       case LS_MODIFIER_DISTANCE_FROM_OBJECT:
+               case LS_MODIFIER_DISTANCE_FROM_OBJECT:
                {
                        LineStyleAlphaModifier_DistanceFromObject *p = (LineStyleAlphaModifier_DistanceFromObject *)m;
                        p->target = NULL;
                        p->curve = curvemapping_add(1, 0.0f, 0.0f, 1.0f, 1.0f);
                        p->range_min = 0.0f;
                        p->range_max = 10000.0f;
+                       break;
                }
-               break;
-       case LS_MODIFIER_MATERIAL:
+               case LS_MODIFIER_MATERIAL:
                {
                        LineStyleAlphaModifier_Material *p = (LineStyleAlphaModifier_Material *)m;
                        p->curve = curvemapping_add(1, 0.0f, 0.0f, 1.0f, 1.0f);
                        p->mat_attr = LS_MODIFIER_MATERIAL_DIFF;
+                       break;
                }
-               break;
-       default:
-               return NULL; /* unknown modifier type */
+               default:
+                       return NULL; /* unknown modifier type */
        }
        add_to_modifier_list(&linestyle->alpha_modifiers, m);
 
@@ -407,15 +407,15 @@ LineStyleModifier *BKE_copy_linestyle_alpha_modifier(FreestyleLineStyle *linesty
        new_m->blend = m->blend;
 
        switch (m->type) {
-       case LS_MODIFIER_ALONG_STROKE:
+               case LS_MODIFIER_ALONG_STROKE:
                {
                        LineStyleAlphaModifier_AlongStroke *p = (LineStyleAlphaModifier_AlongStroke *)m;
                        LineStyleAlphaModifier_AlongStroke *q = (LineStyleAlphaModifier_AlongStroke *)new_m;
                        q->curve = curvemapping_copy(p->curve);
                        q->flags = p->flags;
+                       break;
                }
-               break;
-       case LS_MODIFIER_DISTANCE_FROM_CAMERA:
+               case LS_MODIFIER_DISTANCE_FROM_CAMERA:
                {
                        LineStyleAlphaModifier_DistanceFromCamera *p = (LineStyleAlphaModifier_DistanceFromCamera *)m;
                        LineStyleAlphaModifier_DistanceFromCamera *q = (LineStyleAlphaModifier_DistanceFromCamera *)new_m;
@@ -423,9 +423,9 @@ LineStyleModifier *BKE_copy_linestyle_alpha_modifier(FreestyleLineStyle *linesty
                        q->flags = p->flags;
                        q->range_min = p->range_min;
                        q->range_max = p->range_max;
+                       break;
                }
-               break;
-       case LS_MODIFIER_DISTANCE_FROM_OBJECT:
+               case LS_MODIFIER_DISTANCE_FROM_OBJECT:
                {
                        LineStyleAlphaModifier_DistanceFromObject *p = (LineStyleAlphaModifier_DistanceFromObject *)m;
                        LineStyleAlphaModifier_DistanceFromObject *q = (LineStyleAlphaModifier_DistanceFromObject *)new_m;
@@ -436,19 +436,19 @@ LineStyleModifier *BKE_copy_linestyle_alpha_modifier(FreestyleLineStyle *linesty
                        q->flags = p->flags;
                        q->range_min = p->range_min;
                        q->range_max = p->range_max;
+                       break;
                }
-               break;
-       case LS_MODIFIER_MATERIAL:
+               case LS_MODIFIER_MATERIAL:
                {
                        LineStyleAlphaModifier_Material *p = (LineStyleAlphaModifier_Material *)m;
                        LineStyleAlphaModifier_Material *q = (LineStyleAlphaModifier_Material *)new_m;
                        q->curve = curvemapping_copy(p->curve);
                        q->flags = p->flags;
                        q->mat_attr = p->mat_attr;
+                       break;
                }
-               break;
-       default:
-               return NULL; /* unknown modifier type */
+               default:
+                       return NULL; /* unknown modifier type */
        }
        add_to_modifier_list(&linestyle->alpha_modifiers, new_m);
 
@@ -458,18 +458,18 @@ LineStyleModifier *BKE_copy_linestyle_alpha_modifier(FreestyleLineStyle *linesty
 void BKE_remove_linestyle_alpha_modifier(FreestyleLineStyle *linestyle, LineStyleModifier *m)
 {
        switch (m->type) {
-       case LS_MODIFIER_ALONG_STROKE:
-               curvemapping_free(((LineStyleAlphaModifier_AlongStroke *)m)->curve);
-               break;
-       case LS_MODIFIER_DISTANCE_FROM_CAMERA:
-               curvemapping_free(((LineStyleAlphaModifier_DistanceFromCamera *)m)->curve);
-               break;
-       case LS_MODIFIER_DISTANCE_FROM_OBJECT:
-               curvemapping_free(((LineStyleAlphaModifier_DistanceFromObject *)m)->curve);
-               break;
-       case LS_MODIFIER_MATERIAL:
-               curvemapping_free(((LineStyleAlphaModifier_Material *)m)->curve);
-               break;
+               case LS_MODIFIER_ALONG_STROKE:
+                       curvemapping_free(((LineStyleAlphaModifier_AlongStroke *)m)->curve);
+                       break;
+               case LS_MODIFIER_DISTANCE_FROM_CAMERA:
+                       curvemapping_free(((LineStyleAlphaModifier_DistanceFromCamera *)m)->curve);
+                       break;
+               case LS_MODIFIER_DISTANCE_FROM_OBJECT:
+                       curvemapping_free(((LineStyleAlphaModifier_DistanceFromObject *)m)->curve);
+                       break;
+               case LS_MODIFIER_MATERIAL:
+                       curvemapping_free(((LineStyleAlphaModifier_Material *)m)->curve);
+                       break;
        }
        BLI_freelinkN(&linestyle->alpha_modifiers, m);
 }
@@ -479,23 +479,23 @@ static LineStyleModifier *alloc_thickness_modifier(int type)
        size_t size;
 
        switch (type) {
-       case LS_MODIFIER_ALONG_STROKE:
-               size = sizeof(LineStyleThicknessModifier_AlongStroke);
-               break;
-       case LS_MODIFIER_DISTANCE_FROM_CAMERA:
-               size = sizeof(LineStyleThicknessModifier_DistanceFromCamera);
-               break;
-       case LS_MODIFIER_DISTANCE_FROM_OBJECT:
-               size = sizeof(LineStyleThicknessModifier_DistanceFromObject);
-               break;
-       case LS_MODIFIER_MATERIAL:
-               size = sizeof(LineStyleThicknessModifier_Material);
-               break;
-       case LS_MODIFIER_CALLIGRAPHY:
-               size = sizeof(LineStyleThicknessModifier_Calligraphy);
-               break;
-       default:
-               return NULL; /* unknown modifier type */
+               case LS_MODIFIER_ALONG_STROKE:
+                       size = sizeof(LineStyleThicknessModifier_AlongStroke);
+                       break;
+               case LS_MODIFIER_DISTANCE_FROM_CAMERA:
+                       size = sizeof(LineStyleThicknessModifier_DistanceFromCamera);
+                       break;
+               case LS_MODIFIER_DISTANCE_FROM_OBJECT:
+                       size = sizeof(LineStyleThicknessModifier_DistanceFromObject);
+                       break;
+               case LS_MODIFIER_MATERIAL:
+                       size = sizeof(LineStyleThicknessModifier_Material);
+                       break;
+               case LS_MODIFIER_CALLIGRAPHY:
+                       size = sizeof(LineStyleThicknessModifier_Calligraphy);
+                       break;
+               default:
+                       return NULL; /* unknown modifier type */
        }
 
        return new_modifier(type, size);
@@ -509,15 +509,15 @@ LineStyleModifier *BKE_add_linestyle_thickness_modifier(FreestyleLineStyle *line
        m->blend = LS_VALUE_BLEND;
 
        switch (type) {
-       case LS_MODIFIER_ALONG_STROKE:
+               case LS_MODIFIER_ALONG_STROKE:
                {
                        LineStyleThicknessModifier_AlongStroke *p = (LineStyleThicknessModifier_AlongStroke *)m;
                        p->curve = curvemapping_add(1, 0.0f, 0.0f, 1.0f, 1.0f);
                        p->value_min = 0.0f;
                        p->value_max = 1.0f;
+                       break;
                }
-               break;
-       case LS_MODIFIER_DISTANCE_FROM_CAMERA:
+               case LS_MODIFIER_DISTANCE_FROM_CAMERA:
                {
                        LineStyleThicknessModifier_DistanceFromCamera *p = (LineStyleThicknessModifier_DistanceFromCamera *)m;
                        p->curve = curvemapping_add(1, 0.0f, 0.0f, 1.0f, 1.0f);
@@ -525,9 +525,9 @@ LineStyleModifier *BKE_add_linestyle_thickness_modifier(FreestyleLineStyle *line
                        p->range_max = 1000.0f;
                        p->value_min = 0.0f;
                        p->value_max = 1.0f;
+                       break;
                }
-               break;
-       case LS_MODIFIER_DISTANCE_FROM_OBJECT:
+               case LS_MODIFIER_DISTANCE_FROM_OBJECT:
                {
                        LineStyleThicknessModifier_DistanceFromObject *p = (LineStyleThicknessModifier_DistanceFromObject *)m;
                        p->target = NULL;
@@ -536,27 +536,27 @@ LineStyleModifier *BKE_add_linestyle_thickness_modifier(FreestyleLineStyle *line
                        p->range_max = 1000.0f;
                        p->value_min = 0.0f;
                        p->value_max = 1.0f;
+                       break;
                }
-               break;
-       case LS_MODIFIER_MATERIAL:
+               case LS_MODIFIER_MATERIAL:
                {
                        LineStyleThicknessModifier_Material *p = (LineStyleThicknessModifier_Material *)m;
                        p->curve = curvemapping_add(1, 0.0f, 0.0f, 1.0f, 1.0f);
                        p->mat_attr = LS_MODIFIER_MATERIAL_DIFF;
                        p->value_min = 0.0f;
                        p->value_max = 1.0f;
+                       break;
                }
-               break;
-       case LS_MODIFIER_CALLIGRAPHY:
+               case LS_MODIFIER_CALLIGRAPHY:
                {
                        LineStyleThicknessModifier_Calligraphy *p = (LineStyleThicknessModifier_Calligraphy *)m;
                        p->min_thickness = 1.0f;
                        p->max_thickness = 10.0f;
                        p->orientation = DEG2RADF(60.0f);
+                       break;
                }
-               break;
-       default:
-               return NULL; /* unknown modifier type */
+               default:
+                       return NULL; /* unknown modifier type */
        }
        add_to_modifier_list(&linestyle->thickness_modifiers, m);
 
@@ -575,7 +575,7 @@ LineStyleModifier *BKE_copy_linestyle_thickness_modifier(FreestyleLineStyle *lin
        new_m->blend = m->blend;
 
        switch (m->type) {
-       case LS_MODIFIER_ALONG_STROKE:
+               case LS_MODIFIER_ALONG_STROKE:
                {
                        LineStyleThicknessModifier_AlongStroke *p = (LineStyleThicknessModifier_AlongStroke *)m;
                        LineStyleThicknessModifier_AlongStroke *q = (LineStyleThicknessModifier_AlongStroke *)new_m;
@@ -583,9 +583,9 @@ LineStyleModifier *BKE_copy_linestyle_thickness_modifier(FreestyleLineStyle *lin
                        q->flags = p->flags;
                        q->value_min = p->value_min;
                        q->value_max = p->value_max;
+                       break;
                }
-               break;
-       case LS_MODIFIER_DISTANCE_FROM_CAMERA:
+               case LS_MODIFIER_DISTANCE_FROM_CAMERA:
                {
                        LineStyleThicknessModifier_DistanceFromCamera *p = (LineStyleThicknessModifier_DistanceFromCamera *)m;
                        LineStyleThicknessModifier_DistanceFromCamera *q = (LineStyleThicknessModifier_DistanceFromCamera *)new_m;
@@ -595,9 +595,9 @@ LineStyleModifier *BKE_copy_linestyle_thickness_modifier(FreestyleLineStyle *lin
                        q->range_max = p->range_max;
                        q->value_min = p->value_min;
                        q->value_max = p->value_max;
+                       break;
                }
-               break;
-       case LS_MODIFIER_DISTANCE_FROM_OBJECT:
+               case LS_MODIFIER_DISTANCE_FROM_OBJECT:
                {
                        LineStyleThicknessModifier_DistanceFromObject *p = (LineStyleThicknessModifier_DistanceFromObject *)m;
                        LineStyleThicknessModifier_DistanceFromObject *q = (LineStyleThicknessModifier_DistanceFromObject *)new_m;
@@ -610,9 +610,9 @@ LineStyleModifier *BKE_copy_linestyle_thickness_modifier(FreestyleLineStyle *lin
                        q->range_max = p->range_max;
                        q->value_min = p->value_min;
                        q->value_max = p->value_max;
+                       break;
                }
-               break;
-       case LS_MODIFIER_MATERIAL:
+               case LS_MODIFIER_MATERIAL:
                {
                        LineStyleThicknessModifier_Material *p = (LineStyleThicknessModifier_Material *)m;
                        LineStyleThicknessModifier_Material *q = (LineStyleThicknessModifier_Material *)new_m;
@@ -621,19 +621,19 @@ LineStyleModifier *BKE_copy_linestyle_thickness_modifier(FreestyleLineStyle *lin
                        q->mat_attr = p->mat_attr;
                        q->value_min = p->value_min;
                        q->value_max = p->value_max;
+                       break;
                }
-               break;
-       case LS_MODIFIER_CALLIGRAPHY:
+               case LS_MODIFIER_CALLIGRAPHY:
                {
                        LineStyleThicknessModifier_Calligraphy *p = (LineStyleThicknessModifier_Calligraphy *)m;
                        LineStyleThicknessModifier_Calligraphy *q = (LineStyleThicknessModifier_Calligraphy *)new_m;
                        q->min_thickness = p->min_thickness;
                        q->max_thickness = p->max_thickness;
                        q->orientation = p->orientation;
+                       break;
                }
-               break;
-       default:
-               return NULL; /* unknown modifier type */
+               default:
+                       return NULL; /* unknown modifier type */
        }
        add_to_modifier_list(&linestyle->thickness_modifiers, new_m);
 
@@ -643,20 +643,20 @@ LineStyleModifier *BKE_copy_linestyle_thickness_modifier(FreestyleLineStyle *lin
 void BKE_remove_linestyle_thickness_modifier(FreestyleLineStyle *linestyle, LineStyleModifier *m)
 {
        switch (m->type) {
-       case LS_MODIFIER_ALONG_STROKE:
-               curvemapping_free(((LineStyleThicknessModifier_AlongStroke *)m)->curve);
-               break;
-       case LS_MODIFIER_DISTANCE_FROM_CAMERA:
-               curvemapping_free(((LineStyleThicknessModifier_DistanceFromCamera *)m)->curve);
-               break;
-       case LS_MODIFIER_DISTANCE_FROM_OBJECT:
-               curvemapping_free(((LineStyleThicknessModifier_DistanceFromObject *)m)->curve);
-               break;
-       case LS_MODIFIER_MATERIAL:
-               curvemapping_free(((LineStyleThicknessModifier_Material *)m)->curve);
-               break;
-       case LS_MODIFIER_CALLIGRAPHY:
-               break;
+               case LS_MODIFIER_ALONG_STROKE:
+                       curvemapping_free(((LineStyleThicknessModifier_AlongStroke *)m)->curve);
+                       break;
+               case LS_MODIFIER_DISTANCE_FROM_CAMERA:
+                       curvemapping_free(((LineStyleThicknessModifier_DistanceFromCamera *)m)->curve);
+                       break;
+               case LS_MODIFIER_DISTANCE_FROM_OBJECT:
+                       curvemapping_free(((LineStyleThicknessModifier_DistanceFromObject *)m)->curve);
+                       break;
+               case LS_MODIFIER_MATERIAL:
+                       curvemapping_free(((LineStyleThicknessModifier_Material *)m)->curve);
+                       break;
+               case LS_MODIFIER_CALLIGRAPHY:
+                       break;
        }
        BLI_freelinkN(&linestyle->thickness_modifiers, m);
 }
@@ -666,47 +666,47 @@ static LineStyleModifier *alloc_geometry_modifier(int type)
        size_t size;
 
        switch (type) {
-       case LS_MODIFIER_SAMPLING:
-               size = sizeof(LineStyleGeometryModifier_Sampling);
-               break;
-       case LS_MODIFIER_BEZIER_CURVE:
-               size = sizeof(LineStyleGeometryModifier_BezierCurve);
-               break;
-       case LS_MODIFIER_SINUS_DISPLACEMENT:
-               size = sizeof(LineStyleGeometryModifier_SinusDisplacement);
-               break;
-       case LS_MODIFIER_SPATIAL_NOISE:
-               size = sizeof(LineStyleGeometryModifier_SpatialNoise);
-               break;
-       case LS_MODIFIER_PERLIN_NOISE_1D:
-               size = sizeof(LineStyleGeometryModifier_PerlinNoise1D);
-               break;
-       case LS_MODIFIER_PERLIN_NOISE_2D:
-               size = sizeof(LineStyleGeometryModifier_PerlinNoise2D);
-               break;
-       case LS_MODIFIER_BACKBONE_STRETCHER:
-               size = sizeof(LineStyleGeometryModifier_BackboneStretcher);
-               break;
-       case LS_MODIFIER_TIP_REMOVER:
-               size = sizeof(LineStyleGeometryModifier_TipRemover);
-               break;
-       case LS_MODIFIER_POLYGONIZATION:
-               size = sizeof(LineStyleGeometryModifier_Polygonalization);
-               break;
-       case LS_MODIFIER_GUIDING_LINES:
-               size = sizeof(LineStyleGeometryModifier_GuidingLines);
-               break;
-       case LS_MODIFIER_BLUEPRINT:
-               size = sizeof(LineStyleGeometryModifier_Blueprint);
-               break;
-       case LS_MODIFIER_2D_OFFSET:
-               size = sizeof(LineStyleGeometryModifier_2DOffset);
-               break;
-       case LS_MODIFIER_2D_TRANSFORM:
-               size = sizeof(LineStyleGeometryModifier_2DTransform);
-               break;
-       default:
-               return NULL; /* unknown modifier type */
+               case LS_MODIFIER_SAMPLING:
+                       size = sizeof(LineStyleGeometryModifier_Sampling);
+                       break;
+               case LS_MODIFIER_BEZIER_CURVE:
+                       size = sizeof(LineStyleGeometryModifier_BezierCurve);
+                       break;
+               case LS_MODIFIER_SINUS_DISPLACEMENT:
+                       size = sizeof(LineStyleGeometryModifier_SinusDisplacement);
+                       break;
+               case LS_MODIFIER_SPATIAL_NOISE:
+                       size = sizeof(LineStyleGeometryModifier_SpatialNoise);
+                       break;
+               case LS_MODIFIER_PERLIN_NOISE_1D:
+                       size = sizeof(LineStyleGeometryModifier_PerlinNoise1D);
+                       break;
+               case LS_MODIFIER_PERLIN_NOISE_2D:
+                       size = sizeof(LineStyleGeometryModifier_PerlinNoise2D);
+                       break;
+               case LS_MODIFIER_BACKBONE_STRETCHER:
+                       size = sizeof(LineStyleGeometryModifier_BackboneStretcher);
+                       break;
+               case LS_MODIFIER_TIP_REMOVER:
+                       size = sizeof(LineStyleGeometryModifier_TipRemover);
+                       break;
+               case LS_MODIFIER_POLYGONIZATION:
+                       size = sizeof(LineStyleGeometryModifier_Polygonalization);
+                       break;
+               case LS_MODIFIER_GUIDING_LINES:
+                       size = sizeof(LineStyleGeometryModifier_GuidingLines);
+                       break;
+               case LS_MODIFIER_BLUEPRINT:
+                       size = sizeof(LineStyleGeometryModifier_Blueprint);
+                       break;
+               case LS_MODIFIER_2D_OFFSET:
+                       size = sizeof(LineStyleGeometryModifier_2DOffset);
+                       break;
+               case LS_MODIFIER_2D_TRANSFORM:
+                       size = sizeof(LineStyleGeometryModifier_2DTransform);
+                       break;
+               default:
+                       return NULL; /* unknown modifier type */
        }
 
        return new_modifier(type, size);
@@ -719,78 +719,78 @@ LineStyleModifier *BKE_add_linestyle_geometry_modifier(FreestyleLineStyle *lines
        m = alloc_geometry_modifier(type);
 
        switch (type) {
-       case LS_MODIFIER_SAMPLING:
+               case LS_MODIFIER_SAMPLING:
                {
                        LineStyleGeometryModifier_Sampling *p = (LineStyleGeometryModifier_Sampling *)m;
                        p->sampling = 10.0f;
+                       break;
                }
-               break;
-       case LS_MODIFIER_BEZIER_CURVE:
+               case LS_MODIFIER_BEZIER_CURVE:
                {
                        LineStyleGeometryModifier_BezierCurve *p = (LineStyleGeometryModifier_BezierCurve *)m;
                        p->error = 10.0f;
+                       break;
                }
-               break;
-       case LS_MODIFIER_SINUS_DISPLACEMENT:
+               case LS_MODIFIER_SINUS_DISPLACEMENT:
                {
                        LineStyleGeometryModifier_SinusDisplacement *p = (LineStyleGeometryModifier_SinusDisplacement *)m;
                        p->wavelength = 20.0f;
                        p->amplitude = 5.0f;
                        p->phase = 0.0f;
+                       break;
                }
-               break;
-       case LS_MODIFIER_SPATIAL_NOISE:
+               case LS_MODIFIER_SPATIAL_NOISE:
                {
                        LineStyleGeometryModifier_SpatialNoise *p = (LineStyleGeometryModifier_SpatialNoise *)m;
                        p->amplitude = 5.0f;
                        p->scale = 20.0f;
                        p->octaves = 4;
                        p->flags = LS_MODIFIER_SPATIAL_NOISE_SMOOTH | LS_MODIFIER_SPATIAL_NOISE_PURERANDOM;
+                       break;
                }
-               break;
-       case LS_MODIFIER_PERLIN_NOISE_1D:
+               case LS_MODIFIER_PERLIN_NOISE_1D:
                {
                        LineStyleGeometryModifier_PerlinNoise1D *p = (LineStyleGeometryModifier_PerlinNoise1D *)m;
                        p->frequency = 10.0f;
                        p->amplitude = 10.0f;
                        p->octaves = 4;
                        p->angle = DEG2RADF(45.0f);
+                       break;
                }
-               break;
-       case LS_MODIFIER_PERLIN_NOISE_2D:
+               case LS_MODIFIER_PERLIN_NOISE_2D:
                {
                        LineStyleGeometryModifier_PerlinNoise2D *p = (LineStyleGeometryModifier_PerlinNoise2D *)m;
                        p->frequency = 10.0f;
                        p->amplitude = 10.0f;
                        p->octaves = 4;
                        p->angle = DEG2RADF(45.0f);
+                       break;
                }
-               break;
-       case LS_MODIFIER_BACKBONE_STRETCHER:
+               case LS_MODIFIER_BACKBONE_STRETCHER:
                {
                        LineStyleGeometryModifier_BackboneStretcher *p = (LineStyleGeometryModifier_BackboneStretcher *)m;
                        p->backbone_length = 10.0f;
+                       break;
                }
-               break;
-       case LS_MODIFIER_TIP_REMOVER:
+               case LS_MODIFIER_TIP_REMOVER:
                {
                        LineStyleGeometryModifier_TipRemover *p = (LineStyleGeometryModifier_TipRemover *)m;
                        p->tip_length = 10.0f;
+                       break;
                }
-               break;
-       case LS_MODIFIER_POLYGONIZATION:
+               case LS_MODIFIER_POLYGONIZATION:
                {
                        LineStyleGeometryModifier_Polygonalization *p = (LineStyleGeometryModifier_Polygonalization *)m;
                        p->error = 10.0f;
+                       break;
                }
-               break;
-       case LS_MODIFIER_GUIDING_LINES:
+               case LS_MODIFIER_GUIDING_LINES:
                {
                        LineStyleGeometryModifier_GuidingLines *p = (LineStyleGeometryModifier_GuidingLines *)m;
                        p->offset = 0.0f;
+                       break;
                }
-               break;
-       case LS_MODIFIER_BLUEPRINT:
+               case LS_MODIFIER_BLUEPRINT:
                {
                        LineStyleGeometryModifier_Blueprint *p = (LineStyleGeometryModifier_Blueprint *)m;
                        p->flags = LS_MODIFIER_BLUEPRINT_CIRCLES;
@@ -799,18 +799,18 @@ LineStyleModifier *BKE_add_linestyle_geometry_modifier(FreestyleLineStyle *lines
                        p->random_radius = 3;
                        p->random_center = 5;
                        p->random_backbone = 5;
+                       break;
                }
-               break;
-       case LS_MODIFIER_2D_OFFSET:
+               case LS_MODIFIER_2D_OFFSET:
                {
                        LineStyleGeometryModifier_2DOffset *p = (LineStyleGeometryModifier_2DOffset *)m;
                        p->start = 0.0f;
                        p->end = 0.0f;
                        p->x = 0.0f;
                        p->y = 0.0f;
+                       break;
                }
-               break;
-       case LS_MODIFIER_2D_TRANSFORM:
+               case LS_MODIFIER_2D_TRANSFORM:
                {
                        LineStyleGeometryModifier_2DTransform *p = (LineStyleGeometryModifier_2DTransform *)m;
                        p->pivot = LS_MODIFIER_2D_TRANSFORM_PIVOT_CENTER;
@@ -820,10 +820,10 @@ LineStyleModifier *BKE_add_linestyle_geometry_modifier(FreestyleLineStyle *lines
                        p->pivot_u = 0.5f;
                        p->pivot_x = 0.0f;
                        p->pivot_y = 0.0f;
+                       break;
                }
-               break;
-       default:
-               return NULL; /* unknown modifier type */
+               default:
+                       return NULL; /* unknown modifier type */
        }
        add_to_modifier_list(&linestyle->geometry_modifiers, m);
 
@@ -838,30 +838,30 @@ LineStyleModifier *BKE_copy_linestyle_geometry_modifier(FreestyleLineStyle *line
        new_m->flags = m->flags;
 
        switch (m->type) {
-       case LS_MODIFIER_SAMPLING:
+               case LS_MODIFIER_SAMPLING:
                {
                        LineStyleGeometryModifier_Sampling *p = (LineStyleGeometryModifier_Sampling *)m;
                        LineStyleGeometryModifier_Sampling *q = (LineStyleGeometryModifier_Sampling *)new_m;
                        q->sampling = p->sampling;
+                       break;
                }
-               break;
-       case LS_MODIFIER_BEZIER_CURVE:
+               case LS_MODIFIER_BEZIER_CURVE:
                {
                        LineStyleGeometryModifier_BezierCurve *p = (LineStyleGeometryModifier_BezierCurve *)m;
                        LineStyleGeometryModifier_BezierCurve *q = (LineStyleGeometryModifier_BezierCurve *)new_m;
                        q->error = p->error;
+                       break;
                }
-               break;
-       case LS_MODIFIER_SINUS_DISPLACEMENT:
+               case LS_MODIFIER_SINUS_DISPLACEMENT:
                {
                        LineStyleGeometryModifier_SinusDisplacement *p = (LineStyleGeometryModifier_SinusDisplacement *)m;
                        LineStyleGeometryModifier_SinusDisplacement *q = (LineStyleGeometryModifier_SinusDisplacement *)new_m;
                        q->wavelength = p->wavelength;
                        q->amplitude = p->amplitude;
                        q->phase = p->phase;
+                       break;
                }
-               break;
-       case LS_MODIFIER_SPATIAL_NOISE:
+               case LS_MODIFIER_SPATIAL_NOISE:
                {
                        LineStyleGeometryModifier_SpatialNoise *p = (LineStyleGeometryModifier_SpatialNoise *)m;
                        LineStyleGeometryModifier_SpatialNoise *q = (LineStyleGeometryModifier_SpatialNoise *)new_m;
@@ -869,9 +869,9 @@ LineStyleModifier *BKE_copy_linestyle_geometry_modifier(FreestyleLineStyle *line
                        q->scale = p->scale;
                        q->octaves = p->octaves;
                        q->flags = p->flags;
+                       break;
                }
-               break;
-       case LS_MODIFIER_PERLIN_NOISE_1D:
+               case LS_MODIFIER_PERLIN_NOISE_1D:
                {
                        LineStyleGeometryModifier_PerlinNoise1D *p = (LineStyleGeometryModifier_PerlinNoise1D *)m;
                        LineStyleGeometryModifier_PerlinNoise1D *q = (LineStyleGeometryModifier_PerlinNoise1D *)new_m;
@@ -880,9 +880,9 @@ LineStyleModifier *BKE_copy_linestyle_geometry_modifier(FreestyleLineStyle *line
                        q->angle = p->angle;
                        q->octaves = p->octaves;
                        q->seed = p->seed;
+                       break;
                }
-               break;
-       case LS_MODIFIER_PERLIN_NOISE_2D:
+               case LS_MODIFIER_PERLIN_NOISE_2D:
                {
                        LineStyleGeometryModifier_PerlinNoise2D *p = (LineStyleGeometryModifier_PerlinNoise2D *)m;
                        LineStyleGeometryModifier_PerlinNoise2D *q = (LineStyleGeometryModifier_PerlinNoise2D *)new_m;
@@ -891,37 +891,37 @@ LineStyleModifier *BKE_copy_linestyle_geometry_modifier(FreestyleLineStyle *line
                        q->angle = p->angle;
                        q->octaves = p->octaves;
                        q->seed = p->seed;
+                       break;
                }
-               break;
-       case LS_MODIFIER_BACKBONE_STRETCHER:
+               case LS_MODIFIER_BACKBONE_STRETCHER:
                {
                        LineStyleGeometryModifier_BackboneStretcher *p = (LineStyleGeometryModifier_BackboneStretcher *)m;
                        LineStyleGeometryModifier_BackboneStretcher *q = (LineStyleGeometryModifier_BackboneStretcher *)new_m;
                        q->backbone_length = p->backbone_length;
+                       break;
                }
-               break;
-       case LS_MODIFIER_TIP_REMOVER:
+               case LS_MODIFIER_TIP_REMOVER:
                {
                        LineStyleGeometryModifier_TipRemover *p = (LineStyleGeometryModifier_TipRemover *)m;
                        LineStyleGeometryModifier_TipRemover *q = (LineStyleGeometryModifier_TipRemover *)new_m;
                        q->tip_length = p->tip_length;
+                       break;
                }
-               break;
-       case LS_MODIFIER_POLYGONIZATION:
+               case LS_MODIFIER_POLYGONIZATION:
                {
                        LineStyleGeometryModifier_Polygonalization *p = (LineStyleGeometryModifier_Polygonalization *)m;
                        LineStyleGeometryModifier_Polygonalization *q = (LineStyleGeometryModifier_Polygonalization *)new_m;
                        q->error = p->error;
+                       break;
                }
-               break;
-       case LS_MODIFIER_GUIDING_LINES:
+               case LS_MODIFIER_GUIDING_LINES:
                {
                        LineStyleGeometryModifier_GuidingLines *p = (LineStyleGeometryModifier_GuidingLines *)m;
                        LineStyleGeometryModifier_GuidingLines *q = (LineStyleGeometryModifier_GuidingLines *)new_m;
                        q->offset = p->offset;
+                       break;
                }
-               break;
-       case LS_MODIFIER_BLUEPRINT:
+               case LS_MODIFIER_BLUEPRINT:
                {
                        LineStyleGeometryModifier_Blueprint *p = (LineStyleGeometryModifier_Blueprint *)m;
                        LineStyleGeometryModifier_Blueprint *q = (LineStyleGeometryModifier_Blueprint *)new_m;
@@ -931,9 +931,9 @@ LineStyleModifier *BKE_copy_linestyle_geometry_modifier(FreestyleLineStyle *line
                        q->random_radius = p->random_radius;
                        q->random_center = p->random_center;
                        q->random_backbone = p->random_backbone;
+                       break;
                }
-               break;
-       case LS_MODIFIER_2D_OFFSET:
+               case LS_MODIFIER_2D_OFFSET:
                {
                        LineStyleGeometryModifier_2DOffset *p = (LineStyleGeometryModifier_2DOffset *)m;
                        LineStyleGeometryModifier_2DOffset *q = (LineStyleGeometryModifier_2DOffset *)new_m;
@@ -941,9 +941,9 @@ LineStyleModifier *BKE_copy_linestyle_geometry_modifier(FreestyleLineStyle *line
                        q->end = p->end;
                        q->x = p->x;
                        q->y = p->y;
+                       break;
                }
-               break;
-       case LS_MODIFIER_2D_TRANSFORM:
+               case LS_MODIFIER_2D_TRANSFORM:
                {
                        LineStyleGeometryModifier_2DTransform *p = (LineStyleGeometryModifier_2DTransform *)m;
                        LineStyleGeometryModifier_2DTransform *q = (LineStyleGeometryModifier_2DTransform *)new_m;
@@ -954,10 +954,10 @@ LineStyleModifier *BKE_copy_linestyle_geometry_modifier(FreestyleLineStyle *line
                        q->pivot_u = p->pivot_u;
                        q->pivot_x = p->pivot_x;
                        q->pivot_y = p->pivot_y;
+                       break;
                }
-               break;
-       default:
-               return NULL; /* unknown modifier type */
+               default:
+                       return NULL; /* unknown modifier type */
        }
        add_to_modifier_list(&linestyle->geometry_modifiers, new_m);
 
@@ -1007,20 +1007,20 @@ void BKE_list_modifier_color_ramps(FreestyleLineStyle *linestyle, ListBase *list
        listbase->first = listbase->last = NULL;
        for (m = (LineStyleModifier *)linestyle->color_modifiers.first; m; m = m->next) {
                switch (m->type) {
-               case LS_MODIFIER_ALONG_STROKE:
-                       color_ramp = ((LineStyleColorModifier_AlongStroke *)m)->color_ramp;
-                       break;
-               case LS_MODIFIER_DISTANCE_FROM_CAMERA:
-                       color_ramp = ((LineStyleColorModifier_DistanceFromCamera *)m)->color_ramp;
-                       break;
-               case LS_MODIFIER_DISTANCE_FROM_OBJECT:
-                       color_ramp = ((LineStyleColorModifier_DistanceFromObject *)m)->color_ramp;
-                       break;
-               case LS_MODIFIER_MATERIAL:
-                       color_ramp = ((LineStyleColorModifier_Material *)m)->color_ramp;
-                       break;
-               default:
-                       continue;
+                       case LS_MODIFIER_ALONG_STROKE:
+                               color_ramp = ((LineStyleColorModifier_AlongStroke *)m)->color_ramp;
+                               break;
+                       case LS_MODIFIER_DISTANCE_FROM_CAMERA:
+                               color_ramp = ((LineStyleColorModifier_DistanceFromCamera *)m)->color_ramp;
+                               break;
+                       case LS_MODIFIER_DISTANCE_FROM_OBJECT:
+                               color_ramp = ((LineStyleColorModifier_DistanceFromObject *)m)->color_ramp;
+                               break;
+                       case LS_MODIFIER_MATERIAL:
+                               color_ramp = ((LineStyleColorModifier_Material *)m)->color_ramp;
+                               break;
+                       default:
+                               continue;
                }
                link = (LinkData *) MEM_callocN( sizeof(LinkData), "link to color ramp");
                link->data = color_ramp;
index a445d43da00f5aef9fe83a21bc88cf4fd5f43baf..e14b51975c8e19682fdde4ec44096b7d9c6b0f8a 100644 (file)
@@ -1430,8 +1430,8 @@ void ramp_blend(int type, float r_col[3], const float fac, const float col[3])
                                r_col[1] = facm * (r_col[1]) + fac * tmpg;
                                r_col[2] = facm * (r_col[2]) + fac * tmpb;
                        }
+                       break;
                }
-               break;
                case MA_RAMP_SAT:
                {
                        float rH, rS, rV;
@@ -1441,8 +1441,8 @@ void ramp_blend(int type, float r_col[3], const float fac, const float col[3])
                                rgb_to_hsv(col[0], col[1], col[2], &colH, &colS, &colV);
                                hsv_to_rgb(rH, (facm * rS + fac * colS), rV, r_col + 0, r_col + 1, r_col + 2);
                        }
+                       break;
                }
-               break;
                case MA_RAMP_VAL:
                {
                        float rH, rS, rV;
@@ -1450,8 +1450,8 @@ void ramp_blend(int type, float r_col[3], const float fac, const float col[3])
                        rgb_to_hsv(r_col[0], r_col[1], r_col[2], &rH, &rS, &rV);
                        rgb_to_hsv(col[0], col[1], col[2], &colH, &colS, &colV);
                        hsv_to_rgb(rH, rS, (facm * rV + fac * colV), r_col + 0, r_col + 1, r_col + 2);
+                       break;
                }
-               break;
                case MA_RAMP_COLOR:
                {
                        float rH, rS, rV;
@@ -1465,8 +1465,8 @@ void ramp_blend(int type, float r_col[3], const float fac, const float col[3])
                                r_col[1] = facm * (r_col[1]) + fac * tmpg;
                                r_col[2] = facm * (r_col[2]) + fac * tmpb;
                        }
+                       break;
                }
-               break;
                case MA_RAMP_SOFT:
                {
                        float scr, scg, scb;
@@ -1479,8 +1479,8 @@ void ramp_blend(int type, float r_col[3], const float fac, const float col[3])
                        r_col[0] = facm * (r_col[0]) + fac * (((1.0f - r_col[0]) * col[0] * (r_col[0])) + (r_col[0] * scr));
                        r_col[1] = facm * (r_col[1]) + fac * (((1.0f - r_col[1]) * col[1] * (r_col[1])) + (r_col[1] * scg));
                        r_col[2] = facm * (r_col[2]) + fac * (((1.0f - r_col[2]) * col[2] * (r_col[2])) + (r_col[2] * scb));
+                       break;
                }
-               break;
                case MA_RAMP_LINEAR:
                        if (col[0] > 0.5f)
                                r_col[0] = r_col[0] + fac * (2.0f * (col[0] - 0.5f));
index 386b50c7018e2023e6de48e746fbf04be4901519..84dfa70abfcb00d89b1dc5465128afd1d6aaec7b 100644 (file)
@@ -525,60 +525,60 @@ bNodeSocket *nodeInsertSocket(bNodeTree *ntree, bNode *node, int in_out, const c
 const char *nodeStaticSocketType(int type, int subtype)
 {
        switch (type) {
-       case SOCK_FLOAT:
-               switch (subtype) {
-               case PROP_UNSIGNED:
-                       return "NodeSocketFloatUnsigned";
-               case PROP_PERCENTAGE:
-                       return "NodeSocketFloatPercentage";
-               case PROP_FACTOR:
-                       return "NodeSocketFloatFactor";
-               case PROP_ANGLE:
-                       return "NodeSocketFloatAngle";
-               case PROP_TIME:
-                       return "NodeSocketFloatTime";
-               case PROP_NONE:
-               default:
-                       return "NodeSocketFloat";
-               }
-       case SOCK_INT:
-               switch (subtype) {
-               case PROP_UNSIGNED:
-                       return "NodeSocketIntUnsigned";
-               case PROP_PERCENTAGE:
-                       return "NodeSocketIntPercentage";
-               case PROP_FACTOR:
-                       return "NodeSocketIntFactor";
-               case PROP_NONE:
-               default:
-                       return "NodeSocketInt";
-               }
-       case SOCK_BOOLEAN:
-               return "NodeSocketBool";
-       case SOCK_VECTOR:
-               switch (subtype) {
-               case PROP_TRANSLATION:
-                       return "NodeSocketVectorTranslation";
-               case PROP_DIRECTION:
-                       return "NodeSocketVectorDirection";
-               case PROP_VELOCITY:
-                       return "NodeSocketVectorVelocity";
-               case PROP_ACCELERATION:
-                       return "NodeSocketVectorAcceleration";
-               case PROP_EULER:
-                       return "NodeSocketVectorEuler";
-               case PROP_XYZ:
-                       return "NodeSocketVectorXYZ";
-               case PROP_NONE:
-               default:
-                       return "NodeSocketVector";
-               }
-       case SOCK_RGBA:
-               return "NodeSocketColor";
-       case SOCK_STRING:
-               return "NodeSocketString";
-       case SOCK_SHADER:
-               return "NodeSocketShader";
+               case SOCK_FLOAT:
+                       switch (subtype) {
+                               case PROP_UNSIGNED:
+                                       return "NodeSocketFloatUnsigned";
+                               case PROP_PERCENTAGE:
+                                       return "NodeSocketFloatPercentage";
+                               case PROP_FACTOR:
+                                       return "NodeSocketFloatFactor";
+                               case PROP_ANGLE:
+                                       return "NodeSocketFloatAngle";
+                               case PROP_TIME:
+                                       return "NodeSocketFloatTime";
+                               case PROP_NONE:
+                               default:
+                                       return "NodeSocketFloat";
+                       }
+               case SOCK_INT:
+                       switch (subtype) {
+                               case PROP_UNSIGNED:
+                                       return "NodeSocketIntUnsigned";
+                               case PROP_PERCENTAGE:
+                                       return "NodeSocketIntPercentage";
+                               case PROP_FACTOR:
+                                       return "NodeSocketIntFactor";
+                               case PROP_NONE:
+                               default:
+                                       return "NodeSocketInt";
+                       }
+               case SOCK_BOOLEAN:
+                       return "NodeSocketBool";
+               case SOCK_VECTOR:
+                       switch (subtype) {
+                               case PROP_TRANSLATION:
+                                       return "NodeSocketVectorTranslation";
+                               case PROP_DIRECTION:
+                                       return "NodeSocketVectorDirection";
+                               case PROP_VELOCITY:
+                                       return "NodeSocketVectorVelocity";
+                               case PROP_ACCELERATION:
+                                       return "NodeSocketVectorAcceleration";
+                               case PROP_EULER:
+                                       return "NodeSocketVectorEuler";
+                               case PROP_XYZ:
+                                       return "NodeSocketVectorXYZ";
+                               case PROP_NONE:
+                               default:
+                                       return "NodeSocketVector";
+                       }
+               case SOCK_RGBA:
+                       return "NodeSocketColor";
+               case SOCK_STRING:
+                       return "NodeSocketString";
+               case SOCK_SHADER:
+                       return "NodeSocketShader";
        }
        return NULL;
 }
@@ -586,60 +586,60 @@ const char *nodeStaticSocketType(int type, int subtype)
 const char *nodeStaticSocketInterfaceType(int type, int subtype)
 {
        switch (type) {
-       case SOCK_FLOAT:
-               switch (subtype) {
-               case PROP_UNSIGNED:
-                       return "NodeSocketInterfaceFloatUnsigned";
-               case PROP_PERCENTAGE:
-                       return "NodeSocketInterfaceFloatPercentage";
-               case PROP_FACTOR:
-                       return "NodeSocketInterfaceFloatFactor";
-               case PROP_ANGLE:
-                       return "NodeSocketInterfaceFloatAngle";
-               case PROP_TIME:
-                       return "NodeSocketInterfaceFloatTime";
-               case PROP_NONE:
-               default:
-                       return "NodeSocketInterfaceFloat";
-               }
-       case SOCK_INT:
-               switch (subtype) {
-               case PROP_UNSIGNED:
-                       return "NodeSocketInterfaceIntUnsigned";
-               case PROP_PERCENTAGE:
-                       return "NodeSocketInterfaceIntPercentage";
-               case PROP_FACTOR:
-                       return "NodeSocketInterfaceIntFactor";
-               case PROP_NONE:
-               default:
-                       return "NodeSocketInterfaceInt";
-               }
-       case SOCK_BOOLEAN:
-               return "NodeSocketInterfaceBool";
-       case SOCK_VECTOR:
-               switch (subtype) {
-               case PROP_TRANSLATION:
-                       return "NodeSocketInterfaceVectorTranslation";
-               case PROP_DIRECTION:
-                       return "NodeSocketInterfaceVectorDirection";
-               case PROP_VELOCITY:
-                       return "NodeSocketInterfaceVectorVelocity";
-               case PROP_ACCELERATION:
-                       return "NodeSocketInterfaceVectorAcceleration";
-               case PROP_EULER:
-                       return "NodeSocketInterfaceVectorEuler";
-               case PROP_XYZ:
-                       return "NodeSocketInterfaceVectorXYZ";
-               case PROP_NONE:
-               default:
-                       return "NodeSocketInterfaceVector";
-               }
-       case SOCK_RGBA:
-               return "NodeSocketInterfaceColor";
-       case SOCK_STRING:
-               return "NodeSocketInterfaceString";
-       case SOCK_SHADER:
-               return "NodeSocketInterfaceShader";
+               case SOCK_FLOAT:
+                       switch (subtype) {
+                               case PROP_UNSIGNED:
+                                       return "NodeSocketInterfaceFloatUnsigned";
+                               case PROP_PERCENTAGE:
+                                       return "NodeSocketInterfaceFloatPercentage";
+                               case PROP_FACTOR:
+                                       return "NodeSocketInterfaceFloatFactor";
+                               case PROP_ANGLE:
+                                       return "NodeSocketInterfaceFloatAngle";
+                               case PROP_TIME:
+                                       return "NodeSocketInterfaceFloatTime";
+                               case PROP_NONE:
+                               default:
+                                       return "NodeSocketInterfaceFloat";
+                       }
+               case SOCK_INT:
+                       switch (subtype) {
+                               case PROP_UNSIGNED:
+                                       return "NodeSocketInterfaceIntUnsigned";
+                               case PROP_PERCENTAGE:
+                                       return "NodeSocketInterfaceIntPercentage";
+                               case PROP_FACTOR:
+                                       return "NodeSocketInterfaceIntFactor";
+                               case PROP_NONE:
+                               default:
+                                       return "NodeSocketInterfaceInt";
+                       }
+               case SOCK_BOOLEAN:
+                       return "NodeSocketInterfaceBool";
+               case SOCK_VECTOR:
+                       switch (subtype) {
+                               case PROP_TRANSLATION:
+                                       return "NodeSocketInterfaceVectorTranslation";
+                               case PROP_DIRECTION:
+                                       return "NodeSocketInterfaceVectorDirection";
+                               case PROP_VELOCITY:
+                                       return "NodeSocketInterfaceVectorVelocity";
+                               case PROP_ACCELERATION:
+                                       return "NodeSocketInterfaceVectorAcceleration";
+                               case PROP_EULER:
+                                       return "NodeSocketInterfaceVectorEuler";
+                               case PROP_XYZ:
+                                       return "NodeSocketInterfaceVectorXYZ";
+                               case PROP_NONE:
+                               default:
+                                       return "NodeSocketInterfaceVector";
+                       }
+               case SOCK_RGBA:
+                       return "NodeSocketInterfaceColor";
+               case SOCK_STRING:
+                       return "NodeSocketInterfaceString";
+               case SOCK_SHADER:
+                       return "NodeSocketInterfaceShader";
        }
        return NULL;
 }
index 2df78c4fb8a4b86460fb7b8cd0ef9d284daeaae0..1df644318244c88dacf6f2ed2246e1c92909c12b 100644 (file)
@@ -1589,13 +1589,15 @@ void BKE_object_mat3_to_rot(Object *ob, float mat[3][3], bool use_compat)
                        normalize_qt_qt(dquat, ob->dquat);
                        invert_qt(dquat);
                        mul_qt_qtqt(ob->quat, dquat, ob->quat);
+                       break;
                }
-               break;
                case ROT_MODE_AXISANGLE:
+               {
                        mat3_to_axis_angle(ob->rotAxis, &ob->rotAngle, mat);
                        sub_v3_v3(ob->rotAxis, ob->drotAxis);
                        ob->rotAngle -= ob->drotAngle;
                        break;
+               }
                default: /* euler */
                {
                        float quat[4];
@@ -2724,10 +2726,8 @@ void BKE_object_handle_update_ex(Scene *scene, Object *ob,
                                                makeDerivedMesh(scene, ob, NULL, data_mask, 0);
                                        }
 #endif
-
+                                       break;
                                }
-                               break;
-
                                case OB_ARMATURE:
                                        if (ob->id.lib && ob->proxy_from) {
                                                if (BKE_pose_copy_result(ob->pose, ob->proxy_from->pose) == false) {
index f08a51e602cb592705af3beb7216c807bc77b49b..110d67b3d47d28a47fe971f9fb26fd4655ee4a56 100644 (file)
@@ -1072,23 +1072,23 @@ int BKE_ffmpeg_start(struct Scene *scene, RenderData *rd, int rectx, int recty,
                specs.channels = c->channels;
 
                switch (av_get_packed_sample_fmt(c->sample_fmt)) {
-               case AV_SAMPLE_FMT_U8:
-                       specs.format = AUD_FORMAT_U8;
-                       break;
-               case AV_SAMPLE_FMT_S16:
-                       specs.format = AUD_FORMAT_S16;
-                       break;
-               case AV_SAMPLE_FMT_S32:
-                       specs.format = AUD_FORMAT_S32;
-                       break;
-               case AV_SAMPLE_FMT_FLT:
-                       specs.format = AUD_FORMAT_FLOAT32;
-                       break;
-               case AV_SAMPLE_FMT_DBL:
-                       specs.format = AUD_FORMAT_FLOAT64;
-                       break;
-               default:
-                       return -31415;
+                       case AV_SAMPLE_FMT_U8:
+                               specs.format = AUD_FORMAT_U8;
+                               break;
+                       case AV_SAMPLE_FMT_S16:
+                               specs.format = AUD_FORMAT_S16;
+                               break;
+                       case AV_SAMPLE_FMT_S32:
+                               specs.format = AUD_FORMAT_S32;
+                               break;
+                       case AV_SAMPLE_FMT_FLT:
+                               specs.format = AUD_FORMAT_FLOAT32;
+                               break;
+                       case AV_SAMPLE_FMT_DBL:
+                               specs.format = AUD_FORMAT_FLOAT64;
+                               break;
+                       default:
+                               return -31415;
                }
 
                specs.rate = rd->ffcodecdata.audio_mixrate;
index cb47f07574de4a020101c4d157dee6ba3e484874..31b4b7cd4a5f055cd718a13e9c02d416dfd16e4b 100644 (file)
@@ -539,9 +539,8 @@ DLRBT_Node *BLI_dlrbTree_add(DLRBT_Tree *tree, DLRBT_Comparator_FP cmp_cb,
                                
                                parNode->left = node;
                                node->parent = parNode;
+                               break;
                        }
-                       break;
-                       
                        case 1:  /* add new node as right child */
                        {
                                node = new_cb(data);
@@ -549,15 +548,14 @@ DLRBT_Node *BLI_dlrbTree_add(DLRBT_Tree *tree, DLRBT_Comparator_FP cmp_cb,
                                
                                parNode->right = node;
                                node->parent = parNode;
+                               break;
                        }
-                       break;
-                       
                        default:  /* update the duplicate node as appropriate */
                        {
                                if (update_cb)
                                        update_cb(parNode, data);
+                               break;
                        }
-                       break;
                }
        }
        else {
index e82bf2e21c81cecff3cd6cdcffb1b3106981840f..51eaffaa31cecd612acc7efd488c5fee9417b8ca 100644 (file)
@@ -288,8 +288,8 @@ void ExecutionGroup::execute(ExecutionSystem *graph)
 
                        delete hotspots[0];
                        MEM_freeN(chunkOrders);
+                       break;
                }
-               break;
                case COM_TO_RULE_OF_THIRDS:
                {
                        ChunkOrderHotspot *hotspots[9];
@@ -336,8 +336,8 @@ void ExecutionGroup::execute(ExecutionSystem *graph)
                        delete hotspots[7];
                        delete hotspots[8];
                        MEM_freeN(chunkOrders);
+                       break;
                }
-               break;
                case COM_TO_TOP_DOWN:
                default:
                        break;
index a441dce565608e692e59a653edcd3aa51ea440b1..b2c63addb879d8a7cbe5f0029f4536222b556902 100644 (file)
@@ -2921,9 +2921,8 @@ short ANIM_channel_setting_get(bAnimContext *ac, bAnimListElem *ale, int setting
                                                return ((*val) & flag) == 0;
                                        else
                                                return ((*val) & flag) != 0;
+                                       break;
                                }
-                               break;
-                                       
                                case sizeof(short): /* short pointer for setting */
                                {
                                        short *val = (short *)ptr;
@@ -2932,9 +2931,8 @@ short ANIM_channel_setting_get(bAnimContext *ac, bAnimListElem *ale, int setting
                                                return ((*val) & flag) == 0;
                                        else
                                                return ((*val) & flag) != 0;
+                                       break;
                                }
-                               break;
-                                       
                                case sizeof(char):  /* char pointer for setting */
                                {
                                        char *val = (char *)ptr;
@@ -2943,8 +2941,8 @@ short ANIM_channel_setting_get(bAnimContext *ac, bAnimListElem *ale, int setting
                                                return ((*val) & flag) == 0;
                                        else
                                                return ((*val) & flag) != 0;
+                                       break;
                                }
-                               break;
                        }
                }
        }
@@ -2994,22 +2992,20 @@ void ANIM_channel_setting_set(bAnimContext *ac, bAnimListElem *ale, int setting,
                                {
                                        int *val = (int *)ptr;
                                        ACF_SETTING_SET(*val, flag, mode);
+                                       break;
                                }
-                               break;
-                                       
                                case sizeof(short): /* short pointer for setting */
                                {
                                        short *val = (short *)ptr;
                                        ACF_SETTING_SET(*val, flag, mode);
+                                       break;
                                }
-                               break;
-                                       
                                case sizeof(char):  /* char pointer for setting */
                                {
                                        char *val = (char *)ptr;
                                        ACF_SETTING_SET(*val, flag, mode);
+                                       break;
                                }
-                               break;
                        }
                }
        }
@@ -3156,14 +3152,14 @@ void ANIM_channel_draw(bAnimContext *ac, bAnimListElem *ale, float yminc, float
                                {
                                        SpaceAction *saction = (SpaceAction *)ac->sl;
                                        draw_sliders = (saction->flag & SACTION_SLIDERS);
+                                       break;
                                }
-                               break;
                                case SPACE_IPO:
                                {
                                        SpaceIpo *sipo = (SpaceIpo *)ac->sl;
                                        draw_sliders = (sipo->flag & SIPO_SLIDERS);
+                                       break;
                                }
-                               break;
                        }
                }
 
@@ -3546,14 +3542,14 @@ void ANIM_channel_draw_widgets(bContext *C, bAnimContext *ac, bAnimListElem *ale
                                {
                                        SpaceAction *saction = (SpaceAction *)ac->sl;
                                        draw_sliders = (saction->flag & SACTION_SLIDERS);
+                                       break;
                                }
-                               break;
                                case SPACE_IPO:
                                {
                                        SpaceIpo *sipo = (SpaceIpo *)ac->sl;
                                        draw_sliders = (sipo->flag & SIPO_SLIDERS);
+                                       break;
                                }
-                               break;
                        }
                }
                
index 481430f37e487b7f9dd6d730c4617b96502517fe..59ae45e446a0eef7df671f9dd2eab80771384cbb 100644 (file)
@@ -94,23 +94,22 @@ void ANIM_set_active_channel(bAnimContext *ac, void *data, short datatype, int f
                                bActionGroup *agrp = (bActionGroup *)ale->data;
                                
                                ACHANNEL_SET_FLAG(agrp, ACHANNEL_SETFLAG_CLEAR, AGRP_ACTIVE);
+                               break;
                        }
-                       break;
                        case ANIMTYPE_FCURVE:
                        {
                                FCurve *fcu = (FCurve *)ale->data;
                                
                                ACHANNEL_SET_FLAG(fcu, ACHANNEL_SETFLAG_CLEAR, FCURVE_ACTIVE);
+                               break;
                        }
-                       break;
                        case ANIMTYPE_NLATRACK:
                        {
                                NlaTrack *nlt = (NlaTrack *)ale->data;
                                
                                ACHANNEL_SET_FLAG(nlt, ACHANNEL_SETFLAG_CLEAR, NLATRACK_ACTIVE);
+                               break;
                        }
-                       break;
-                       
                        case ANIMTYPE_FILLACTD: /* Action Expander */
                        case ANIMTYPE_DSMAT:    /* Datablock AnimData Expanders */
                        case ANIMTYPE_DSLAM:
@@ -131,8 +130,8 @@ void ANIM_set_active_channel(bAnimContext *ac, void *data, short datatype, int f
                                if (ale->adt) {
                                        ACHANNEL_SET_FLAG(ale->adt, ACHANNEL_SETFLAG_CLEAR, ADT_UI_ACTIVE);
                                }
+                               break;
                        }
-                       break;
                }
        }
        
@@ -143,21 +142,20 @@ void ANIM_set_active_channel(bAnimContext *ac, void *data, short datatype, int f
                        {
                                bActionGroup *agrp = (bActionGroup *)channel_data;
                                agrp->flag |= AGRP_ACTIVE;
+                               break;
                        }
-                       break;
                        case ANIMTYPE_FCURVE:
                        {
                                FCurve *fcu = (FCurve *)channel_data;
                                fcu->flag |= FCURVE_ACTIVE;
+                               break;
                        }
-                       break;
                        case ANIMTYPE_NLATRACK:
                        {
                                NlaTrack *nlt = (NlaTrack *)channel_data;
                                nlt->flag |= NLATRACK_ACTIVE;
+                               break;
                        }
-                       break;
-                               
                        case ANIMTYPE_FILLACTD: /* Action Expander */
                        case ANIMTYPE_DSMAT:    /* Datablock AnimData Expanders */
                        case ANIMTYPE_DSLAM:
@@ -177,8 +175,8 @@ void ANIM_set_active_channel(bAnimContext *ac, void *data, short datatype, int f
                                if (ale && ale->adt) {
                                        ale->adt->flag |= ADT_UI_ACTIVE;
                                }
+                               break;
                        }
-                       break;
                }
        }
        
@@ -256,9 +254,8 @@ void ANIM_deselect_anim_channels(bAnimContext *ac, void *data, short datatype, s
                                {
                                        if ((ale->adt) && (ale->adt->flag & ADT_UI_SELECTED))
                                                sel = ACHANNEL_SETFLAG_CLEAR;
+                                       break;
                                }
-                               break;
-                                       
                                case ANIMTYPE_GPLAYER:
                                        if (ale->flag & GP_LAYER_SELECT)
                                                sel = ACHANNEL_SETFLAG_CLEAR;
@@ -283,55 +280,54 @@ void ANIM_deselect_anim_channels(bAnimContext *ac, void *data, short datatype, s
                                if (scene->adt) {
                                        ACHANNEL_SET_FLAG(scene, sel, ADT_UI_SELECTED);
                                }
+                               break;
                        }
-                       break;
                        case ANIMTYPE_OBJECT:
+                       {
                        #if 0   /* for now, do not take object selection into account, since it gets too annoying */
-                               {
-                                       Base *base = (Base *)ale->data;
-                                       Object *ob = base->object;
-                                       
-                                       ACHANNEL_SET_FLAG(base, sel, SELECT);
-                                       ACHANNEL_SET_FLAG(ob, sel, SELECT);
-                                       
-                                       if (ob->adt) {
-                                               ACHANNEL_SET_FLAG(ob, sel, ADT_UI_SELECTED);
-                                       }
+                               Base *base = (Base *)ale->data;
+                               Object *ob = base->object;
+
+                               ACHANNEL_SET_FLAG(base, sel, SELECT);
+                               ACHANNEL_SET_FLAG(ob, sel, SELECT);
+
+                               if (ob->adt) {
+                                       ACHANNEL_SET_FLAG(ob, sel, ADT_UI_SELECTED);
                                }
                        #endif
                                break;
+                       }
                        case ANIMTYPE_GROUP:
                        {
                                bActionGroup *agrp = (bActionGroup *)ale->data;
                                
                                ACHANNEL_SET_FLAG(agrp, sel, AGRP_SELECTED);
                                agrp->flag &= ~AGRP_ACTIVE;
+                               break;
                        }
-                       break;
                        case ANIMTYPE_FCURVE:
                        {
                                FCurve *fcu = (FCurve *)ale->data;
                                
                                ACHANNEL_SET_FLAG(fcu, sel, FCURVE_SELECTED);
                                fcu->flag &= ~FCURVE_ACTIVE;
+                               break;
                        }
-                       break;
                        case ANIMTYPE_SHAPEKEY:
                        {
                                KeyBlock *kb = (KeyBlock *)ale->data;
                                
                                ACHANNEL_SET_FLAG(kb, sel, KEYBLOCK_SEL);
+                               break;
                        }
-                       break;
                        case ANIMTYPE_NLATRACK:
                        {
                                NlaTrack *nlt = (NlaTrack *)ale->data;
                                
                                ACHANNEL_SET_FLAG(nlt, sel, NLATRACK_SELECTED);
                                nlt->flag &= ~NLATRACK_ACTIVE;
+                               break;
                        }
-                       break;
-                               
                        case ANIMTYPE_FILLACTD: /* Action Expander */
                        case ANIMTYPE_DSMAT:    /* Datablock AnimData Expanders */
                        case ANIMTYPE_DSLAM:
@@ -354,24 +350,22 @@ void ANIM_deselect_anim_channels(bAnimContext *ac, void *data, short datatype, s
                                        ACHANNEL_SET_FLAG(ale->adt, sel, ADT_UI_SELECTED);
                                        ale->adt->flag &= ~ADT_UI_ACTIVE;
                                }
+                               break;
                        }
-                       break;
-                               
                        case ANIMTYPE_GPLAYER:
                        {
                                bGPDlayer *gpl = (bGPDlayer *)ale->data;
                                
                                ACHANNEL_SET_FLAG(gpl, sel, GP_LAYER_SELECT);
+                               break;
                        }
-                       break;
-                       
                        case ANIMTYPE_MASKLAYER:
                        {
                                MaskLayer *masklay = (MaskLayer *)ale->data;
                                
                                ACHANNEL_SET_FLAG(masklay, sel, MASK_LAYERFLAG_SELECT);
+                               break;
                        }
-                       break;
                }
        }
        
@@ -801,23 +795,22 @@ static void rearrange_animchannel_add_to_islands(ListBase *islands, ListBase *sr
                        
                        is_sel = SEL_AGRP(agrp);
                        is_untouchable = (agrp->flag & AGRP_TEMP) != 0;
+                       break;
                }
-               break;
                case ANIMTYPE_FCURVE:
                {
                        FCurve *fcu = (FCurve *)channel;
                        
                        is_sel = SEL_FCU(fcu);
+                       break;
                }
-               break;
                case ANIMTYPE_NLATRACK:
                {
                        NlaTrack *nlt = (NlaTrack *)channel;
                        
                        is_sel = SEL_NLT(nlt);
+                       break;
                }
-               break;
-                       
                default:
                        printf("rearrange_animchannel_add_to_islands(): don't know how to handle channels of type %d\n", type);
                        return;
@@ -1435,9 +1428,8 @@ static int animchannels_delete_exec(bContext *C, wmOperator *UNUSED(op))
                                
                                /* try to free F-Curve */
                                ANIM_fcurve_delete_from_animdata(&ac, adt, fcu);
+                               break;
                        }
-                       break;
-                               
                        case ANIMTYPE_GPLAYER:
                        {
                                /* Grease Pencil layer */
@@ -1447,9 +1439,8 @@ static int animchannels_delete_exec(bContext *C, wmOperator *UNUSED(op))
                                /* try to delete the layer's data and the layer itself */
                                free_gpencil_frames(gpl);
                                BLI_freelinkN(&gpd->layers, gpl);
+                               break;
                        }
-                       break;
-                       
                        case ANIMTYPE_MASKLAYER:
                        {
                                /* Mask layer */
@@ -1458,8 +1449,8 @@ static int animchannels_delete_exec(bContext *C, wmOperator *UNUSED(op))
                                
                                /* try to delete the layer's data and the layer itself */
                                BKE_mask_layer_remove(mask, masklay);
+                               break;
                        }
-                       break;
                }
        }
        
@@ -2131,8 +2122,8 @@ static void borderselect_anim_channels(bAnimContext *ac, rcti *rect, short selec
                                        
                                        /* always clear active flag after doing this */
                                        agrp->flag &= ~AGRP_ACTIVE;
+                                       break;
                                }
-                               break;
                                case ANIMTYPE_NLATRACK:
                                {
                                        NlaTrack *nlt = (NlaTrack *)ale->data;
@@ -2141,8 +2132,8 @@ static void borderselect_anim_channels(bAnimContext *ac, rcti *rect, short selec
                                         * currently adds complications when doing other stuff 
                                         */
                                        ACHANNEL_SET_FLAG(nlt, selectmode, NLATRACK_SELECTED);
+                                       break;
                                }
-                               break;
                        }
                }
                
@@ -2367,8 +2358,8 @@ static int mouse_anim_channels(bAnimContext *ac, float UNUSED(x), int channel_in
                        }
                        
                        notifierFlags |= (ND_ANIMCHAN | NA_SELECTED);
+                       break;
                }
-               break;
                case ANIMTYPE_OBJECT:
                {
                        bDopeSheet *ads = (bDopeSheet *)ac->data;
@@ -2406,9 +2397,8 @@ static int mouse_anim_channels(bAnimContext *ac, float UNUSED(x), int channel_in
                                adt->flag |= ADT_UI_ACTIVE;
                        
                        notifierFlags |= (ND_ANIMCHAN | NA_SELECTED);
+                       break;
                }
-               break;
-               
                case ANIMTYPE_FILLACTD: /* Action Expander */
                case ANIMTYPE_DSMAT:    /* Datablock AnimData Expanders */
                case ANIMTYPE_DSLAM:
@@ -2445,9 +2435,8 @@ static int mouse_anim_channels(bAnimContext *ac, float UNUSED(x), int channel_in
                        }
                        
                        notifierFlags |= (ND_ANIMCHAN | NA_SELECTED);
+                       break;
                }
-               break;
-               
                case ANIMTYPE_GROUP: 
                {
                        bActionGroup *agrp = (bActionGroup *)ale->data;
@@ -2482,8 +2471,8 @@ static int mouse_anim_channels(bAnimContext *ac, float UNUSED(x), int channel_in
                                ANIM_set_active_channel(ac, ac->data, ac->datatype, filter, NULL, ANIMTYPE_GROUP);
                                
                        notifierFlags |= (ND_ANIMCHAN | NA_SELECTED);
+                       break;
                }
-               break;
                case ANIMTYPE_FCURVE: 
                {
                        FCurve *fcu = (FCurve *)ale->data;
@@ -2504,8 +2493,8 @@ static int mouse_anim_channels(bAnimContext *ac, float UNUSED(x), int channel_in
                                ANIM_set_active_channel(ac, ac->data, ac->datatype, filter, fcu, ANIMTYPE_FCURVE);
                                
                        notifierFlags |= (ND_ANIMCHAN | NA_SELECTED);
+                       break;
                }
-               break;
                case ANIMTYPE_SHAPEKEY: 
                {
                        KeyBlock *kb = (KeyBlock *)ale->data;
@@ -2522,8 +2511,8 @@ static int mouse_anim_channels(bAnimContext *ac, float UNUSED(x), int channel_in
                        }
                                
                        notifierFlags |= (ND_ANIMCHAN | NA_SELECTED);
+                       break;
                }
-               break;
                case ANIMTYPE_GPDATABLOCK:
                {
                        bGPdata *gpd = (bGPdata *)ale->data;
@@ -2534,8 +2523,8 @@ static int mouse_anim_channels(bAnimContext *ac, float UNUSED(x), int channel_in
                        gpd->flag ^= GP_DATA_EXPAND;
                        
                        notifierFlags |= (ND_ANIMCHAN | NA_EDITED);
+                       break;
                }
-               break;
                case ANIMTYPE_GPLAYER:
                {
                        bGPDlayer *gpl = (bGPDlayer *)ale->data;
@@ -2552,8 +2541,8 @@ static int mouse_anim_channels(bAnimContext *ac, float UNUSED(x), int channel_in
                        }
                        
                        notifierFlags |= (ND_ANIMCHAN | NA_EDITED);
+                       break;
                }
-               break;
                case ANIMTYPE_MASKDATABLOCK:
                {
                        Mask *mask = (Mask *)ale->data;
@@ -2564,8 +2553,8 @@ static int mouse_anim_channels(bAnimContext *ac, float UNUSED(x), int channel_in
                        mask->flag ^= MASK_ANIMF_EXPAND;
                        
                        notifierFlags |= (ND_ANIMCHAN | NA_EDITED);
+                       break;
                }
-               break;
                case ANIMTYPE_MASKLAYER:
                {
                        MaskLayer *masklay = (MaskLayer *)ale->data;
@@ -2582,8 +2571,8 @@ static int mouse_anim_channels(bAnimContext *ac, float UNUSED(x), int channel_in
                        }
                        
                        notifierFlags |= (ND_ANIMCHAN | NA_EDITED);
+                       break;
                }
-               break;
                default:
                        if (G.debug & G_DEBUG)
                                printf("Error: Invalid channel type in mouse_anim_channels()\n");
index 2e580a57a0110f3afecf1eb840692258c94cdf76..9e8800fd91e9391ba32a814b64b9ec4009277f17 100644 (file)
@@ -126,17 +126,15 @@ void ANIM_timecode_string_from_frame(char *str, Scene *scene, int power, short t
                                        if (hours) sprintf(str, "%s%02d:%02d:%02d", neg, hours, minutes, seconds);
                                        else sprintf(str, "%s%02d:%02d", neg, minutes, seconds);
                                }
+                               break;
                        }
-                       break;
-                               
                        case USER_TIMECODE_SMPTE_MSF:
                        {
                                /* reduced SMPTE format that always shows minutes, seconds, frames. Hours only shown as needed. */
                                if (hours) sprintf(str, "%s%02d:%02d:%02d:%02d", neg, hours, minutes, seconds, frames);
                                else sprintf(str, "%s%02d:%02d:%02d", neg, minutes, seconds, frames);
+                               break;
                        }
-                       break;
-                       
                        case USER_TIMECODE_MILLISECONDS:
                        {
                                /* reduced SMPTE. Instead of frames, milliseconds are shown */
@@ -145,25 +143,23 @@ void ANIM_timecode_string_from_frame(char *str, Scene *scene, int power, short t
                                
                                if (hours) sprintf(str, "%s%02d:%02d:%0*.*f", neg, hours, minutes, s_pad, ms_dp, cfra);
                                else sprintf(str, "%s%02d:%0*.*f", neg, minutes, s_pad,  ms_dp, cfra);
+                               break;
                        }
-                       break;
-                               
                        case USER_TIMECODE_SECONDS_ONLY:
                        {
                                /* only show the original seconds display */
                                /* round to whole numbers if power is >= 1 (i.e. scale is coarse) */
                                if (power <= 0) sprintf(str, "%.*f", 1 - power, raw_seconds);
                                else sprintf(str, "%d", (int)floor(raw_seconds + GLA_PIXEL_OFS));
+                               break;
                        }
-                       break;
-                       
                        case USER_TIMECODE_SMPTE_FULL:
                        default:
                        {
                                /* full SMPTE format */
                                sprintf(str, "%s%02d:%02d:%02d:%02d", neg, hours, minutes, seconds, frames);
+                               break;
                        }
-                       break;
                }
        }
        else {
index 41aeb92e182daf955a116bedbcadf475e909b576..910036745240d7171243a3e6c0d8fdfcf518d431 100644 (file)
@@ -301,22 +301,20 @@ short ANIM_animdata_context_getdata(bAnimContext *ac)
                        {
                                SpaceAction *saction = (SpaceAction *)sl;
                                ok = actedit_get_context(ac, saction);
+                               break;
                        }
-                       break;
-                               
                        case SPACE_IPO:
                        {
                                SpaceIpo *sipo = (SpaceIpo *)sl;
                                ok = graphedit_get_context(ac, sipo);
+                               break;
                        }
-                       break;
-                               
                        case SPACE_NLA:
                        {
                                SpaceNla *snla = (SpaceNla *)sl;
                                ok = nlaedit_get_context(ac, snla);
+                               break;
                        }
-                       break;
                }
        }
        
@@ -543,9 +541,8 @@ static bAnimListElem *make_new_animlistelem(void *data, short datatype, ID *owne
                                 */
                                ale->key_data = NULL;
                                ale->datatype = ALE_ALL;
+                               break;
                        }
-                       break;
-                       
                        case ANIMTYPE_SCENE:
                        {
                                Scene *sce = (Scene *)data;
@@ -556,8 +553,8 @@ static bAnimListElem *make_new_animlistelem(void *data, short datatype, ID *owne
                                ale->datatype = ALE_SCE;
                                
                                ale->adt = BKE_animdata_from_id(data);
+                               break;
                        }
-                       break;
                        case ANIMTYPE_OBJECT:
                        {
                                Base *base = (Base *)data;
@@ -569,8 +566,8 @@ static bAnimListElem *make_new_animlistelem(void *data, short datatype, ID *owne
                                ale->datatype = ALE_OB;
                                
                                ale->adt = BKE_animdata_from_id(&ob->id);
+                               break;
                        }
-                       break;
                        case ANIMTYPE_FILLACTD:
                        {
                                bAction *act = (bAction *)data;
@@ -579,8 +576,8 @@ static bAnimListElem *make_new_animlistelem(void *data, short datatype, ID *owne
                                
                                ale->key_data = act;
                                ale->datatype = ALE_ACT;
+                               break;
                        }
-                       break;
                        case ANIMTYPE_FILLDRIVERS:
                        {
                                AnimData *adt = (AnimData *)data;
@@ -590,9 +587,8 @@ static bAnimListElem *make_new_animlistelem(void *data, short datatype, ID *owne
                                // XXX... drivers don't show summary for now
                                ale->key_data = NULL;
                                ale->datatype = ALE_NONE;
+                               break;
                        }
-                       break;
-                       
                        case ANIMTYPE_DSMAT:
                        {
                                Material *ma = (Material *)data;
@@ -604,8 +600,8 @@ static bAnimListElem *make_new_animlistelem(void *data, short datatype, ID *owne
                                ale->datatype = ALE_ACT;
                                
                                ale->adt = BKE_animdata_from_id(data);
+                               break;
                        }
-                       break;
                        case ANIMTYPE_DSLAM:
                        {
                                Lamp *la = (Lamp *)data;
@@ -617,8 +613,8 @@ static bAnimListElem *make_new_animlistelem(void *data, short datatype, ID *owne
                                ale->datatype = ALE_ACT;
                                
                                ale->adt = BKE_animdata_from_id(data);
+                               break;
                        }
-                       break;
                        case ANIMTYPE_DSCAM:
                        {
                                Camera *ca = (Camera *)data;
@@ -630,8 +626,8 @@ static bAnimListElem *make_new_animlistelem(void *data, short datatype, ID *owne
                                ale->datatype = ALE_ACT;
                                
                                ale->adt = BKE_animdata_from_id(data);
+                               break;
                        }
-                       break;
                        case ANIMTYPE_DSCUR:
                        {
                                Curve *cu = (Curve *)data;
@@ -643,8 +639,8 @@ static bAnimListElem *make_new_animlistelem(void *data, short datatype, ID *owne
                                ale->datatype = ALE_ACT;
                                
                                ale->adt = BKE_animdata_from_id(data);
+                               break;
                        }
-                       break;
                        case ANIMTYPE_DSARM:
                        {
                                bArmature *arm = (bArmature *)data;
@@ -656,8 +652,8 @@ static bAnimListElem *make_new_animlistelem(void *data, short datatype, ID *owne
                                ale->datatype = ALE_ACT;
                                
                                ale->adt = BKE_animdata_from_id(data);
+                               break;
                        }
-                       break;
                        case ANIMTYPE_DSMESH:
                        {
                                Mesh *me = (Mesh *)data;
@@ -669,8 +665,8 @@ static bAnimListElem *make_new_animlistelem(void *data, short datatype, ID *owne
                                ale->datatype = ALE_ACT;
                                
                                ale->adt = BKE_animdata_from_id(data);
+                               break;
                        }
-                       break;
                        case ANIMTYPE_DSLAT:
                        {
                                Lattice *lt = (Lattice *)data;
@@ -682,8 +678,8 @@ static bAnimListElem *make_new_animlistelem(void *data, short datatype, ID *owne
                                ale->datatype = ALE_ACT;
                                
                                ale->adt = BKE_animdata_from_id(data);
+                               break;
                        }
-                       break;
                        case ANIMTYPE_DSSPK:
                        {
                                Speaker *spk = (Speaker *)data;
@@ -695,8 +691,8 @@ static bAnimListElem *make_new_animlistelem(void *data, short datatype, ID *owne
                                ale->datatype = ALE_ACT;
                                
                                ale->adt = BKE_animdata_from_id(data);
+                               break;
                        }
-                       break;
                        case ANIMTYPE_DSSKEY:
                        {
                                Key *key = (Key *)data;
@@ -708,8 +704,8 @@ static bAnimListElem *make_new_animlistelem(void *data, short datatype, ID *owne
                                ale->datatype = ALE_ACT;
                                
                                ale->adt = BKE_animdata_from_id(data);
+                               break;
                        }
-                       break;
                        case ANIMTYPE_DSWOR:
                        {
                                World *wo = (World *)data;
@@ -721,8 +717,8 @@ static bAnimListElem *make_new_animlistelem(void *data, short datatype, ID *owne
                                ale->datatype = ALE_ACT;
                                
                                ale->adt = BKE_animdata_from_id(data);
+                               break;
                        }
-                       break;
                        case ANIMTYPE_DSNTREE:
                        {
                                bNodeTree *ntree = (bNodeTree *)data;
@@ -734,8 +730,8 @@ static bAnimListElem *make_new_animlistelem(void *data, short datatype, ID *owne
                                ale->datatype = ALE_ACT;
                                
                                ale->adt = BKE_animdata_from_id(data);
+                               break;
                        }
-                       break;
                        case ANIMTYPE_DSLINESTYLE:
                        {
                                FreestyleLineStyle *linestyle = (FreestyleLineStyle *)data;
@@ -747,8 +743,8 @@ static bAnimListElem *make_new_animlistelem(void *data, short datatype, ID *owne
                                ale->datatype = ALE_ACT;
                                
                                ale->adt = BKE_animdata_from_id(data);
+                               break;
                        }
-                       break;
                        case ANIMTYPE_DSPART:
                        {
                                ParticleSettings *part = (ParticleSettings *)ale->data;
@@ -760,8 +756,8 @@ static bAnimListElem *make_new_animlistelem(void *data, short datatype, ID *owne
                                ale->datatype = ALE_ACT;
                                
                                ale->adt = BKE_animdata_from_id(data);
+                               break;
                        }
-                       break;
                        case ANIMTYPE_DSTEX:
                        {
                                Tex *tex = (Tex *)data;
@@ -773,9 +769,8 @@ static bAnimListElem *make_new_animlistelem(void *data, short datatype, ID *owne
                                ale->datatype = ALE_ACT;
                                
                                ale->adt = BKE_animdata_from_id(data);
+                               break;
                        }
-                       break;
-                               
                        case ANIMTYPE_GROUP:
                        {
                                bActionGroup *agrp = (bActionGroup *)data;
@@ -784,8 +779,8 @@ static bAnimListElem *make_new_animlistelem(void *data, short datatype, ID *owne
                                
                                ale->key_data = NULL;
                                ale->datatype = ALE_GROUP;
+                               break;
                        }
-                       break;
                        case ANIMTYPE_FCURVE:
                        {
                                FCurve *fcu = (FCurve *)data;
@@ -794,9 +789,8 @@ static bAnimListElem *make_new_animlistelem(void *data, short datatype, ID *owne
                                
                                ale->key_data = fcu;
                                ale->datatype = ALE_FCURVE;
+                               break;
                        }
-                       break;
-                               
                        case ANIMTYPE_SHAPEKEY:
                        {
                                KeyBlock *kb = (KeyBlock *)data;
@@ -824,9 +818,8 @@ static bAnimListElem *make_new_animlistelem(void *data, short datatype, ID *owne
                                        }
                                        ale->datatype = (ale->key_data) ? ALE_FCURVE : ALE_NONE;
                                }
+                               break;
                        }
-                       break;
-                       
                        case ANIMTYPE_GPLAYER:
                        {
                                bGPDlayer *gpl = (bGPDlayer *)data;
@@ -835,9 +828,8 @@ static bAnimListElem *make_new_animlistelem(void *data, short datatype, ID *owne
                                
                                ale->key_data = NULL;
                                ale->datatype = ALE_GPFRAME;
+                               break;
                        }
-                       break;
-                       
                        case ANIMTYPE_MASKLAYER:
                        {
                                MaskLayer *masklay = (MaskLayer *)data;
@@ -846,9 +838,8 @@ static bAnimListElem *make_new_animlistelem(void *data, short datatype, ID *owne
                                
                                ale->key_data = NULL;
                                ale->datatype = ALE_MASKLAY;
+                               break;
                        }
-                       break;
-                       
                        case ANIMTYPE_NLATRACK:
                        {
                                NlaTrack *nlt = (NlaTrack *)data;
@@ -857,15 +848,15 @@ static bAnimListElem *make_new_animlistelem(void *data, short datatype, ID *owne
                                
                                ale->key_data = &nlt->strips;
                                ale->datatype = ALE_NLASTRIP;
+                               break;
                        }
-                       break;
                        case ANIMTYPE_NLAACTION:
                        {
                                /* nothing to include for now... nothing editable from NLA-perspective here */
                                ale->key_data = NULL;
                                ale->datatype = ALE_NONE;
+                               break;
                        }
-                       break;
                }
        }
        
@@ -1654,20 +1645,20 @@ static size_t animdata_filter_ds_textures(bAnimContext *ac, ListBase *anim_data,
                {
                        Material *ma = (Material *)owner_id;
                        mtex = (MTex **)(&ma->mtex);
+                       break;
                }
-               break;
                case ID_LA:
                {
                        Lamp *la = (Lamp *)owner_id;
                        mtex = (MTex **)(&la->mtex);
+                       break;
                }
-               break;
                case ID_WO:
                {
                        World *wo = (World *)owner_id;
                        mtex = (MTex **)(&wo->mtex);
+                       break;
                }
-               break;
                default: 
                {
                        /* invalid/unsupported option */
@@ -1812,8 +1803,8 @@ static void animfilter_modifier_idpoin_cb(void *afm_ptr, Object *ob, ID **idpoin
                        if (!(afm->ads->filterflag & ADS_FILTER_NOTEX)) {       
                                afm->items += animdata_filter_ds_texture(afm->ac, &afm->tmp_data, afm->ads, tex, owner_id, afm->filter_mode);
                        }
+                       break;
                }
-               break;
                
                /* TODO: images? */
        }
@@ -1920,8 +1911,8 @@ static size_t animdata_filter_ds_obdata(bAnimContext *ac, ListBase *anim_data, b
                        
                        type = ANIMTYPE_DSCAM;
                        expanded = FILTER_CAM_OBJD(ca);
+                       break;
                }
-               break;
                case OB_LAMP: /* ---------- Lamp ----------- */
                {
                        Lamp *la = (Lamp *)ob->data;
@@ -1931,8 +1922,8 @@ static size_t animdata_filter_ds_obdata(bAnimContext *ac, ListBase *anim_data, b
                        
                        type = ANIMTYPE_DSLAM;
                        expanded = FILTER_LAM_OBJD(la);
+                       break;
                }
-               break;
                case OB_CURVE: /* ------- Curve ---------- */
                case OB_SURF: /* ------- Nurbs Surface ---------- */
                case OB_FONT: /* ------- Text Curve ---------- */
@@ -1944,8 +1935,8 @@ static size_t animdata_filter_ds_obdata(bAnimContext *ac, ListBase *anim_data, b
                        
                        type = ANIMTYPE_DSCUR;
                        expanded = FILTER_CUR_OBJD(cu);
+                       break;
                }
-               break;
                case OB_MBALL: /* ------- MetaBall ---------- */
                {
                        MetaBall *mb = (MetaBall *)ob->data;
@@ -1955,8 +1946,8 @@ static size_t animdata_filter_ds_obdata(bAnimContext *ac, ListBase *anim_data, b
                        
                        type = ANIMTYPE_DSMBALL;
                        expanded = FILTER_MBALL_OBJD(mb);
+                       break;
                }
-               break;
                case OB_ARMATURE: /* ------- Armature ---------- */
                {
                        bArmature *arm = (bArmature *)ob->data;
@@ -1966,8 +1957,8 @@ static size_t animdata_filter_ds_obdata(bAnimContext *ac, ListBase *anim_data, b
                        
                        type = ANIMTYPE_DSARM;
                        expanded = FILTER_ARM_OBJD(arm);
+                       break;
                }
-               break;
                case OB_MESH: /* ------- Mesh ---------- */
                {
                        Mesh *me = (Mesh *)ob->data;
@@ -1977,8 +1968,8 @@ static size_t animdata_filter_ds_obdata(bAnimContext *ac, ListBase *anim_data, b
                        
                        type = ANIMTYPE_DSMESH;
                        expanded = FILTER_MESH_OBJD(me);
+                       break;
                }
-               break;
                case OB_LATTICE: /* ---- Lattice ---- */
                {
                        Lattice *lt = (Lattice *)ob->data;
@@ -1988,16 +1979,16 @@ static size_t animdata_filter_ds_obdata(bAnimContext *ac, ListBase *anim_data, b
                        
                        type = ANIMTYPE_DSLAT;
                        expanded = FILTER_LATTICE_OBJD(lt);
+                       break;
                }
-               break;
                case OB_SPEAKER: /* ---------- Speaker ----------- */
                {
                        Speaker *spk = (Speaker *)ob->data;
                        
                        type = ANIMTYPE_DSSPK;
                        expanded = FILTER_SPK_OBJD(spk);
+                       break;
                }
-               break;
        }
        
        /* add object data animation channels */
@@ -2020,8 +2011,8 @@ static size_t animdata_filter_ds_obdata(bAnimContext *ac, ListBase *anim_data, b
                                /* textures */
                                if (!(ads->filterflag & ADS_FILTER_NOTEX))
                                        tmp_items += animdata_filter_ds_textures(ac, &tmp_data, ads, &la->id, filter_mode);
+                               break;
                        }
-                       break;
                }
        }
        END_ANIMFILTER_SUBCHANNELS;
@@ -2603,58 +2594,52 @@ size_t ANIM_animdata_filter(bAnimContext *ac, ListBase *anim_data, int filter_mo
                                /* the check for the DopeSheet summary is included here since the summary works here too */
                                if (animdata_filter_dopesheet_summary(ac, anim_data, filter_mode, &items))
                                        items += animfilter_action(ac, anim_data, ads, data, filter_mode, (ID *)obact);
+                               break;
                        }
-                       break;
-                       
                        case ANIMCONT_SHAPEKEY: /* 'ShapeKey Editor' */
                        {
                                /* the check for the DopeSheet summary is included here since the summary works here too */
                                if (animdata_filter_dopesheet_summary(ac, anim_data, filter_mode, &items))
                                        items = animdata_filter_shapekey(ac, anim_data, data, filter_mode);
+                               break;
                        }
-                       break;
-                               
                        case ANIMCONT_GPENCIL:
                        {
                                if (animdata_filter_dopesheet_summary(ac, anim_data, filter_mode, &items))
                                        items = animdata_filter_gpencil(anim_data, data, filter_mode);
+                               break;
                        }
-                       break;
-                       
                        case ANIMCONT_MASK:
                        {
                                if (animdata_filter_dopesheet_summary(ac, anim_data, filter_mode, &items))
                                        items = animdata_filter_mask(anim_data, data, filter_mode);
+                               break;
                        }
-                       break;
-                       
                        case ANIMCONT_DOPESHEET: /* 'DopeSheet Editor' */
                        {
                                /* the DopeSheet editor is the primary place where the DopeSheet summaries are useful */
                                if (animdata_filter_dopesheet_summary(ac, anim_data, filter_mode, &items))
                                        items += animdata_filter_dopesheet(ac, anim_data, data, filter_mode);
+                               break;
                        }
-                       break;
-                               
                        case ANIMCONT_FCURVES: /* Graph Editor -> F-Curves/Animation Editing */
                        case ANIMCONT_DRIVERS: /* Graph Editor -> Drivers Editing */
                        case ANIMCONT_NLA:     /* NLA Editor */
                        {
                                /* all of these editors use the basic DopeSheet data for filtering options, but don't have all the same features */
                                items = animdata_filter_dopesheet(ac, anim_data, data, filter_mode);
+                               break;
                        }
-                       break;
-                       
                        case ANIMCONT_CHANNEL: /* animation channel */
                        {
                                bDopeSheet *ads = ac->ads;
                                
                                /* based on the channel type, filter relevant data for this */
                                items = animdata_filter_animchan(ac, anim_data, ads, data, filter_mode);
+                               break;
                        }
-                       break;
                }
-                       
+
                /* remove any 'weedy' entries */
                items = animdata_filter_remove_invalid(anim_data);
                
index 8c49bee3058bf561aea9c018c05f73c034d6d4f6..df93da8b7c187232ed113ac75af72694465b2356 100644 (file)
@@ -449,8 +449,8 @@ static char *get_driver_path_hack(bContext *C, PointerRNA *ptr, PropertyRNA *pro
                                                /* free old one */
                                                MEM_freeN(basepath);
                                        }
+                                       break;
                                }
-                               break;
                        }
                        
                        /* fix RNA pointer, as we've now changed the ID root by changing the paths */
index adea3bcdc314e25db609422fa678dc8aaefc8aaf..5ceca478b471bb5d598591300bf6905a9c9ce23e 100644 (file)
@@ -242,8 +242,8 @@ static void draw_modifier__generator(uiLayout *layout, ID *id, FModifier *fcm, s
                                else 
                                        uiDefBut(block, LABEL, 1, ")  ", 0, 0, 2 * UI_UNIT_X, UI_UNIT_Y, NULL, 0.0, 0.0, 0, 0, "");
                        }
+                       break;
                }
-               break;
        }
 }
 
index d9d2180e184e558c5f78ece6b88388d1cc3fa1c0..4e6cc53f962c155999a2b8f908d2df419fc5d94e 100644 (file)
@@ -601,30 +601,27 @@ void draw_keyframe_shape(float x, float y, float xscale, float hsize, short sel,
                        {
                                if (sel) glColor4f(0.33f, 0.75f, 0.93f, alpha);
                                else glColor4f(0.70f, 0.86f, 0.91f, alpha);
+                               break;
                        }
-                       break;
-                               
                        case BEZT_KEYTYPE_EXTREME: /* redish frames for now */
                        {
                                if (sel) glColor4f(0.95f, 0.5f, 0.5f, alpha);
                                else glColor4f(0.91f, 0.70f, 0.80f, alpha);
+                               break;
                        }
-                       break;
-                               
                        case BEZT_KEYTYPE_JITTER: /* greenish frames for now? */
                        {
                                if (sel) glColor4f(0.38f, 0.75f, 0.26f, alpha);
                                else glColor4f(0.58f, 0.90f, 0.46f, alpha);
+                               break;
                        }
-                       break;
-                               
                        case BEZT_KEYTYPE_KEYFRAME: /* traditional yellowish frames for now */
                        default:
                        {
                                if (sel) UI_ThemeColorShadeAlpha(TH_STRIP_SELECT, 50, -255 * (1.0f - alpha));
                                else glColor4f(0.91f, 0.91f, 0.91f, alpha);
+                               break;
                        }
-                       break;
                }
                
                glCallList(displist2);
index 1638e4ce6291a2030e1fa202c108bd8c6beeca35..40273101ddf486cefa8a7bcf083fb3611f34db02 100644 (file)
@@ -1973,8 +1973,8 @@ short id_frame_has_keyframe(ID *id, float frame, short filter)
                        /* only check keyframes in active action */
                        if (adt)
                                return action_frame_has_keyframe(adt->action, frame, filter);
+                       break;
                }
-               break;
        }
        
        
index 07825f59c2f945d884f02887563019d1cbffcd18..ebe8dccc35625b868cb6f03b1d341008e8e81d79 100644 (file)
@@ -1004,8 +1004,8 @@ int ANIM_apply_keyingset(bContext *C, ListBase *dsources, bAction *act, KeyingSe
                                
                                // XXX: only object transforms?
                                DAG_id_tag_update(&ob->id, OB_RECALC_OB | OB_RECALC_DATA | OB_RECALC_TIME);
+                               break;
                        }
-                       break;
                }
                
                /* send notifiers for updates (this doesn't require context to work!) */
index 0ff0e0d498ce38058c7d1ff4c1067e404abd1c25..ec1662c7fa6a3afa5574b187e87c3114a3fa2bec 100644 (file)
@@ -238,9 +238,8 @@ static void pose_slide_apply_val(tPoseSlideOp *pso, FCurve *fcu, float *val)
                        while (iters-- > 0) {
                                (*val) = (-((sVal * w2) + (eVal * w1)) + ((*val) * 6.0f) ) / 5.0f;
                        }
+                       break;
                }
-               break;
-
                case POSESLIDE_RELAX: /* make the current pose more like its surrounding ones */
                {
                        /* perform a weighted average here, favoring the middle pose
@@ -252,16 +251,15 @@ static void pose_slide_apply_val(tPoseSlideOp *pso, FCurve *fcu, float *val)
                        while (iters-- > 0) {
                                (*val) = ( ((sVal * w2) + (eVal * w1)) + ((*val) * 5.0f) ) / 6.0f;
                        }
+                       break;
                }
-               break;
-
                case POSESLIDE_BREAKDOWN: /* make the current pose slide around between the endpoints */
                {
                        /* perform simple linear interpolation - coefficient for start must come from pso->percentage... */
                        /* TODO: make this use some kind of spline interpolation instead? */
                        (*val) = ((sVal * w2) + (eVal * w1));
+                       break;
                }
-               break;
        }
 }
 
@@ -327,8 +325,8 @@ static void pose_slide_apply_props(tPoseSlideOp *pso, tPChanFCurveLink *pfl)
                                                float tval = RNA_property_float_get(&ptr, prop);
                                                pose_slide_apply_val(pso, fcu, &tval);
                                                RNA_property_float_set(&ptr, prop, tval);
+                                               break;
                                        }
-                                       break;
                                        case PROP_BOOLEAN:
                                        case PROP_ENUM:
                                        case PROP_INT:
@@ -336,8 +334,8 @@ static void pose_slide_apply_props(tPoseSlideOp *pso, tPChanFCurveLink *pfl)
                                                float tval = (float)RNA_property_int_get(&ptr, prop);
                                                pose_slide_apply_val(pso, fcu, &tval);
                                                RNA_property_int_set(&ptr, prop, (int)tval);
+                                               break;
                                        }
-                                       break;
                                        default:
                                                /* cannot handle */
                                                //printf("Cannot Pose Slide non-numerical property\n");
@@ -672,9 +670,8 @@ static int pose_slide_modal(bContext *C, wmOperator *op, const wmEvent *event)
                        
                        /* apply... */
                        pose_slide_apply(C, pso);
+                       break;
                }
-               break;
-                       
                default: /* unhandled event (maybe it was some view manip? */
                        /* allow to pass through */
                        return OPERATOR_RUNNING_MODAL | OPERATOR_PASS_THROUGH;
index 50c348a015ff3255ebaad59f6fea07bba51be4df..bb0a753d9c66b08e3cd212024e5abb049890dda4 100644 (file)
@@ -706,8 +706,8 @@ void draw_gpencil_2dimage(const bContext *C)
                        wmOrtho2(ar->v2d.cur.xmin, ar->v2d.cur.xmax, ar->v2d.cur.ymin, ar->v2d.cur.ymax);
                        
                        dflag |= GP_DRAWDATA_ONLYV2D | GP_DRAWDATA_IEDITHACK;
+                       break;
                }
-               break;
                case SPACE_SEQ: /* sequence */
                {
                        /* just draw using standard scaling (settings here are currently ignored anyways) */
@@ -720,8 +720,8 @@ void draw_gpencil_2dimage(const bContext *C)
                         * and everything moved to standard View2d 
                         */
                        dflag |= GP_DRAWDATA_ONLYV2D;
+                       break;
                }
-               break;
                default: /* for spacetype not yet handled */
                        offsx = 0;
                        offsy = 0;
index 2d24b34e60bcd4a16897d7db88865f790e5bd840..99157b074fda79aceff8134b3b3fe36bd3532bc9 100644 (file)
@@ -112,9 +112,8 @@ bGPdata **gpencil_data_get_pointers(const bContext *C, PointerRNA *ptr)
                                        if (ptr) RNA_id_pointer_create(&ob->id, ptr);
                                        return &ob->gpd;
                                }
+                               break;
                        }
-                       break;
-                       
                        case SPACE_NODE: /* Nodes Editor */
                        {
                                SpaceNode *snode = (SpaceNode *)CTX_wm_space_data(C);
@@ -125,13 +124,10 @@ bGPdata **gpencil_data_get_pointers(const bContext *C, PointerRNA *ptr)
                                        if (ptr) RNA_id_pointer_create(&snode->nodetree->id, ptr);
                                        return &snode->nodetree->gpd;
                                }
-                               else {
-                                       /* even when there is no node-tree, don't allow this to flow to scene */
-                                       return NULL;
-                               }
+
+                               /* even when there is no node-tree, don't allow this to flow to scene */
+                               return NULL;
                        }
-                       break;
-                               
                        case SPACE_SEQ: /* Sequencer */
                        {
                                SpaceSeq *sseq = (SpaceSeq *)CTX_wm_space_data(C);
@@ -141,8 +137,6 @@ bGPdata **gpencil_data_get_pointers(const bContext *C, PointerRNA *ptr)
                                if (ptr) RNA_pointer_create(screen_id, &RNA_SpaceSequenceEditor, sseq, ptr);
                                return &sseq->gpd;
                        }
-                       break;
-                       
                        case SPACE_IMAGE: /* Image/UV Editor */
                        {
                                SpaceImage *sima = (SpaceImage *)CTX_wm_space_data(C);
@@ -152,8 +146,6 @@ bGPdata **gpencil_data_get_pointers(const bContext *C, PointerRNA *ptr)
                                if (ptr) RNA_pointer_create(screen_id, &RNA_SpaceImageEditor, sima, ptr);
                                return &sima->gpd;
                        }
-                       break;
-                               
                        case SPACE_CLIP: /* Nodes Editor */
                        {
                                SpaceClip *sc = (SpaceClip *)CTX_wm_space_data(C);
@@ -178,9 +170,8 @@ bGPdata **gpencil_data_get_pointers(const bContext *C, PointerRNA *ptr)
                                                return &clip->gpd;
                                        }
                                }
+                               break;
                        }
-                       break;
-                               
                        default: /* unsupported space */
                                return NULL;
                }
index dc5e12df7669801826bc3be466b282cfeffbf42e..4c5727f16ed8c79edc06fd866d9d63a54a830b8a 100644 (file)
@@ -1084,9 +1084,8 @@ static int gp_session_initdata(bContext *C, tGPsdata *p)
                                        printf("Error: 3D-View active region doesn't have any region data, so cannot be drawable\n");
                                return 0;
                        }
+                       break;
                }
-               break;
-               
                case SPACE_NODE:
                {
                        /* SpaceNode *snode = curarea->spacedata.first; */
@@ -1095,8 +1094,8 @@ static int gp_session_initdata(bContext *C, tGPsdata *p)
                        p->sa = curarea;
                        p->ar = ar;
                        p->v2d = &ar->v2d;
+                       break;
                }
-               break;
                case SPACE_SEQ:
                {
                        SpaceSeq *sseq = curarea->spacedata.first;
@@ -1113,8 +1112,8 @@ static int gp_session_initdata(bContext *C, tGPsdata *p)
                                        printf("Error: In active view (sequencer), active mode doesn't support Grease Pencil\n");
                                return 0;
                        }
+                       break;
                }
-               break;
                case SPACE_IMAGE:
                {
                        /* SpaceImage *sima = curarea->spacedata.first; */
@@ -1123,8 +1122,8 @@ static int gp_session_initdata(bContext *C, tGPsdata *p)
                        p->sa = curarea;
                        p->ar = ar;
                        p->v2d = &ar->v2d;
+                       break;
                }
-               break;
                case SPACE_CLIP:
                {
                        SpaceClip *sc = curarea->spacedata.first;
@@ -1151,9 +1150,8 @@ static int gp_session_initdata(bContext *C, tGPsdata *p)
                                p->imat[3][0] -= marker->pos[0];
                                p->imat[3][1] -= marker->pos[1];
                        }
+                       break;
                }
-               break;
-               
                /* unsupported views */
                default:
                {
@@ -1162,7 +1160,6 @@ static int gp_session_initdata(bContext *C, tGPsdata *p)
                                printf("Error: Active view not appropriate for Grease Pencil drawing\n");
                        return 0;
                }
-               break;
        }
        
        /* get gp-data */
@@ -1295,21 +1292,18 @@ static void gp_paint_initstroke(tGPsdata *p, short paintmode)
                        case SPACE_VIEW3D:
                        {
                                p->gpd->sbuffer_sflag |= GP_STROKE_3DSPACE;
+                               break;
                        }
-                       break;
-                       
                        case SPACE_NODE:
                        {
                                p->gpd->sbuffer_sflag |= GP_STROKE_2DSPACE;
+                               break;
                        }
-                       break;
-                       
                        case SPACE_SEQ:
                        {
                                p->gpd->sbuffer_sflag |= GP_STROKE_2DSPACE;
+                               break;
                        }
-                       break;
-                       
                        case SPACE_IMAGE:
                        {
                                SpaceImage *sima = (SpaceImage *)p->sa->spacedata.first;
@@ -1324,16 +1318,16 @@ static void gp_paint_initstroke(tGPsdata *p, short paintmode)
                                        p->gpd->sbuffer_sflag &= ~GP_STROKE_2DSPACE;
                                        p->gpd->flag &= ~GP_DATA_VIEWALIGN;
                                }
-                               else
+                               else {
                                        p->gpd->sbuffer_sflag |= GP_STROKE_2DSPACE;
+                               }
+                               break;
                        }
-                       break;
-                               
                        case SPACE_CLIP:
                        {
                                p->gpd->sbuffer_sflag |= GP_STROKE_2DSPACE;
+                               break;
                        }
-                       break;
                }
        }
 }
index fe5b129e938d53be26958552fc178fb0057f887e..f656d22fc644269bb6259bdea6ffd5dde9941449 100644 (file)
@@ -209,9 +209,8 @@ void UI_view2d_region_reinit(View2D *v2d, short type, int winx, int winy)
                        }
                        /* scrollers - should we have these by default? */
                        /* XXX for now, we don't override this, or set it either! */
+                       break;
                }
-               break;
-               
                /* 'list/channel view' - zoom, aspect ratio, and alignment restrictions are set here */
                case V2D_COMMONVIEW_LIST:
                {
@@ -225,9 +224,8 @@ void UI_view2d_region_reinit(View2D *v2d, short type, int winx, int winy)
                        tot_changed = do_init;
                        
                        /* scroller settings are currently not set here... that is left for regions... */
+                       break;
                }
-               break;
-                       
                /* 'stack view' - practically the same as list/channel view, except is located in the pos y half instead. 
                 *  zoom, aspect ratio, and alignment restrictions are set here */
                case V2D_COMMONVIEW_STACK:
@@ -242,9 +240,8 @@ void UI_view2d_region_reinit(View2D *v2d, short type, int winx, int winy)
                        tot_changed = do_init;
                        
                        /* scroller settings are currently not set here... that is left for regions... */
+                       break;
                }
-               break;
-                       
                /* 'header' regions - zoom, aspect ratio, alignment, and panning restrictions are set here */
                case V2D_COMMONVIEW_HEADER:
                {
@@ -272,10 +269,8 @@ void UI_view2d_region_reinit(View2D *v2d, short type, int winx, int winy)
                        
                        /* absolutely no scrollers allowed */
                        v2d->scroll = 0;
-                       
+                       break;
                }
-               break;
-               
                /* panels view, with horizontal/vertical align */
                case V2D_COMMONVIEW_PANELS_UI:
                {
@@ -308,9 +303,8 @@ void UI_view2d_region_reinit(View2D *v2d, short type, int winx, int winy)
                                v2d->cur.ymax = 0.0f;
                                v2d->cur.ymin = (-winy) * panelzoom;
                        }
+                       break;
                }
-               break;
-                       
                /* other view types are completely defined using their own settings already */
                default:
                        /* we don't do anything here, as settings should be fine, but just make sure that rect */
@@ -1739,9 +1733,8 @@ void UI_view2d_scrollers_draw(const bContext *C, View2D *v2d, View2DScrollers *v
                                                        fac2 = fac2 - time;
                                                        
                                                        scroll_printstr(scene, fac, h, time + (float)FPS * fac2 / 100.0f, grid->powerx, V2D_UNIT_SECONDSSEQ, 'h');
+                                                       break;
                                                }
-                                               break;
-                                                       
                                                case V2D_UNIT_DEGREES:      /* Graph Editor for rotation Drivers */
                                                        /* HACK: although we're drawing horizontal, we make this draw as 'vertical', just to get degree signs */
                                                        scroll_printstr(scene, fac, h, val, grid->powerx, V2D_UNIT_DEGREES, 'v');
index e12817262f849e357e0af3ef8a7ff8a4a8653316..772bd6fe671a2a5c4edf9f566334c8675a2755d6 100644 (file)
@@ -247,8 +247,8 @@ static int view_pan_modal(bContext *C, wmOperator *op, const wmEvent *event)
                        vpd->lasty = event->y;
                        
                        view_pan_apply(op);
+                       break;
                }
-               break;
                        /* XXX - Mode switching isn't implemented. See comments in 36818.
                         * switch to zoom */
 #if 0
@@ -1674,9 +1674,8 @@ static int scroller_activate_modal(bContext *C, wmOperator *op, const wmEvent *e
                        vsm->lasty = event->y;
                        
                        scroller_activate_apply(C, op);
+                       break;
                }
-               break;
-                       
                case LEFTMOUSE:
                case MIDDLEMOUSE:
                        if (event->val == KM_RELEASE) {
index 0de468bac43b51f8cfa609638000960295eee364..fbb179464544f06e67f510a5296e2271fa388e13 100644 (file)
@@ -670,8 +670,8 @@ static int lattice_flip_exec(bContext *C, wmOperator *op)
                                        }
                                }
                        }
+                       break;
                }
-               break;
                case LATTICE_FLIP_V:
                {
                        int u, v, w;
@@ -691,8 +691,8 @@ static int lattice_flip_exec(bContext *C, wmOperator *op)
                                        }
                                }
                        }
+                       break;
                }
-               break;
                case LATTICE_FLIP_W:
                {
                        int u, v, w;
@@ -711,9 +711,8 @@ static int lattice_flip_exec(bContext *C, wmOperator *op)
                                        }
                                }
                        }
+                       break;
                }
-               break;
-               
                default: /* shouldn't happen, but just in case */
                        break;
        }
index 75c1f956f1b12e7b6fcd9063054298da740d735b..f6fc21f94f5c24195727114c145dc69c1791576b 100644 (file)
@@ -494,23 +494,21 @@ void ED_object_parent_clear(Object *ob, int type)
                        
                        /* clear parenting relationship completely */
                        ob->parent = NULL;
+                       break;
                }
-               break;
-               
                case CLEAR_PARENT_KEEP_TRANSFORM:
                {
                        /* remove parent, and apply the parented transform result as object's local transforms */
                        ob->parent = NULL;
                        BKE_object_apply_mat4(ob, ob->obmat, TRUE, FALSE);
+                       break;
                }
-               break;
-               
                case CLEAR_PARENT_INVERSE:
                {
                        /* object stays parented, but the parent inverse (i.e. offset from parent to retain binding state) is cleared */
                        unit_m4(ob->parentinv);
+                       break;
                }
-               break;
        }
        
        DAG_id_tag_update(&ob->id, OB_RECALC_OB | OB_RECALC_DATA | OB_RECALC_TIME);
index 3cdc2c771fc7c64a22dc98eda5331c85e537b7c4..49ecfe2940e9792fd9e6cb6e7414726de33e2968 100644 (file)
@@ -1066,21 +1066,21 @@ static int freestyle_modifier_remove_exec(bContext *C, wmOperator *op)
        }
 
        switch (freestyle_get_modifier_type(&ptr)) {
-       case LS_MODIFIER_TYPE_COLOR:
-               BKE_remove_linestyle_color_modifier(lineset->linestyle, modifier);
-               break;
-       case LS_MODIFIER_TYPE_ALPHA:
-               BKE_remove_linestyle_alpha_modifier(lineset->linestyle, modifier);
-               break;
-       case LS_MODIFIER_TYPE_THICKNESS:
-               BKE_remove_linestyle_thickness_modifier(lineset->linestyle, modifier);
-               break;
-       case LS_MODIFIER_TYPE_GEOMETRY:
-               BKE_remove_linestyle_geometry_modifier(lineset->linestyle, modifier);
-               break;
-       default:
-               BKE_report(op->reports, RPT_ERROR, "The object the data pointer refers to is not a valid modifier");
-               return OPERATOR_CANCELLED;
+               case LS_MODIFIER_TYPE_COLOR:
+                       BKE_remove_linestyle_color_modifier(lineset->linestyle, modifier);
+                       break;
+               case LS_MODIFIER_TYPE_ALPHA:
+                       BKE_remove_linestyle_alpha_modifier(lineset->linestyle, modifier);
+                       break;
+               case LS_MODIFIER_TYPE_THICKNESS:
+                       BKE_remove_linestyle_thickness_modifier(lineset->linestyle, modifier);
+                       break;
+               case LS_MODIFIER_TYPE_GEOMETRY:
+                       BKE_remove_linestyle_geometry_modifier(lineset->linestyle, modifier);
+                       break;
+               default:
+                       BKE_report(op->reports, RPT_ERROR, "The object the data pointer refers to is not a valid modifier");
+                       return OPERATOR_CANCELLED;
        }
        WM_event_add_notifier(C, NC_SCENE | ND_RENDER_OPTIONS, scene);
 
@@ -1116,21 +1116,21 @@ static int freestyle_modifier_copy_exec(bContext *C, wmOperator *op)
        }
 
        switch (freestyle_get_modifier_type(&ptr)) {
-       case LS_MODIFIER_TYPE_COLOR:
-               BKE_copy_linestyle_color_modifier(lineset->linestyle, modifier);
-               break;
-       case LS_MODIFIER_TYPE_ALPHA:
-               BKE_copy_linestyle_alpha_modifier(lineset->linestyle, modifier);
-               break;
-       case LS_MODIFIER_TYPE_THICKNESS:
-               BKE_copy_linestyle_thickness_modifier(lineset->linestyle, modifier);
-               break;
-       case LS_MODIFIER_TYPE_GEOMETRY:
-               BKE_copy_linestyle_geometry_modifier(lineset->linestyle, modifier);
-               break;
-       default:
-               BKE_report(op->reports, RPT_ERROR, "The object the data pointer refers to is not a valid modifier");
-               return OPERATOR_CANCELLED;
+               case LS_MODIFIER_TYPE_COLOR:
+                       BKE_copy_linestyle_color_modifier(lineset->linestyle, modifier);
+                       break;
+               case LS_MODIFIER_TYPE_ALPHA:
+                       BKE_copy_linestyle_alpha_modifier(lineset->linestyle, modifier);
+                       break;
+               case LS_MODIFIER_TYPE_THICKNESS:
+                       BKE_copy_linestyle_thickness_modifier(lineset->linestyle, modifier);
+                       break;
+               case LS_MODIFIER_TYPE_GEOMETRY:
+                       BKE_copy_linestyle_geometry_modifier(lineset->linestyle, modifier);
+                       break;
+               default:
+                       BKE_report(op->reports, RPT_ERROR, "The object the data pointer refers to is not a valid modifier");
+                       return OPERATOR_CANCELLED;
        }
        WM_event_add_notifier(C, NC_SCENE | ND_RENDER_OPTIONS, scene);
 
@@ -1167,21 +1167,21 @@ static int freestyle_modifier_move_exec(bContext *C, wmOperator *op)
        }
 
        switch (freestyle_get_modifier_type(&ptr)) {
-       case LS_MODIFIER_TYPE_COLOR:
-               BKE_move_linestyle_color_modifier(lineset->linestyle, modifier, dir);
-               break;
-       case LS_MODIFIER_TYPE_ALPHA:
-               BKE_move_linestyle_alpha_modifier(lineset->linestyle, modifier, dir);
-               break;
-       case LS_MODIFIER_TYPE_THICKNESS:
-               BKE_move_linestyle_thickness_modifier(lineset->linestyle, modifier, dir);
-               break;
-       case LS_MODIFIER_TYPE_GEOMETRY:
-               BKE_move_linestyle_geometry_modifier(lineset->linestyle, modifier, dir);
-               break;
-       default:
-               BKE_report(op->reports, RPT_ERROR, "The object the data pointer refers to is not a valid modifier");
-               return OPERATOR_CANCELLED;
+               case LS_MODIFIER_TYPE_COLOR:
+                       BKE_move_linestyle_color_modifier(lineset->linestyle, modifier, dir);
+                       break;
+               case LS_MODIFIER_TYPE_ALPHA:
+                       BKE_move_linestyle_alpha_modifier(lineset->linestyle, modifier, dir);
+                       break;
+               case LS_MODIFIER_TYPE_THICKNESS:
+                       BKE_move_linestyle_thickness_modifier(lineset->linestyle, modifier, dir);
+                       break;
+               case LS_MODIFIER_TYPE_GEOMETRY:
+                       BKE_move_linestyle_geometry_modifier(lineset->linestyle, modifier, dir);
+                       break;
+               default:
+                       BKE_report(op->reports, RPT_ERROR, "The object the data pointer refers to is not a valid modifier");
+                       return OPERATOR_CANCELLED;
        }
        WM_event_add_notifier(C, NC_SCENE | ND_RENDER_OPTIONS, scene);
 
index c70841ffe82eac15b0764524f0d308508fcf9089..0ef5b1561f191f3735872a1bb38bb97e5a755c25 100644 (file)
@@ -2463,8 +2463,8 @@ static int area_join_modal(bContext *C, wmOperator *op, const wmEvent *event)
                                        WM_event_add_notifier(C, NC_WINDOW, NULL);
                                }
                        }
+                       break;
                }
-               break;
                case LEFTMOUSE:
                        if (event->val == KM_RELEASE) {
                                ED_area_tag_redraw(jd->sa1);
index 4b1954c8889339ea49a7283d7678998c76424a9a..b5f6fa9a23e044e7d2c0691e7d7a07d6cdf843c4 100644 (file)
@@ -226,39 +226,35 @@ void draw_channel_strips(bAnimContext *ac, SpaceAction *saction, ARegion *ar)
                                                {
                                                        /* reddish color from NLA */
                                                        UI_ThemeColor4(TH_ANIM_ACTIVE);
+                                                       break;
                                                }
-                                               break;
-                                               
                                                case ANIMTYPE_SCENE:
                                                case ANIMTYPE_OBJECT:
                                                {
                                                        if (sel) glColor4ub(col1b[0], col1b[1], col1b[2], 0x45); 
                                                        else glColor4ub(col1b[0], col1b[1], col1b[2], 0x22); 
+                                                       break;
                                                }
-                                               break;
-                                               
                                                case ANIMTYPE_FILLACTD:
                                                case ANIMTYPE_DSSKEY:
                                                case ANIMTYPE_DSWOR:
                                                {
                                                        if (sel) glColor4ub(col2b[0], col2b[1], col2b[2], 0x45); 
                                                        else glColor4ub(col2b[0], col2b[1], col2b[2], 0x22); 
+                                                       break;
                                                }
-                                               break;
-                                               
                                                case ANIMTYPE_GROUP:
                                                {
                                                        if (sel) glColor4ub(col1a[0], col1a[1], col1a[2], 0x22);
                                                        else glColor4ub(col2a[0], col2a[1], col2a[2], 0x22);
+                                                       break;
                                                }
-                                               break;
-                                               
                                                default:
                                                {
                                                        if (sel) glColor4ub(col1[0], col1[1], col1[2], 0x22);
                                                        else glColor4ub(col2[0], col2[1], col2[2], 0x22);
+                                                       break;
                                                }
-                                               break;
                                        }
                                        
                                        /* draw region twice: firstly backdrop, then the current range */
index eb755e162a344ace2ebb914c637ee30a83cf90fe..9d124cf08eee5f874dc58373493962f4114c6628 100644 (file)
@@ -1079,26 +1079,26 @@ static void mouse_action_keys(bAnimContext *ac, const int mval[2], short select_
                                {
                                        Scene *scene = (Scene *)ale->key_data;
                                        scene_to_keylist(ads, scene, &anim_keys, NULL);
+                                       break;
                                }
-                               break;
                                case ALE_OB:
                                {
                                        Object *ob = (Object *)ale->key_data;
                                        ob_to_keylist(ads, ob, &anim_keys, NULL);
+                                       break;
                                }
-                               break;
                                case ALE_ACT:
                                {
                                        bAction *act = (bAction *)ale->key_data;
                                        action_to_keylist(adt, act, &anim_keys, NULL);
+                                       break;
                                }
-                               break;
                                case ALE_FCURVE:
                                {
                                        FCurve *fcu = (FCurve *)ale->key_data;
                                        fcurve_to_keylist(adt, fcu, &anim_keys, NULL);
+                                       break;
                                }
-                               break;
                        }
                }
                else if (ale->type == ANIMTYPE_SUMMARY) {
index 2cbb2373be8cbf94eb3cd8a3d79bb25efa3101d6..e6aff9d4d4f2b80a3e269f6be671f890bd93d5f0 100644 (file)
@@ -1353,8 +1353,8 @@ static void clip_header_area_listener(bScreen *UNUSED(sc), ScrArea *UNUSED(sa),
                                        // if (sc->mode == SC_MODE_MASKEDIT)
                                {
                                        ED_region_tag_redraw(ar);
+                                       break;
                                }
-                               break;
                        }
                        break;
        }
index 8f9893e3bce3f566e8340bf3ddb72a46b1da2bec..a81c0d6dfd6f1a0b7596acc49a31d4a90742b0b7 100644 (file)
@@ -383,8 +383,8 @@ static void do_graph_region_driver_buttons(bContext *C, void *UNUSED(arg), int e
                {
                        /* rebuild depsgraph for the new deps */
                        DAG_relations_tag_update(bmain);
+                       break;
                }
-               break;
        }
        
        /* default for now */
index 765c61b5bedd0e66838b56abbb577a7a40069042..25101d89f1d40dd43dfb1f54096f11de5d6d094d 100644 (file)
@@ -518,15 +518,13 @@ static void graph_refresh(const bContext *C, ScrArea *sa)
        switch (sipo->mode) {
                case SIPO_MODE_ANIMATION: /* all animation */
                {
-                       
+                       break;
                }
-               break;
                
                case SIPO_MODE_DRIVERS: /* drivers only  */
                {
-               
+                       break;
                }
-               break;
        }
        
        /* region updates? */
@@ -563,11 +561,12 @@ static void graph_refresh(const bContext *C, ScrArea *sa)
                        /* set color of curve here */
                        switch (fcu->color_mode) {
                                case FCURVE_COLOR_CUSTOM:
+                               {
                                        /* User has defined a custom color for this curve already (we assume it's not going to cause clashes with text colors),
                                         * which should be left alone... Nothing needs to be done here.
                                         */
                                        break;
-                                       
+                               }
                                case FCURVE_COLOR_AUTO_RGB:
                                {
                                        /* F-Curve's array index is automatically mapped to RGB values. This works best of 3-value vectors. 
@@ -590,9 +589,8 @@ static void graph_refresh(const bContext *C, ScrArea *sa)
                                                        col[0] = 0.3f; col[1] = 0.8f; col[2] = 1.0f;
                                                        break;
                                        }
+                                       break;
                                }
-                               break;
-                               
                                case FCURVE_COLOR_AUTO_RAINBOW:
                                default:
                                {
@@ -600,8 +598,8 @@ static void graph_refresh(const bContext *C, ScrArea *sa)
                                         * of current item index + total items to determine some RGB color
                                         */
                                        getcolor_fcurve_rainbow(i, items, fcu->color);
+                                       break;
                                }
-                               break;
                        }
                }
                
index 9206f3f024a060223aa31e1f4003e920ffd7f63f..4cda92fbe07f50f2523dd55057a5d06debc62650 100644 (file)
@@ -125,9 +125,8 @@ static int nla_panel_context(const bContext *C, PointerRNA *adt_ptr, PointerRNA
                                }
                                
                                found = 1;
+                               break;
                        }
-                       break;
-                               
                        case ANIMTYPE_SCENE:    /* Top-Level Widgets doubling up as datablocks */
                        case ANIMTYPE_OBJECT:
                        case ANIMTYPE_DSMAT:    /* Datablock AnimData Expanders */
@@ -167,8 +166,8 @@ static int nla_panel_context(const bContext *C, PointerRNA *adt_ptr, PointerRNA
                                         */
                                        found = -1;
                                }
+                               break;
                        }
-                       break;
                }
                
                if (found > 0)
index bf914a056202e3b055522507cb14c36cf33e639b..defe842a794600e1a5c3700e2fb4886081242672 100644 (file)
@@ -119,8 +119,8 @@ static int mouse_nla_channels(bAnimContext *ac, float x, int channel_index, shor
                        }
                        
                        notifierFlags |= (ND_ANIMCHAN | NA_SELECTED);
+                       break;
                }
-               break;
                case ANIMTYPE_OBJECT:
                {
                        bDopeSheet *ads = (bDopeSheet *)ac->data;
@@ -161,9 +161,8 @@ static int mouse_nla_channels(bAnimContext *ac, float x, int channel_index, shor
                                /* notifiers - channel was selected */
                                notifierFlags |= (ND_ANIMCHAN | NA_SELECTED);
                        }
+                       break;
                }
-               break;
-                       
                case ANIMTYPE_FILLACTD: /* Action Expander */
                case ANIMTYPE_DSMAT:    /* Datablock AnimData Expanders */
                case ANIMTYPE_DSLAM:
@@ -200,9 +199,8 @@ static int mouse_nla_channels(bAnimContext *ac, float x, int channel_index, shor
                        }
                        
                        notifierFlags |= (ND_ANIMCHAN | NA_SELECTED);
+                       break;
                }
-               break;
-                       
                case ANIMTYPE_NLATRACK:
                {
                        NlaTrack *nlt = (NlaTrack *)ale->data;
@@ -260,8 +258,8 @@ static int mouse_nla_channels(bAnimContext *ac, float x, int channel_index, shor
                                /* notifier flags - channel was selected */
                                notifierFlags |= (ND_ANIMCHAN | NA_SELECTED);
                        }
+                       break;
                }
-               break;
                case ANIMTYPE_NLAACTION:
                {
                        AnimData *adt = BKE_animdata_from_id(ale->id);
@@ -316,9 +314,8 @@ static int mouse_nla_channels(bAnimContext *ac, float x, int channel_index, shor
                                        notifierFlags |= (ND_ANIMCHAN | NA_SELECTED);
                                }
                        }
+                       break;
                }
-               break;
-                       
                default:
                        if (G.debug & G_DEBUG)
                                printf("Error: Invalid channel type in mouse_nla_channels()\n");
index 5f3e1ef88e32b91b732332270e2ad45ef7696e99..93007cc08203e4a4a8450c0fbb2143c9e2b1c64a 100644 (file)
@@ -563,9 +563,8 @@ void draw_nla_main_data(bAnimContext *ac, SpaceNla *snla, ARegion *ar)
                                                                nla_draw_strip_frames_text(nlt, strip, v2d, yminc, ymaxc);
                                                }
                                        }
+                                       break;
                                }
-                               break;
-                                       
                                case ANIMTYPE_NLAACTION:
                                {
                                        AnimData *adt = ale->adt;
@@ -603,8 +602,8 @@ void draw_nla_main_data(bAnimContext *ac, SpaceNla *snla, ARegion *ar)
                                        fdrawline(v2d->cur.xmin, ymaxc - NLACHANNEL_SKIP, v2d->cur.xmax, ymaxc - NLACHANNEL_SKIP);
                                        
                                        glDisable(GL_BLEND);
+                                       break;
                                }
-                               break;
                        }
                }
                
@@ -684,8 +683,8 @@ static void draw_nla_channel_list_gl(bAnimContext *ac, ListBase *anim_data, View
                                        
                                        /* draw manually still */
                                        do_draw = TRUE;
+                                       break;
                                }
-                               break;
                                case ANIMTYPE_NLAACTION: /* NLA Action-Line */
                                {
                                        bAction *act = (bAction *)ale->data;
@@ -698,9 +697,8 @@ static void draw_nla_channel_list_gl(bAnimContext *ac, ListBase *anim_data, View
 
                                        /* draw manually still */
                                        do_draw = TRUE;
+                                       break;
                                }
-                               break;
-                                       
                                default: /* handled by standard channel-drawing API */
                                        // draw backdrops only...
                                        ANIM_channel_draw(ac, ale, yminc, ymaxc);
@@ -725,17 +723,15 @@ static void draw_nla_channel_list_gl(bAnimContext *ac, ListBase *anim_data, View
                                                                /* same as for textures */
                                                                offset = 0.7f * U.widget_unit;
                                                                indent = 1;
+                                                               break;
                                                        }
-                                                       break;
-                                                               
                                                        case NTREE_TEXTURE:
                                                        {
                                                                /* even more */
                                                                offset = U.widget_unit;
                                                                indent = 1;
+                                                               break;
                                                        }
-                                                       break;
-                                                               
                                                        default:
                                                                /* normal will do */
                                                                offset = 0.7f * U.widget_unit;
index 7da06bcf3a6e4ddfba629c76c1ca1661cb253b4a..dce04bb8c42c6e47c6f57bcf316c5ff0002a34fd 100644 (file)
@@ -91,18 +91,18 @@ static bNodeTree *node_tree_from_ID(ID *id)
                short idtype = GS(id->name);
        
                switch (idtype) {
-               case ID_NT:
-                       return (bNodeTree *)id;
-               case ID_MA:
-                       return ((Material *)id)->nodetree;
-               case ID_LA:
-                       return ((Lamp *)id)->nodetree;
-               case ID_WO:
-                       return ((World *)id)->nodetree;
-               case ID_SCE:
-                       return ((Scene *)id)->nodetree;
-               case ID_TE:
-                       return ((Tex *)id)->nodetree;
+                       case ID_NT:
+                               return (bNodeTree *)id;
+                       case ID_MA:
+                               return ((Material *)id)->nodetree;
+                       case ID_LA:
+                               return ((Lamp *)id)->nodetree;
+                       case ID_WO:
+                               return ((World *)id)->nodetree;
+                       case ID_SCE:
+                               return ((Scene *)id)->nodetree;
+                       case ID_TE:
+                               return ((Tex *)id)->nodetree;
                }
        }
        
index b74d1bf2ef8d863e1339aad63c4b98c769577015..83c11e69d8477de7f5455acb011613d42fc31856 100644 (file)
@@ -675,23 +675,23 @@ static void ui_node_draw_input(uiLayout *layout, bContext *C, bNodeTree *ntree,
                /* input not linked, show value */
                if (!(input->flag & SOCK_HIDE_VALUE)) {
                        switch (input->type) {
-                       case SOCK_FLOAT:
-                       case SOCK_INT:
-                       case SOCK_BOOLEAN:
-                       case SOCK_RGBA:
-                       case SOCK_STRING:
-                               row = uiLayoutRow(split, TRUE);
-                               uiItemR(row, &inputptr, "default_value", 0, "", ICON_NONE);
-                               break;
-                       case SOCK_VECTOR:
-                               row = uiLayoutRow(split, FALSE);
-                               col = uiLayoutColumn(row, FALSE);
-                               uiItemR(col, &inputptr, "default_value", 0, "", ICON_NONE);
-                               break;
-                               
-                       default:
-                               row = uiLayoutRow(split, FALSE);
-                               break;
+                               case SOCK_FLOAT:
+                               case SOCK_INT:
+                               case SOCK_BOOLEAN:
+                               case SOCK_RGBA:
+                               case SOCK_STRING:
+                                       row = uiLayoutRow(split, TRUE);
+                                       uiItemR(row, &inputptr, "default_value", 0, "", ICON_NONE);
+                                       break;
+                               case SOCK_VECTOR:
+                                       row = uiLayoutRow(split, FALSE);
+                                       col = uiLayoutColumn(row, FALSE);
+                                       uiItemR(col, &inputptr, "default_value", 0, "", ICON_NONE);
+                                       break;
+                                       
+                               default:
+                                       row = uiLayoutRow(split, FALSE);
+                                       break;
                        }
                }
                else
index cfcc4641afdac07889a7d48b761f3fa5a1a635fa..93d0ff4f8c0497514bbf7b9982d0c9f302ac2e77 100644 (file)
@@ -464,8 +464,8 @@ static void namebutton_cb(bContext *C, void *tsep, char *oldname)
                                                ED_armature_bone_rename(obedit->data, oldname, newname);
                                                WM_event_add_notifier(C, NC_OBJECT | ND_POSE, OBACT);
                                        }
+                                       break;
                                }
-                               break;
 
                                case TSE_BONE:
                                {
@@ -482,8 +482,8 @@ static void namebutton_cb(bContext *C, void *tsep, char *oldname)
                                        BLI_strncpy(bone->name, oldname, sizeof(bone->name));
                                        ED_armature_bone_rename(ob->data, oldname, newname);
                                        WM_event_add_notifier(C, NC_OBJECT | ND_POSE, ob);
+                                       break;
                                }
-                               break;
                                case TSE_POSE_CHANNEL:
                                {
                                        bPoseChannel *pchan = te->directdata;
@@ -499,8 +499,8 @@ static void namebutton_cb(bContext *C, void *tsep, char *oldname)
                                        BLI_strncpy(pchan->name, oldname, sizeof(pchan->name));
                                        ED_armature_bone_rename(ob->data, oldname, newname);
                                        WM_event_add_notifier(C, NC_OBJECT | ND_POSE, ob);
+                                       break;
                                }
-                               break;
                                case TSE_POSEGRP:
                                {
                                        Object *ob = (Object *)tselem->id; // id = object
@@ -509,8 +509,8 @@ static void namebutton_cb(bContext *C, void *tsep, char *oldname)
                                        BLI_uniquename(&ob->pose->agroups, grp, CTX_DATA_(BLF_I18NCONTEXT_ID_ACTION, "Group"), '.',
                                                       offsetof(bActionGroup, name), sizeof(grp->name));
                                        WM_event_add_notifier(C, NC_OBJECT | ND_POSE, ob);
+                                       break;
                                }
-                               break;
                                case TSE_R_LAYER:
                                        break;
                        }
index 2f97108c5ee55c9ca423aaa9a280d8a356937e7a..0161f53e6905925cce37b35f8c07569005592bcf 100644 (file)
@@ -1181,14 +1181,14 @@ static void do_outliner_drivers_editop(SpaceOops *soops, ListBase *tree, ReportL
                                                {
                                                        /* add a new driver with the information obtained (only if valid) */
                                                        ANIM_add_driver(reports, id, path, array_index, dflags, DRIVER_TYPE_PYTHON);
+                                                       break;
                                                }
-                                               break;
                                                case DRIVERS_EDITMODE_REMOVE:
                                                {
                                                        /* remove driver matching the information obtained (only if valid) */
                                                        ANIM_remove_driver(reports, id, path, array_index, dflags);
+                                                       break;
                                                }
-                                               break;
                                        }
                                }
                                
index 9b9e7bef42c7a6b64357bfa53271d494975aea59..fb56c5c6dfe9a2733e0a604e3e07e9059c3a123e 100644 (file)
@@ -854,17 +854,15 @@ static int outliner_id_operation_exec(bContext *C, wmOperator *op)
                                        BKE_report(op->reports, RPT_WARNING, "Not yet implemented");
                                        break;
                        }
+                       break;
                }
-               break;
-                       
                case OUTLINER_IDOP_LOCAL:
                {
                        /* make local */
                        outliner_do_libdata_operation(C, scene, soops, &soops->tree, id_local_cb);
                        ED_undo_push(C, "Localized Data");
+                       break;
                }
-               break;
-                       
                case OUTLINER_IDOP_SINGLE:
                {
                        /* make single user */
@@ -887,9 +885,8 @@ static int outliner_id_operation_exec(bContext *C, wmOperator *op)
                                        BKE_report(op->reports, RPT_WARNING, "Not yet implemented");
                                        break;
                        }
+                       break;
                }
-               break;
-                       
                case OUTLINER_IDOP_FAKE_ADD:
                {
                        /* set fake user */
@@ -897,9 +894,8 @@ static int outliner_id_operation_exec(bContext *C, wmOperator *op)
                        
                        WM_event_add_notifier(C, NC_ID | NA_EDITED, NULL);
                        ED_undo_push(C, "Add Fake User");
+                       break;
                }
-               break;
-                       
                case OUTLINER_IDOP_FAKE_CLEAR:
                {
                        /* clear fake user */
@@ -907,8 +903,8 @@ static int outliner_id_operation_exec(bContext *C, wmOperator *op)
                        
                        WM_event_add_notifier(C, NC_ID | NA_EDITED, NULL);
                        ED_undo_push(C, "Clear Fake User");
+                       break;
                }
-               break;
                case OUTLINER_IDOP_RENAME:
                {
                        /* rename */
@@ -916,9 +912,8 @@ static int outliner_id_operation_exec(bContext *C, wmOperator *op)
                        
                        WM_event_add_notifier(C, NC_ID | NA_EDITED, NULL);
                        ED_undo_push(C, "Rename");
+                       break;
                }
-               break;
-
                case OUTLINER_IDOP_SELECT_LINKED:
                        outliner_do_libdata_operation(C, scene, soops, &soops->tree, id_select_linked_cb);
                        ED_undo_push(C, "Select");
index 08d32defd98669ec7ebadf092a96bcc216435987..7d3ec148662ca58c1430e893039d3f4b5e59aa81 100644 (file)
@@ -616,18 +616,18 @@ static void outliner_add_id_contents(SpaceOops *soops, TreeElement *te, TreeStor
                case ID_LI:
                {
                        te->name = ((Library *)id)->name;
+                       break;
                }
-               break;
                case ID_SCE:
                {
                        outliner_add_scene_contents(soops, &te->subtree, (Scene *)id, te);
+                       break;
                }
-               break;
                case ID_OB:
                {
                        outliner_add_object_contents(soops, te, tselem, (Object *)id);
+                       break;
                }
-               break;
                case ID_ME:
                {
                        Mesh *me = (Mesh *)id;
@@ -641,8 +641,8 @@ static void outliner_add_id_contents(SpaceOops *soops, TreeElement *te, TreeStor
                                outliner_add_element(soops, &te->subtree, me->mat[a], te, 0, a);
                        /* could do tfaces with image links, but the images are not grouped nicely.
                         * would require going over all tfaces, sort images in use. etc... */
+                       break;
                }
-               break;
                case ID_CU:
                {
                        Curve *cu = (Curve *)id;
@@ -653,8 +653,8 @@ static void outliner_add_id_contents(SpaceOops *soops, TreeElement *te, TreeStor
                        
                        for (a = 0; a < cu->totcol; a++)
                                outliner_add_element(soops, &te->subtree, cu->mat[a], te, 0, a);
+                       break;
                }
-               break;
                case ID_MB:
                {
                        MetaBall *mb = (MetaBall *)id;
@@ -665,8 +665,8 @@ static void outliner_add_id_contents(SpaceOops *soops, TreeElement *te, TreeStor
                        
                        for (a = 0; a < mb->totcol; a++)
                                outliner_add_element(soops, &te->subtree, mb->mat[a], te, 0, a);
+                       break;
                }
-               break;
                case ID_MA:
                {
                        Material *ma = (Material *)id;
@@ -678,8 +678,8 @@ static void outliner_add_id_contents(SpaceOops *soops, TreeElement *te, TreeStor
                        for (a = 0; a < MAX_MTEX; a++) {
                                if (ma->mtex[a]) outliner_add_element(soops, &te->subtree, ma->mtex[a]->tex, te, 0, a);
                        }
+                       break;
                }
-               break;
                case ID_TE:
                {
                        Tex *tex = (Tex *)id;
@@ -688,16 +688,16 @@ static void outliner_add_id_contents(SpaceOops *soops, TreeElement *te, TreeStor
                                outliner_add_element(soops, &te->subtree, tex, te, TSE_ANIM_DATA, 0);
                        
                        outliner_add_element(soops, &te->subtree, tex->ima, te, 0, 0);
+                       break;
                }
-               break;
                case ID_CA:
                {
                        Camera *ca = (Camera *)id;
                        
                        if (outliner_animdata_test(ca->adt))
                                outliner_add_element(soops, &te->subtree, ca, te, TSE_ANIM_DATA, 0);
+                       break;
                }
-               break;
                case ID_LA:
                {
                        Lamp *la = (Lamp *)id;
@@ -709,16 +709,16 @@ static void outliner_add_id_contents(SpaceOops *soops, TreeElement *te, TreeStor
                        for (a = 0; a < MAX_MTEX; a++) {
                                if (la->mtex[a]) outliner_add_element(soops, &te->subtree, la->mtex[a]->tex, te, 0, a);
                        }
+                       break;
                }
-               break;
                case ID_SPK:
                {
                        Speaker *spk = (Speaker *)id;
 
                        if (outliner_animdata_test(spk->adt))
                                outliner_add_element(soops, &te->subtree, spk, te, TSE_ANIM_DATA, 0);
+                       break;
                }
-               break;
                case ID_WO:
                {
                        World *wrld = (World *)id;
@@ -730,22 +730,22 @@ static void outliner_add_id_contents(SpaceOops *soops, TreeElement *te, TreeStor
                        for (a = 0; a < MAX_MTEX; a++) {
                                if (wrld->mtex[a]) outliner_add_element(soops, &te->subtree, wrld->mtex[a]->tex, te, 0, a);
                        }
+                       break;
                }
-               break;
                case ID_KE:
                {
                        Key *key = (Key *)id;
                        
                        if (outliner_animdata_test(key->adt))
                                outliner_add_element(soops, &te->subtree, key, te, TSE_ANIM_DATA, 0);
+                       break;
                }
-               break;
                case ID_AC:
                {
                        // XXX do we want to be exposing the F-Curves here?
                        //bAction *act = (bAction *)id;
+                       break;
                }
-               break;
                case ID_AR:
                {
                        bArmature *arm = (bArmature *)id;
@@ -791,8 +791,8 @@ static void outliner_add_id_contents(SpaceOops *soops, TreeElement *te, TreeStor
                                        }
                                }
                        }
+                       break;
                }
-               break;
        }
 }
 
index 495980db4479e0d142c0d04aec9a894698dd3075..8c36df74d22feec6096a1ba68c636105b5e04a3d 100644 (file)
@@ -435,8 +435,8 @@ static void time_listener(bScreen *UNUSED(sc), ScrArea *sa, wmNotifier *wmn)
                                                        break;
                                                }
                                        }
+                                       break;
                                }
-                               break;
                        }
                        break;
                }
index f3528ef61b63790acc77100642bc5116581d275a..fb20f0820855efaf1e3bd4080137908cde6c0276 100644 (file)
@@ -186,8 +186,6 @@ static bool set_pchan_glColor(short colCode, int boneflag, short constflag)
        
                        return true;
                }
-               break;
-               
                case PCHAN_COLOR_SOLID:
                {
                        if (bcolor) {
@@ -198,8 +196,6 @@ static bool set_pchan_glColor(short colCode, int boneflag, short constflag)
                        
                        return true;
                }
-               break;
-               
                case PCHAN_COLOR_CONSTS:
                {
                        if ((bcolor == NULL) || (bcolor->flag & TH_WIRECOLOR_CONSTCOLS)) {
@@ -210,11 +206,8 @@ static bool set_pchan_glColor(short colCode, int boneflag, short constflag)
                        
                                return true;
                        }
-                       else
-                               return 0;
+                       return false;
                }
-               break;
-
                case PCHAN_COLOR_SPHEREBONE_BASE:
                {
                        if (bcolor) {
@@ -240,7 +233,6 @@ static bool set_pchan_glColor(short colCode, int boneflag, short constflag)
                        
                        return true;
                }
-               break;
                case PCHAN_COLOR_SPHEREBONE_END:
                {
                        if (bcolor) {
@@ -266,9 +258,8 @@ static bool set_pchan_glColor(short colCode, int boneflag, short constflag)
                                else if (boneflag & BONE_SELECTED) UI_ThemeColorShade(TH_BONE_POSE, -30);
                                else UI_ThemeColorShade(TH_BONE_SOLID, -30);
                        }
+                       break;
                }
-               break;
-               
                case PCHAN_COLOR_LINEBONE:
                {
                        /* inner part in background color or constraint */
@@ -290,7 +281,6 @@ static bool set_pchan_glColor(short colCode, int boneflag, short constflag)
                
                        return true;
                }
-               break;
        }
        
        return false;
@@ -1426,8 +1416,8 @@ static void pchan_draw_IK_root_lines(bPoseChannel *pchan, short only_temp)
                                
                                glEnd();
                                setlinestyle(0);
+                               break;
                        }
-                       break;
                        case CONSTRAINT_TYPE_SPLINEIK: 
                        {
                                bSplineIKConstraint *data = (bSplineIKConstraint *)con->data;
@@ -1451,8 +1441,8 @@ static void pchan_draw_IK_root_lines(bPoseChannel *pchan, short only_temp)
 
                                glEnd();
                                setlinestyle(0);
+                               break;
                        }
-                       break;
                }
        }
 }
index 8818ad1d421eb906a1877c0468f206a73baf545f..457a3b32e0987c135d1ef7ad9c82fde7007ca825 100644 (file)
@@ -2002,8 +2002,8 @@ int initTransform(bContext *C, TransInfo *t, wmOperator *op, const wmEvent *even
                                initBoneEnvelope(t);
                        else
                                initBoneSize(t);
+                       break;
                }
-               break;
                case TFM_BONE_ENVELOPE:
                        initBoneEnvelope(t);
                        break;
index 27b25a50eff77e6d95349b8df4651e6c8c38bddd..fd8fba91fc99a3fbfc31a3fe7a3b2710a2db74d4 100644 (file)
@@ -621,8 +621,8 @@ void setUserConstraint(TransInfo *t, short orientation, int mode, const char fte
                        float mtx[3][3] = MAT3_UNITY;
                        BLI_snprintf(text, sizeof(text), ftext, IFACE_("global"));
                        setConstraint(t, mtx, mode, text);
+                       break;
                }
-               break;
                case V3D_MANIP_LOCAL:
                        BLI_snprintf(text, sizeof(text), ftext, IFACE_("local"));
                        setLocalConstraint(t, mode, text);
diff