Cleanup: whitespace & break placement
authorCampbell Barton <ideasman42@gmail.com>
Sat, 18 Jul 2015 09:02:39 +0000 (19:02 +1000)
committerCampbell Barton <ideasman42@gmail.com>
Sat, 18 Jul 2015 09:03:22 +0000 (19:03 +1000)
15 files changed:
intern/ghost/intern/GHOST_SystemCocoa.mm
intern/ghost/intern/GHOST_SystemSDL.cpp
source/blender/blenkernel/intern/sequencer.c
source/blender/blenloader/intern/readfile.c
source/blender/blenloader/intern/versioning_250.c
source/blender/blenloader/intern/versioning_legacy.c
source/blender/blenloader/intern/writefile.c
source/blender/editors/animation/anim_channels_defines.c
source/blender/editors/animation/anim_channels_edit.c
source/blender/editors/interface/interface_handlers.c
source/blender/editors/interface/view2d_ops.c
source/blender/editors/space_outliner/outliner_tools.c
source/blender/freestyle/intern/python/BPy_FrsMaterial.cpp
source/blender/render/intern/source/convertblender.c
source/blender/render/intern/source/rendercore.c

index 50d3cc25c098863b870a1c2d7c6e1249d8af1c6f..b9686e5af9bac3ee41a0501b9c26b059aa4f6a21 100644 (file)
@@ -1045,16 +1045,17 @@ GHOST_TSuccess GHOST_SystemCocoa::handleDraggingEvent(GHOST_TEventType eventType
                                        }
                                        
                                        eventData = (GHOST_TEventDataPtr) ibuf;
-                               }
+
                                        break;
-                                       
+                               }
                                default:
                                        return GHOST_kFailure;
                                        break;
                        }
                        pushEvent(new GHOST_EventDragnDrop(getMilliSeconds(),eventType,draggedObjectType,window,mouseX,mouseY,eventData));
-               }
+
                        break;
+               }
                default:
                        return GHOST_kFailure;
        }
index 8561dbfd639cdea13030e6526e065c48d958eba1..e9768e4b8452ed62f74e02d3c983f0d6bf9d48d8 100644 (file)
@@ -320,8 +320,9 @@ GHOST_SystemSDL::processEvent(SDL_Event *sdl_event)
                                        g_event = new GHOST_Event(getMilliSeconds(), GHOST_kEventWindowClose, window);
                                        break;
                        }
-               }
+
                        break;
+               }
                case SDL_QUIT:
                        g_event = new GHOST_Event(getMilliSeconds(), GHOST_kEventQuit, NULL);
                        break;
@@ -417,8 +418,8 @@ GHOST_SystemSDL::processEvent(SDL_Event *sdl_event)
                        GHOST_WindowSDL *window = findGhostWindow(SDL_GetWindowFromID_fallback(sdl_sub_evt.windowID));
                        assert(window != NULL);
                        g_event = new GHOST_EventWheel(getMilliSeconds(), window, sdl_sub_evt.y);
-               }
                        break;
+               }
                case SDL_KEYDOWN:
                case SDL_KEYUP:
                {
@@ -488,8 +489,8 @@ GHOST_SystemSDL::processEvent(SDL_Event *sdl_event)
                        }
 
                        g_event = new GHOST_EventKey(getMilliSeconds(), type, window, gkey, sym, NULL);
-               }
                        break;
+               }
        }
 
        if (g_event) {
index ca621e18ecef9bf6770357ca267fe33c4b7a3108..db07344ee93bfcff5a2d400721a6cc38c467f109 100644 (file)
@@ -2861,12 +2861,12 @@ static ImBuf *seq_render_movie_strip(const SeqRenderData *context, Sequence *seq
                                                                seq->strip->proxy ? seq->strip->proxy->tc : IMB_TC_RECORD_RUN,
                                                                proxy_size);
 
-                       /* fetching for requested proxy size failed, try fetching the original instead */
-                       if (!ibuf_arr[i] && proxy_size != IMB_PROXY_NONE) {
-                               ibuf_arr[i] = IMB_anim_absolute(sanim->anim, nr + seq->anim_startofs,
-                                                               seq->strip->proxy ? seq->strip->proxy->tc : IMB_TC_RECORD_RUN,
-                                                               IMB_PROXY_NONE);
-                       }
+                               /* fetching for requested proxy size failed, try fetching the original instead */
+                               if (!ibuf_arr[i] && proxy_size != IMB_PROXY_NONE) {
+                                       ibuf_arr[i] = IMB_anim_absolute(sanim->anim, nr + seq->anim_startofs,
+                                                                       seq->strip->proxy ? seq->strip->proxy->tc : IMB_TC_RECORD_RUN,
+                                                                       IMB_PROXY_NONE);
+                               }
                                if (ibuf_arr[i]) {
                                        /* we don't need both (speed reasons)! */
                                        if (ibuf_arr[i]->rect_float && ibuf_arr[i]->rect)
index 2eba2b274b33166e8a6b648ec957c2c5a2d4261a..cc45af6e6f9d91f0153b3f7d93a711c772a28649 100644 (file)
@@ -2107,8 +2107,9 @@ static void lib_link_fmodifiers(FileData *fd, ID *id, ListBase *list)
                        {
                                FMod_Python *data = (FMod_Python *)fcm->data;
                                data->script = newlibadr(fd, id->lib, data->script);
-                       }
+
                                break;
+                       }
                }
        }
 }
@@ -2166,23 +2167,26 @@ static void direct_link_fmodifiers(FileData *fd, ListBase *list)
                                if (fd->flags & FD_FLAGS_SWITCH_ENDIAN) {
                                        BLI_endian_switch_float_array(data->coefficients, data->arraysize);
                                }
-                       }
+
                                break;
+                       }
                        case FMODIFIER_TYPE_ENVELOPE:
                        {
                                FMod_Envelope *data=  (FMod_Envelope *)fcm->data;
                                
                                data->data= newdataadr(fd, data->data);
-                       }
+
                                break;
+                       }
                        case FMODIFIER_TYPE_PYTHON:
                        {
                                FMod_Python *data = (FMod_Python *)fcm->data;
                                
                                data->prop = newdataadr(fd, data->prop);
                                IDP_DirectLinkGroup_OrFree(&data->prop, (fd->flags & FD_FLAGS_SWITCH_ENDIAN), fd);
-                       }
+
                                break;
+                       }
                }
        }
 }
@@ -4554,7 +4558,7 @@ static void lib_link_object(FileData *fd, Main *main)
                                        bCameraActuator *ca = act->data;
                                        ca->ob= newlibadr(fd, ob->id.lib, ca->ob);
                                }
-                                       /* leave this one, it's obsolete but necessary to read for conversion */
+                               /* leave this one, it's obsolete but necessary to read for conversion */
                                else if (act->type == ACT_ADD_OBJECT) {
                                        bAddObjectActuator *eoa = act->data;
                                        if (eoa) eoa->ob= newlibadr(fd, ob->id.lib, eoa->ob);
@@ -8375,8 +8379,9 @@ static void expand_fmodifiers(FileData *fd, Main *mainvar, ListBase *list)
                                FMod_Python *data = (FMod_Python *)fcm->data;
                                
                                expand_doit(fd, mainvar, data->script);
-                       }
+
                                break;
+                       }
                }
        }
 }
index 2727f3a39651d5a5e48d4e4dba79bfdb4e13ec23..43ebab7856cf0e2b2f8d258e1b620ac20797c5fc 100644 (file)
@@ -807,7 +807,7 @@ void blo_do_versions_250(FileData *fd, Library *lib, Main *main)
                                        }
 #undef SEQ_USE_PROXY_CUSTOM_DIR
 #undef SEQ_USE_PROXY_CUSTOM_FILE
-                       }
+                               }
                                SEQ_END
                        }
                }
@@ -1589,7 +1589,7 @@ void blo_do_versions_250(FileData *fd, Library *lib, Main *main)
                                        bAnimVizSettings *avs = &ob->pose->avs;
 
                                        /* ghosting settings ---------------- */
-                                               /* ranges */
+                                       /* ranges */
                                        avs->ghost_bc = avs->ghost_ac = arm->ghostep;
 
                                        avs->ghost_sf = arm->ghostsf;
@@ -1599,19 +1599,19 @@ void blo_do_versions_250(FileData *fd, Library *lib, Main *main)
                                                avs->ghost_ef = 100;
                                        }
 
-                                               /* type */
+                                       /* type */
                                        if (arm->ghostep == 0)
                                                avs->ghost_type = GHOST_TYPE_NONE;
                                        else
                                                avs->ghost_type = arm->ghosttype + 1;
 
-                                               /* stepsize */
+                                       /* stepsize */
                                        avs->ghost_step = arm->ghostsize;
                                        if (avs->ghost_step == 0)
                                                avs->ghost_step = 1;
 
                                        /* path settings --------------------- */
-                                               /* ranges */
+                                       /* ranges */
                                        avs->path_bc = arm->pathbc;
                                        avs->path_ac = arm->pathac;
                                        if ((avs->path_bc == avs->path_ac) && (avs->path_bc == 0))
@@ -1624,7 +1624,7 @@ void blo_do_versions_250(FileData *fd, Library *lib, Main *main)
                                                avs->path_ef = 250;
                                        }
 
-                                               /* flags */
+                                       /* flags */
                                        if (arm->pathflag & ARM_PATH_FNUMS)
                                                avs->path_viewflag |= MOTIONPATH_VIEW_FNUMS;
                                        if (arm->pathflag & ARM_PATH_KFRAS)
@@ -1632,15 +1632,15 @@ void blo_do_versions_250(FileData *fd, Library *lib, Main *main)
                                        if (arm->pathflag & ARM_PATH_KFNOS)
                                                avs->path_viewflag |= MOTIONPATH_VIEW_KFNOS;
 
-                                               /* bake flags */
+                                       /* bake flags */
                                        if (arm->pathflag & ARM_PATH_HEADS)
                                                avs->path_bakeflag |= MOTIONPATH_BAKE_HEADS;
 
-                                               /* type */
+                                       /* type */
                                        if (arm->pathflag & ARM_PATH_ACFRA)
                                                avs->path_type = MOTIONPATH_TYPE_ACFRA;
 
-                                               /* stepsize */
+                                       /* stepsize */
                                        avs->path_step = arm->pathsize;
                                        if (avs->path_step == 0)
                                                avs->path_step = 1;
index 1819dcd4d430872c9ee14f9b78ec2ad36b1a83f1..dcfafc26e4fa17a9e3c7d63b333dc942dcc9e1df 100644 (file)
@@ -2401,8 +2401,9 @@ void blo_do_versions_pre250(FileData *fd, Library *lib, Main *main)
                                                                data->flag |= MINMAX_STICKY;
                                                        else
                                                                data->flag &= ~MINMAX_STICKY;
-                                               }
+
                                                        break;
+                                               }
                                                case CONSTRAINT_TYPE_ROTLIKE:
                                                {
                                                        bRotateLikeConstraint *data = curcon->data;
@@ -2410,8 +2411,9 @@ void blo_do_versions_pre250(FileData *fd, Library *lib, Main *main)
                                                        /* version patch from buttons_object.c */
                                                        if (data->flag == 0)
                                                                data->flag = ROTLIKE_X|ROTLIKE_Y|ROTLIKE_Z;
-                                               }
+
                                                        break;
+                                               }
                                        }
                                }
                        }
index 25d3f4f0dfb2d3d4b8f608dedaf85a2e1b992e1f..e03db11e71b0c2e7b49a7cdbb81b3a1050683f0f 100644 (file)
@@ -613,8 +613,9 @@ static void write_fmodifiers(WriteData *wd, ListBase *fmodifiers)
                                        /* write coefficients array */
                                        if (data->coefficients)
                                                writedata(wd, DATA, sizeof(float)*(data->arraysize), data->coefficients);
-                               }
+
                                        break;
+                               }
                                case FMODIFIER_TYPE_ENVELOPE:
                                {
                                        FMod_Envelope *data= (FMod_Envelope *)fcm->data;
@@ -622,8 +623,9 @@ static void write_fmodifiers(WriteData *wd, ListBase *fmodifiers)
                                        /* write envelope data */
                                        if (data->data)
                                                writestruct(wd, DATA, "FCM_EnvelopeData", data->totvert, data->data);
-                               }
+
                                        break;
+                               }
                                case FMODIFIER_TYPE_PYTHON:
                                {
                                        FMod_Python *data = (FMod_Python *)fcm->data;
@@ -631,8 +633,9 @@ static void write_fmodifiers(WriteData *wd, ListBase *fmodifiers)
                                        /* Write ID Properties -- and copy this comment EXACTLY for easy finding
                                         * of library blocks that implement this.*/
                                        IDP_WriteProperty(data->prop, wd);
-                               }
+
                                        break;
+                               }
                        }
                }
        }
@@ -1425,16 +1428,18 @@ static void write_constraints(WriteData *wd, ListBase *conlist)
                                        /* Write ID Properties -- and copy this comment EXACTLY for easy finding
                                         * of library blocks that implement this.*/
                                        IDP_WriteProperty(data->prop, wd);
-                               }
+
                                        break;
+                               }
                                case CONSTRAINT_TYPE_SPLINEIK: 
                                {
                                        bSplineIKConstraint *data = (bSplineIKConstraint *)con->data;
                                        
                                        /* write points array */
                                        writedata(wd, DATA, sizeof(float)*(data->numpoints), data->points);
-                               }
+
                                        break;
+                               }
                        }
                }
                
index ebd05d8b16b9191559c60d862f12ae7ead8cb3f0..7bed7a41e0267ed02876e84d2d2ce61bff21ea9a 100644 (file)
@@ -160,14 +160,16 @@ static bool acf_show_channel_colors(bAnimContext *ac)
                        {
                                SpaceAction *saction = (SpaceAction *)ac->sl;
                                showGroupColors = !(saction->flag & SACTION_NODRAWGCOLORS);
-                       }
+
                                break;
+                       }
                        case SPACE_IPO:
                        {
                                SpaceIpo *sipo = (SpaceIpo *)ac->sl;
                                showGroupColors = !(sipo->flag & SIPO_NODRAWGCOLORS);
-                       }
+
                                break;
+                       }
                }
        }
        
index f9e3c8a9fa62724360451b52a69f8726d26c7d0c..8822c8511de6a4ea4d5a8666646ffce1155ea418 100644 (file)
@@ -1396,9 +1396,9 @@ static int animchannels_grouping_poll(bContext *C)
                        /* dopesheet and action only - all others are for other datatypes or have no groups */
                        if (ELEM(saction->mode, SACTCONT_ACTION, SACTCONT_DOPESHEET) == 0)
                                return 0;
-               }
+
                        break;
-                       
+               }
                case SPACE_IPO:
                {
                        SpaceIpo *sipo = (SpaceIpo *)sl;
@@ -1406,9 +1406,9 @@ static int animchannels_grouping_poll(bContext *C)
                        /* drivers can't have groups... */
                        if (sipo->mode != SIPO_MODE_ANIMATION)
                                return 0;
-               }
+
                        break;
-                       
+               }
                /* unsupported... */
                default:
                        return 0;
index 3de770aa75251357836ba6875e24db3be45bd61d..82660a8eeae7d82270e8e3ab7a5d56a4018ef290 100644 (file)
@@ -8106,7 +8106,7 @@ static int ui_handle_button_event(bContext *C, const wmEvent *event, uiBut *but)
                                retval = WM_UI_HANDLER_CONTINUE;
                                break;
                        }
-                               /* XXX hardcoded keymap check... but anyway, while view changes, tooltips should be removed */
+                       /* XXX hardcoded keymap check... but anyway, while view changes, tooltips should be removed */
                        case WHEELUPMOUSE:
                        case WHEELDOWNMOUSE:
                        case MIDDLEMOUSE:
index 6fbe85091885c277cdad4b5eb16af7e6206e008d..07275d6be2a95bfda90a50932a5fd1acf98cf49d 100644 (file)
@@ -276,8 +276,8 @@ static int view_pan_modal(bContext *C, wmOperator *op, const wmEvent *event)
                        view_pan_apply(C, op);
                        break;
                }
-                       /* XXX - Mode switching isn't implemented. See comments in 36818.
-                        * switch to zoom */
+               /* XXX - Mode switching isn't implemented. See comments in 36818.
+                * switch to zoom */
 #if 0
                case LEFTMOUSE:
                        if (event->val == KM_PRESS) {
index 66863b8061ba6acbeff0f992267c09e199e529a0..3fc47444abeb0b06f090f98dbea7f0af85fd5c87 100644 (file)
@@ -1498,46 +1498,47 @@ static int outliner_data_operation_exec(bContext *C, wmOperator *op)
                        outliner_do_data_operation(soops, datalevel, event, &soops->tree, pchan_cb, NULL);
                        WM_event_add_notifier(C, NC_OBJECT | ND_POSE, NULL);
                        ED_undo_push(C, "PoseChannel operation");
-               }
+
                        break;
-               
+               }
                case TSE_BONE:
                {
                        outliner_do_data_operation(soops, datalevel, event, &soops->tree, bone_cb, NULL);
                        WM_event_add_notifier(C, NC_OBJECT | ND_POSE, NULL);
                        ED_undo_push(C, "Bone operation");
-               }
+
                        break;
-                       
+               }
                case TSE_EBONE:
                {
                        outliner_do_data_operation(soops, datalevel, event, &soops->tree, ebone_cb, NULL);
                        WM_event_add_notifier(C, NC_OBJECT | ND_POSE, NULL);
                        ED_undo_push(C, "EditBone operation");
-               }
+
                        break;
-                       
+               }
                case TSE_SEQUENCE:
                {
                        Scene *scene = CTX_data_scene(C);
                        outliner_do_data_operation(soops, datalevel, event, &soops->tree, sequence_cb, scene);
-               }
+
                        break;
-                       
+               }
                case TSE_GP_LAYER:
                {
                        outliner_do_data_operation(soops, datalevel, event, &soops->tree, gp_layer_cb, NULL);
                        WM_event_add_notifier(C, NC_GPENCIL | ND_DATA, NULL);
                        ED_undo_push(C, "Grease Pencil Layer operation");
-               }
+
                        break;
-                       
+               }
                case TSE_RNA_STRUCT:
                        if (event == OL_DOP_SELECT_LINKED) {
                                outliner_do_data_operation(soops, datalevel, event, &soops->tree, data_select_linked_cb, C);
                        }
+
                        break;
-                       
+
                default:
                        BKE_report(op->reports, RPT_WARNING, "Not yet implemented");
                        break;
index a36d446fcb77ba7f202612973544f72941256109..1866058a1514c00e52608f33befcd1e2913ddc7e 100644 (file)
@@ -223,10 +223,10 @@ static int FrsMaterial_mathutils_get_index(BaseMathObject *bmo, int subtype, int
        BPy_FrsMaterial *self = (BPy_FrsMaterial *)bmo->cb_user;
        switch (subtype) {
        case MATHUTILS_SUBTYPE_LINE:
-       {
-               const float *color = self->m->line();
-               bmo->data[index] = color[index];
-       }
+               {
+                       const float *color = self->m->line();
+                       bmo->data[index] = color[index];
+               }
                break;
        case MATHUTILS_SUBTYPE_DIFFUSE:
                {
index 9392baeb1ca79ba41fc610101b6b55de77a19f00..e51ff91450e905b54aa863e0b79dea854c6ec9f7 100644 (file)
@@ -378,7 +378,7 @@ static void calc_vertexnormals(Render *UNUSED(re), ObjectRen *obr, bool do_verte
 {
        int a;
 
-               /* clear all vertex normals */
+       /* clear all vertex normals */
        if (do_vertex_normal) {
                for (a=0; a<obr->totvert; a++) {
                        VertRen *ver= RE_findOrAddVert(obr, a);
@@ -386,8 +386,8 @@ static void calc_vertexnormals(Render *UNUSED(re), ObjectRen *obr, bool do_verte
                }
        }
 
-               /* calculate cos of angles and point-masses, use as weight factor to
-                * add face normal to vertex */
+       /* calculate cos of angles and point-masses, use as weight factor to
+        * add face normal to vertex */
        for (a=0; a<obr->totvlak; a++) {
                VlakRen *vlr= RE_findOrAddVlak(obr, a);
                if (do_vertex_normal && vlr->flag & ME_SMOOTH) {
@@ -404,7 +404,7 @@ static void calc_vertexnormals(Render *UNUSED(re), ObjectRen *obr, bool do_verte
                }
        }
 
-               /* do solid faces */
+       /* do solid faces */
        for (a=0; a<obr->totvlak; a++) {
                VlakRen *vlr= RE_findOrAddVlak(obr, a);
 
index 9796477a7a423bf7a8c36cc04f1cd8539ebb03fd..894ade42a1f7c79685b0d523a7bfb2ba59fb42fc 100644 (file)
@@ -548,9 +548,9 @@ static void add_filt_passes(RenderLayer *rl, int curmask, int rectx, int offset,
                                        fp[2]= shr->winspeed[2];
                                        fp[3]= shr->winspeed[3];
                                }
-                       }
-                               break;
 
+                               break;
+                       }
                        case SCE_PASS_RAYHITS:
                                /*  */
                                col= shr->rayhits;