code cleanup:
authorCampbell Barton <ideasman42@gmail.com>
Sun, 20 May 2012 19:49:27 +0000 (19:49 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Sun, 20 May 2012 19:49:27 +0000 (19:49 +0000)
- style - multi-line ifs move braces onto new lines.
- iterators - convert some to macros, other split up and move brace.

95 files changed:
source/blender/avi/intern/avi.c
source/blender/blenkernel/intern/CCGSubSurf.c
source/blender/blenkernel/intern/DerivedMesh.c
source/blender/blenkernel/intern/blender.c
source/blender/blenkernel/intern/cdderivedmesh.c
source/blender/blenkernel/intern/customdata.c
source/blender/blenkernel/intern/displist.c
source/blender/blenkernel/intern/dynamicpaint.c
source/blender/blenkernel/intern/font.c
source/blender/blenkernel/intern/image_gen.c
source/blender/blenkernel/intern/key.c
source/blender/blenkernel/intern/mesh.c
source/blender/blenkernel/intern/mesh_validate.c
source/blender/blenkernel/intern/object.c
source/blender/blenkernel/intern/ocean.c
source/blender/blenkernel/intern/particle_system.c
source/blender/blenkernel/intern/sequencer.c
source/blender/blenkernel/intern/softbody.c
source/blender/blenkernel/intern/subsurf_ccg.c
source/blender/blenkernel/intern/text.c
source/blender/blenkernel/intern/texture.c
source/blender/blenkernel/intern/writeffmpeg.c
source/blender/blenlib/intern/path_util.c
source/blender/blenlib/intern/pbvh.c
source/blender/blenlib/intern/string.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/bmesh/intern/bmesh_operators.c
source/blender/bmesh/operators/bmo_connect.c
source/blender/bmesh/operators/bmo_utils.c
source/blender/editors/armature/editarmature.c
source/blender/editors/armature/meshlaplacian.c
source/blender/editors/armature/reeb.c
source/blender/editors/curve/editcurve.c
source/blender/editors/interface/interface_draw.c
source/blender/editors/interface/interface_handlers.c
source/blender/editors/interface/interface_widgets.c
source/blender/editors/mesh/editmesh_rip.c
source/blender/editors/mesh/editmesh_select.c
source/blender/editors/mesh/editmesh_tools.c
source/blender/editors/object/object_modifier.c
source/blender/editors/object/object_select.c
source/blender/editors/sculpt_paint/paint_cursor.c
source/blender/editors/sculpt_paint/paint_image.c
source/blender/editors/sculpt_paint/paint_ops.c
source/blender/editors/sculpt_paint/sculpt.c
source/blender/editors/space_clip/clip_ops.c
source/blender/editors/space_file/filesel.c
source/blender/editors/space_image/image_ops.c
source/blender/editors/space_logic/logic_window.c
source/blender/editors/space_sequencer/sequencer_draw.c
source/blender/editors/space_sequencer/sequencer_edit.c
source/blender/editors/space_text/text_draw.c
source/blender/editors/space_view3d/drawobject.c
source/blender/editors/space_view3d/view3d_draw.c
source/blender/editors/transform/transform.c
source/blender/editors/transform/transform_conversions.c
source/blender/editors/transform/transform_snap.c
source/blender/editors/uvedit/uvedit_ops.c
source/blender/editors/uvedit/uvedit_smart_stitch.c
source/blender/gpu/intern/gpu_draw.c
source/blender/gpu/intern/gpu_material.c
source/blender/imbuf/intern/anim_movie.c
source/blender/imbuf/intern/dds/DirectDrawSurface.cpp
source/blender/imbuf/intern/filter.c
source/blender/imbuf/intern/indexer_dv.c
source/blender/imbuf/intern/tiff.c
source/blender/imbuf/intern/util.c
source/blender/makesdna/intern/dna_genfile.c
source/blender/makesrna/intern/makesrna.c
source/blender/makesrna/intern/rna_access.c
source/blender/makesrna/intern/rna_dynamicpaint.c
source/blender/makesrna/intern/rna_object_api.c
source/blender/makesrna/intern/rna_scene.c
source/blender/makesrna/intern/rna_userdef.c
source/blender/modifiers/intern/MOD_dynamicpaint.c
source/blender/python/bmesh/bmesh_py_types.c
source/blender/python/generic/idprop_py_api.c
source/blender/python/intern/bpy_library.c
source/blender/python/intern/bpy_operator.c
source/blender/python/mathutils/mathutils_Quaternion.c
source/blender/quicktime/apple/quicktime_export.c
source/blender/render/intern/source/pipeline.c
source/blender/windowmanager/intern/wm_event_system.c
source/blender/windowmanager/intern/wm_keymap.c
source/blender/windowmanager/intern/wm_operators.c
source/blenderplayer/bad_level_call_stubs/stubs.c
source/gameengine/Converter/BL_MeshDeformer.cpp
source/gameengine/GameLogic/SCA_IController.h
source/gameengine/GameLogic/SCA_ISensor.cpp
source/gameengine/Network/LoopBackNetwork/NG_LoopBackNetworkDeviceInterface.h
source/gameengine/Rasterizer/RAS_IRasterizer.h
source/gameengine/SceneGraph/SG_Spatial.cpp

index 861e07f..245f5d9 100644 (file)
@@ -215,7 +215,8 @@ int AVI_is_avi(char *name)
 
        if (GET_FCC(fp) != FCC("RIFF") ||
            !GET_FCC(fp) ||
-           GET_FCC(fp) != FCC("AVI ")) {
+           GET_FCC(fp) != FCC("AVI "))
+       {
                ret = 0;
        }
        else {
@@ -245,7 +246,8 @@ int AVI_is_avi(const char *name)
                return 0;
 
        if (GET_FCC(movie.fp) != FCC("RIFF") ||
-           !(movie.size = GET_FCC(movie.fp))) {
+           !(movie.size = GET_FCC(movie.fp)))
+       {
                fclose(movie.fp);
                return 0;
        }
@@ -257,7 +259,8 @@ int AVI_is_avi(const char *name)
            !GET_FCC(movie.fp) ||
            GET_FCC(movie.fp) != FCC("hdrl") ||
            (movie.header->fcc = GET_FCC(movie.fp)) != FCC("avih") ||
-           !(movie.header->size = GET_FCC(movie.fp))) {
+           !(movie.header->size = GET_FCC(movie.fp)))
+       {
                DEBUG_PRINT("bad initial header info\n");
                fclose(movie.fp);
                return 0;
@@ -378,8 +381,7 @@ int AVI_is_avi(const char *name)
                                
                                fcca = bi->Compression;
 
-                               if (movie.streams[temp].format ==
-                                   AVI_FORMAT_AVI_RGB) {
+                               if (movie.streams[temp].format == AVI_FORMAT_AVI_RGB) {
                                        if (fcca == FCC("DIB ") ||
                                            fcca == FCC("RGB ") ||
                                            fcca == FCC("rgb ") ||
index 6f768a1..e4309a6 100644 (file)
@@ -1166,7 +1166,8 @@ CCGError ccgSubSurf_syncVert(CCGSubSurf *ss, CCGVertHDL vHDL, const void *vertDa
                        v->flags = Vert_eEffected | seamflag;
                }
                else if (!VertDataEqual(vertData, _vert_getCo(v, 0, ss->meshIFC.vertDataSize), ss) ||
-                        ((v->flags & Vert_eSeam) != seamflag)) {
+                        ((v->flags & Vert_eSeam) != seamflag))
+               {
                        *prevp = v->next;
                        _ehash_insert(ss->vMap, (EHEntry *) v);
                        VertDataCopy(_vert_getCo(v, 0, ss->meshIFC.vertDataSize), vertData, ss);
index 18560d3..7e2d881 100644 (file)
@@ -1546,7 +1546,7 @@ static void mesh_calc_modifiers(Scene *scene, Object *ob, float (*inputVertexCos
 
                        /* if this is not the last modifier in the stack then recalculate the normals
                         * to avoid giving bogus normals to the next modifier see: [#23673] */
-                       if (isPrevDeform &&  mti->dependsOnNormals && mti->dependsOnNormals(md)) {
+                       if (isPrevDeform && mti->dependsOnNormals && mti->dependsOnNormals(md)) {
                                /* XXX, this covers bug #23673, but we may need normal calc for other types */
                                if (dm && dm->type == DM_TYPE_CDDM) {
                                        CDDM_apply_vert_coords(dm, deformedVerts);
@@ -2942,7 +2942,7 @@ static void navmesh_drawColored(DerivedMesh *dm)
 #endif
 
        glDisable(GL_LIGHTING);
-       /*  if (GPU_buffer_legacy(dm) ) */ { /* TODO - VBO draw code, not high priority - campbell */
+       /* if (GPU_buffer_legacy(dm) ) */ { /* TODO - VBO draw code, not high priority - campbell */
                DEBUG_VBO("Using legacy code. drawNavMeshColored\n");
                //glShadeModel(GL_SMOOTH);
                glBegin(glmode = GL_QUADS);
index b2cbf0a..2ba4ab5 100644 (file)
@@ -334,7 +334,8 @@ static int handle_subversion_warning(Main *main, ReportList *reports)
 {
        if (main->minversionfile > BLENDER_VERSION ||
            (main->minversionfile == BLENDER_VERSION &&
-            main->minsubversionfile > BLENDER_SUBVERSION)) {
+            main->minsubversionfile > BLENDER_SUBVERSION))
+       {
                BKE_reportf(reports, RPT_ERROR, "File written by newer Blender binary: %d.%d , expect loss of data!", main->minversionfile, main->minsubversionfile);
        }
 
index 65294e3..a34d2ec 100644 (file)
@@ -640,9 +640,8 @@ static void cdDM_drawFacesTex_common(DerivedMesh *dm,
                                        if (drawParamsMapped)       { draw_option = drawParamsMapped(userData, orig); }
                                        else                        { if (nors) nors += 3; continue; }
                                }
-                               else
-                               if (drawParamsMapped) draw_option = drawParamsMapped(userData, i);
-                               else {    if (nors) nors += 3; continue; }
+                               else if (drawParamsMapped) { draw_option = drawParamsMapped(userData, i); }
+                               else                       { if (nors) nors += 3; continue; }
                        }
                        
                        if (draw_option != DM_DRAW_OPTION_SKIP) {
@@ -2397,11 +2396,13 @@ void CDDM_calc_edges_tessface(DerivedMesh *dm)
        CustomData_add_layer(&edgeData, CD_MEDGE, CD_CALLOC, NULL, numEdges);
        CustomData_add_layer(&edgeData, CD_ORIGINDEX, CD_CALLOC, NULL, numEdges);
 
-       ehi = BLI_edgehashIterator_new(eh);
        med = CustomData_get_layer(&edgeData, CD_MEDGE);
        index = CustomData_get_layer(&edgeData, CD_ORIGINDEX);
-       for (i = 0; !BLI_edgehashIterator_isDone(ehi);
-            BLI_edgehashIterator_step(ehi), ++i, ++med, ++index) {
+
+       for (ehi = BLI_edgehashIterator_new(eh), i = 0;
+            BLI_edgehashIterator_isDone(ehi) == FALSE;
+            BLI_edgehashIterator_step(ehi), ++i, ++med, ++index)
+       {
                BLI_edgehashIterator_getKey(ehi, &med->v1, &med->v2);
 
                med->flag = ME_EDGEDRAW | ME_EDGERENDER;
@@ -2460,11 +2461,13 @@ void CDDM_calc_edges(DerivedMesh *dm)
        CustomData_add_layer(&edgeData, CD_MEDGE, CD_CALLOC, NULL, numEdges);
        CustomData_add_layer(&edgeData, CD_ORIGINDEX, CD_CALLOC, NULL, numEdges);
 
-       ehi = BLI_edgehashIterator_new(eh);
        med = CustomData_get_layer(&edgeData, CD_MEDGE);
        index = CustomData_get_layer(&edgeData, CD_ORIGINDEX);
-       for (i = 0; !BLI_edgehashIterator_isDone(ehi);
-            BLI_edgehashIterator_step(ehi), ++i, ++med, ++index) {
+
+       for (ehi = BLI_edgehashIterator_new(eh), i = 0;
+            BLI_edgehashIterator_isDone(ehi) == FALSE;
+            BLI_edgehashIterator_step(ehi), ++i, ++med, ++index)
+       {
                BLI_edgehashIterator_getKey(ehi, &med->v1, &med->v2);
                j = GET_INT_FROM_POINTER(BLI_edgehashIterator_getValue(ehi));
 
index 90a3e61..56724b6 100644 (file)
@@ -2323,7 +2323,8 @@ void CustomData_bmesh_copy_data(const CustomData *source, CustomData *dest,
 
                /* if we found a matching layer, copy the data */
                if (dest->layers[dest_i].type == source->layers[src_i].type &&
-                   strcmp(dest->layers[dest_i].name, source->layers[src_i].name) == 0) {
+                   strcmp(dest->layers[dest_i].name, source->layers[src_i].name) == 0)
+               {
                        char *src_data = (char *)src_block + source->layers[src_i].offset;
                        char *dest_data = (char *)*dest_block + dest->layers[dest_i].offset;
 
index 9274d7a..2493507 100644 (file)
@@ -901,7 +901,8 @@ static void curve_calc_modifiers_post(Scene *scene, Object *ob, ListBase *dispba
                        continue;
 
                if (mti->type == eModifierTypeType_OnlyDeform ||
-                   (mti->type == eModifierTypeType_DeformOrConstruct && !dm)) {
+                   (mti->type == eModifierTypeType_DeformOrConstruct && !dm))
+               {
                        if (editmode)
                                appf |= MOD_APPLY_USECACHE;
                        if (dm) {
index f8b8efd..eb5e4e4 100644 (file)
@@ -2035,7 +2035,8 @@ static int dynamicPaint_findNeighbourPixel(PaintUVPoint *tempPoints, DerivedMesh
                                int v4 = (mface[i].v4) ? mface[i].v4 : -1;
 
                                if ((e1_index == mface[i].v1 || e1_index == mface[i].v2 || e1_index == mface[i].v3 || e1_index == v4) &&
-                                   (e2_index == mface[i].v1 || e2_index == mface[i].v2 || e2_index == mface[i].v3 || e2_index == v4)) {
+                                   (e2_index == mface[i].v1 || e2_index == mface[i].v2 || e2_index == mface[i].v3 || e2_index == v4))
+                               {
                                        if (i == cPoint->face_index) continue;
 
                                        target_face = i;
@@ -3511,7 +3512,8 @@ static int dynamicPaint_paintMesh(DynamicPaintSurface *surface,
                                                        }
                                                        /* get final object space depth */
                                                        else if (surface->type == MOD_DPAINT_SURFACE_T_DISPLACE ||
-                                                                surface->type == MOD_DPAINT_SURFACE_T_WAVE) {
+                                                                surface->type == MOD_DPAINT_SURFACE_T_WAVE)
+                                                       {
                                                                depth /= bData->bNormal[index].normal_scale * total_sample;
                                                        }
 
@@ -3803,8 +3805,8 @@ static int dynamicPaint_paintSinglePoint(DynamicPaintSurface *surface, float *po
 
                /* Smooth range or color ramp   */
                if (brush->proximity_falloff == MOD_DPAINT_PRFALL_SMOOTH ||
-                   brush->proximity_falloff == MOD_DPAINT_PRFALL_RAMP) {
-                       
+                   brush->proximity_falloff == MOD_DPAINT_PRFALL_RAMP)
+               {
                        strength = 1.0f - distance / brush_radius;
                        CLAMP(strength, 0.0f, 1.0f);
                }
@@ -3855,7 +3857,8 @@ static int dynamicPaint_paintSinglePoint(DynamicPaintSurface *surface, float *po
 
                        if (surface->type == MOD_DPAINT_SURFACE_T_PAINT) {
                                if (brush->proximity_falloff == MOD_DPAINT_PRFALL_RAMP &&
-                                   !(brush->flags & MOD_DPAINT_RAMP_ALPHA)) {
+                                   !(brush->flags & MOD_DPAINT_RAMP_ALPHA))
+                               {
                                        paintColor[0] = colorband[0];
                                        paintColor[1] = colorband[1];
                                        paintColor[2] = colorband[2];
@@ -4400,7 +4403,8 @@ void dynamicPaint_doWaveStep(DynamicPaintSurface *surface, float timescale)
                        avg_dist = (numOfN) ? avg_dist / numOfN : 0.0f;
 
                        if (surface->flags & MOD_DPAINT_WAVE_OPEN_BORDERS &&
-                           sData->adj_data->flags[index] & ADJ_ON_MESH_EDGE) {
+                           sData->adj_data->flags[index] & ADJ_ON_MESH_EDGE)
+                       {
                                /* if open borders, apply a fake height to keep waves going on */
                                avg_height = (numOfRN) ? avg_height / numOfRN : 0.0f;
                                wPoint->height = (dt * wave_speed * avg_height + wPoint->height * avg_dist) / (avg_dist + dt * wave_speed);
@@ -4507,7 +4511,8 @@ static void dynamicPaint_surfacePreStep(DynamicPaintSurface *surface, float time
                /* dissolve for float types */
                else if (surface->flags & MOD_DPAINT_DISSOLVE &&
                         (surface->type == MOD_DPAINT_SURFACE_T_DISPLACE ||
-                         surface->type == MOD_DPAINT_SURFACE_T_WEIGHT)) {
+                         surface->type == MOD_DPAINT_SURFACE_T_WEIGHT))
+               {
 
                        float *point = &((float *)sData->type_data)[index];
                        /* log or linear */
@@ -4727,7 +4732,8 @@ static int dynamicPaint_generateBakeData(DynamicPaintSurface *surface, Scene *sc
                /* Prepare surface normal directional scale to easily convert
                 *  brush intersection amount between global and local space */
                if (surface->type == MOD_DPAINT_SURFACE_T_DISPLACE ||
-                   surface->type == MOD_DPAINT_SURFACE_T_WAVE) {
+                   surface->type == MOD_DPAINT_SURFACE_T_WAVE)
+               {
                        float temp_nor[3];
                        if (surface->format == MOD_DPAINT_SURFACE_F_VERTEX) {
                                normal_short_to_float_v3(temp_nor, mvert[index].no);
@@ -4856,7 +4862,8 @@ static int dynamicPaint_doStep(Scene *scene, Object *ob, DynamicPaintSurface *su
                                        /* Particle brush: */
                                        if (brush->collision == MOD_DPAINT_COL_PSYS) {
                                                if (brush && brush->psys && brush->psys->part && brush->psys->part->type == PART_EMITTER &&
-                                                   psys_check_enabled(brushObj, brush->psys)) {
+                                                   psys_check_enabled(brushObj, brush->psys))
+                                               {
 
                                                        /* Paint a particle system */
                                                        BKE_animsys_evaluate_animdata(scene, &brush->psys->part->id, brush->psys->part->adt, BKE_scene_frame_get(scene), ADT_RECALC_ANIM);
index 87e35bc..0615309 100644 (file)
@@ -705,9 +705,10 @@ makebreak:
                        linedata3[lnr] = tb->w / cu->fsize;
                        linedata4[lnr] = wsnr;
                        
-                       if ( (tb->h != 0.0f) &&
-                            ((-(yof - (tb->y / cu->fsize))) > ((tb->h / cu->fsize) - (linedist * cu->fsize)) - cu->yof) &&
-                            (cu->totbox > (curbox + 1)) ) {
+                       if ((tb->h != 0.0f) &&
+                           ((-(yof - (tb->y / cu->fsize))) > ((tb->h / cu->fsize) - (linedist * cu->fsize)) - cu->yof) &&
+                           (cu->totbox > (curbox + 1)) )
+                       {
                                maxlen = 0;
                                tb++;
                                curbox++;
@@ -802,8 +803,7 @@ makebreak:
                                ct++;
                        }
                }
-               else if ((cu->spacemode == CU_FLUSH) &&
-                        (cu->tb[0].w != 0.0f)) {
+               else if ((cu->spacemode == CU_FLUSH) && (cu->tb[0].w != 0.0f)) {
                        for (i = 0; i < lnr; i++)
                                if (linedata2[i] > 1)
                                        linedata[i] = (linedata3[i] - linedata[i]) / (linedata2[i] - 1);
@@ -829,7 +829,8 @@ makebreak:
                                }
 
                                if ((mem[j] != '\r') && (mem[j] != '\n') &&
-                                   ((chartransdata[j].dobreak != 0))) {
+                                   ((chartransdata[j].dobreak != 0)))
+                               {
                                        if (mem[i] == ' ') curofs += (linedata3[ct->linenr] - linedata[ct->linenr]) / linedata4[ct->linenr];
                                        ct->xof += curofs;
                                }
@@ -1029,9 +1030,9 @@ makebreak:
                                if ((info->flag & CU_CHINFO_UNDERLINE) && (cu->textoncurve == NULL) && (cha != '\n') && (cha != '\r')) {
                                        float ulwidth, uloverlap = 0.0f;
                                        
-                                       if ( (i < (slen - 1)) && (mem[i + 1] != '\n') && (mem[i + 1] != '\r') &&
-                                            ((mem[i + 1] != ' ') || (custrinfo[i + 1].flag & CU_CHINFO_UNDERLINE)) && ((custrinfo[i + 1].flag & CU_CHINFO_WRAP) == 0)
-                                            ) {
+                                       if ((i < (slen - 1)) && (mem[i + 1] != '\n') && (mem[i + 1] != '\r') &&
+                                           ((mem[i + 1] != ' ') || (custrinfo[i + 1].flag & CU_CHINFO_UNDERLINE)) && ((custrinfo[i + 1].flag & CU_CHINFO_WRAP) == 0))
+                                       {
                                                uloverlap = xtrax + 0.1f;
                                        }
                                        // Find the character, the characters has to be in the memory already 
index 4579e6f..f135beb 100644 (file)
@@ -123,11 +123,11 @@ void BKE_image_buf_fill_checker(unsigned char *rect, float *rect_float, int widt
                        h = 0.125f * floorf(x / checkerwidth);
                        
                        if ((fabs((x % checkerwidth) - (checkerwidth / 2)) < 4) &&
-                           (fabs((y % checkerwidth) - (checkerwidth / 2)) < 4)) {
-                               
+                           (fabs((y % checkerwidth) - (checkerwidth / 2)) < 4))
+                       {
                                if ((fabs((x % checkerwidth) - (checkerwidth / 2)) < 1) ||
-                                   (fabs((y % checkerwidth) - (checkerwidth / 2)) < 1)) {
-                                       
+                                   (fabs((y % checkerwidth) - (checkerwidth / 2)) < 1))
+                               {
                                        hue = fmodf(fabs(h - hoffs), 1.0f);
                                        hsv_to_rgb(hue, s, v, &r, &g, &b);
                                        
@@ -250,7 +250,7 @@ static void checker_board_grid_fill(unsigned char *rect, float *rect_float, int
        int x, y;
        for (y = 0; y < height; y++) {
                for (x = 0; x < width; x++) {
-                       if (((y % 32) == 0) || ((x % 32) == 0)  || x == 0) {
+                       if (((y % 32) == 0) || ((x % 32) == 0) || x == 0) {
                                if (rect) {
                                        rect[0] = BLEND_CHAR(rect[0], blend);
                                        rect[1] = BLEND_CHAR(rect[1], blend);
index f4ec223..d776b05 100644 (file)
@@ -1260,7 +1260,7 @@ static void do_latt_key(Scene *scene, Object *ob, Key *key, char *out, const int
        float t[4];
        int flag;
        
-       if (key->slurph  && key->type != KEY_RELATIVE) {
+       if (key->slurph && key->type != KEY_RELATIVE) {
                const float ctime_scaled = key->ctime / 100.0f;
                float delta = (float)key->slurph / tot;
                float cfra = (float)scene->r.cfra;
index 7a5c43b..abc31bb 100644 (file)
@@ -812,8 +812,8 @@ int test_index_face(MFace *mface, CustomData *fdata, int mfindex, int nr)
                    mface->v4 == mface->v1 ||
                    /* across the face */
                    mface->v1 == mface->v3 ||
-                   mface->v2 == mface->v4
-                   ) {
+                   mface->v2 == mface->v4)
+               {
                        return 0;
                }
        }
index 1645a8c..a60bb98 100644 (file)
@@ -667,11 +667,11 @@ void BKE_mesh_calc_edges(Mesh *mesh, int update)
        memset(&edata, 0, sizeof(edata));
        CustomData_add_layer(&edata, CD_MEDGE, CD_CALLOC, NULL, totedge);
 
-       ehi = BLI_edgehashIterator_new(eh);
        med = CustomData_get_layer(&edata, CD_MEDGE);
-       for (i = 0; !BLI_edgehashIterator_isDone(ehi);
-            BLI_edgehashIterator_step(ehi), ++i, ++med) {
-
+       for (ehi = BLI_edgehashIterator_new(eh), i = 0;
+            BLI_edgehashIterator_isDone(ehi) == FALSE;
+            BLI_edgehashIterator_step(ehi), ++i, ++med)
+       {
                if (update && (med_orig = BLI_edgehashIterator_getValue(ehi))) {
                        *med = *med_orig; /* copy from the original */
                }
index 9000019..658a050 100644 (file)
@@ -2763,11 +2763,11 @@ int BKE_object_obdata_texspace_get(Object *ob, short **r_texflag, float **r_loc,
 int BKE_boundbox_ray_hit_check(struct BoundBox *bb, float ray_start[3], float ray_normal[3])
 {
        static int triangle_indexes[12][3] = {{0, 1, 2}, {0, 2, 3},
-                                                                                 {3, 2, 6}, {3, 6, 7},
-                                                                                 {1, 2, 6}, {1, 6, 5}, 
-                                                                                 {5, 6, 7}, {4, 5, 7},
-                                                                                 {0, 3, 7}, {0, 4, 7},
-                                                                                 {0, 1, 5}, {0, 4, 5}};
+                                             {3, 2, 6}, {3, 6, 7},
+                                             {1, 2, 6}, {1, 6, 5},
+                                             {5, 6, 7}, {4, 5, 7},
+                                             {0, 3, 7}, {0, 4, 7},
+                                             {0, 1, 5}, {0, 4, 5}};
        int result = 0;
        int i;
        
index e76cde6..3d3a5ed 100644 (file)
@@ -500,10 +500,10 @@ void BKE_simulate_ocean(struct Ocean *o, float t, float scale, float chop_amount
 
        // compute a new htilda
 #pragma omp parallel for private(i, j)
-       for (i = 0; i  < o->_M; ++i) {
+       for (i = 0; i < o->_M; ++i) {
                // note the <= _N/2 here, see the fftw doco about
                // the mechanics of the complex->real fft storage
-               for (j  = 0; j  <= o->_N / 2; ++j) {
+               for (j = 0; j <= o->_N / 2; ++j) {
                        fftw_complex exp_param1;
                        fftw_complex exp_param2;
                        fftw_complex conj_param;
@@ -538,8 +538,8 @@ void BKE_simulate_ocean(struct Ocean *o, float t, float scale, float chop_amount
                {
                        if (o->_do_chop) {
                                // x displacement
-                               for (i = 0; i  < o->_M; ++i) {
-                                       for (j  = 0; j  <= o->_N / 2; ++j) {
+                               for (i = 0; i < o->_M; ++i) {
+                                       for (j = 0; j <= o->_N / 2; ++j) {
                                                fftw_complex mul_param;
                                                fftw_complex minus_i;
 
@@ -560,8 +560,8 @@ void BKE_simulate_ocean(struct Ocean *o, float t, float scale, float chop_amount
                {
                        if (o->_do_chop) {
                                // z displacement
-                               for (i = 0; i  < o->_M; ++i) {
-                                       for (j  = 0; j  <= o->_N / 2; ++j) {
+                               for (i = 0; i < o->_M; ++i) {
+                                       for (j = 0; j <= o->_N / 2; ++j) {
                                                fftw_complex mul_param;
                                                fftw_complex minus_i;
 
@@ -582,8 +582,8 @@ void BKE_simulate_ocean(struct Ocean *o, float t, float scale, float chop_amount
                {
                        if (o->_do_jacobian) {
                                // Jxx
-                               for (i = 0; i  < o->_M; ++i) {
-                                       for (j  = 0; j  <= o->_N / 2; ++j) {
+                               for (i = 0; i < o->_M; ++i) {
+                                       for (j = 0; j <= o->_N / 2; ++j) {
                                                fftw_complex mul_param;
 
                                                //init_complex(mul_param, -scale, 0);
@@ -597,8 +597,8 @@ void BKE_simulate_ocean(struct Ocean *o, float t, float scale, float chop_amount
                                }
                                fftw_execute(o->_Jxx_plan);
 
-                               for (i = 0; i  < o->_M; ++i) {
-                                       for (j  = 0; j  < o->_N; ++j) {
+                               for (i = 0; i < o->_M; ++i) {
+                                       for (j = 0; j < o->_N; ++j) {
                                                o->_Jxx[i * o->_N + j] += 1.0;
                                        }
                                }
@@ -609,8 +609,8 @@ void BKE_simulate_ocean(struct Ocean *o, float t, float scale, float chop_amount
                {
                        if (o->_do_jacobian) {
                                // Jzz
-                               for (i = 0; i  < o->_M; ++i) {
-                                       for (j  = 0; j  <= o->_N / 2; ++j) {
+                               for (i = 0; i < o->_M; ++i) {
+                                       for (j = 0; j <= o->_N / 2; ++j) {
                                                fftw_complex mul_param;
 
                                                //init_complex(mul_param, -scale, 0);
@@ -623,8 +623,8 @@ void BKE_simulate_ocean(struct Ocean *o, float t, float scale, float chop_amount
                                        }
                                }
                                fftw_execute(o->_Jzz_plan);
-                               for (i = 0; i  < o->_M; ++i) {
-                                       for (j  = 0; j  < o->_N; ++j) {
+                               for (i = 0; i < o->_M; ++i) {
+                                       for (j = 0; j < o->_N; ++j) {
                                                o->_Jzz[i * o->_N + j] += 1.0;
                                        }
                                }
@@ -635,8 +635,8 @@ void BKE_simulate_ocean(struct Ocean *o, float t, float scale, float chop_amount
                {
                        if (o->_do_jacobian) {
                                // Jxz
-                               for (i = 0; i  < o->_M; ++i) {
-                                       for (j  = 0; j  <= o->_N / 2; ++j) {
+                               for (i = 0; i < o->_M; ++i) {
+                                       for (j = 0; j <= o->_N / 2; ++j) {
                                                fftw_complex mul_param;
 
                                                //init_complex(mul_param, -scale, 0);
@@ -656,8 +656,8 @@ void BKE_simulate_ocean(struct Ocean *o, float t, float scale, float chop_amount
                {
                        // fft normals
                        if (o->_do_normals) {
-                               for (i = 0; i  < o->_M; ++i) {
-                                       for (j  = 0; j  <= o->_N / 2; ++j) {
+                               for (i = 0; i < o->_M; ++i) {
+                                       for (j = 0; j <= o->_N / 2; ++j) {
                                                fftw_complex mul_param;
 
                                                init_complex(mul_param, 0.0, -1.0);
@@ -674,8 +674,8 @@ void BKE_simulate_ocean(struct Ocean *o, float t, float scale, float chop_amount
 #pragma omp section
                {
                        if (o->_do_normals) {
-                               for (i = 0; i  < o->_M; ++i) {
-                                       for (j  = 0; j  <= o->_N / 2; ++j) {
+                               for (i = 0; i < o->_M; ++i) {
+                                       for (j = 0; j <= o->_N / 2; ++j) {
                                                fftw_complex mul_param;
 
                                                init_complex(mul_param, 0.0, -1.0);
@@ -687,8 +687,8 @@ void BKE_simulate_ocean(struct Ocean *o, float t, float scale, float chop_amount
                                fftw_execute(o->_N_z_plan);
 
 #if 0
-                               for (i = 0; i  < o->_M; ++i) {
-                                       for (j  = 0; j  < o->_N; ++j) {
+                               for (i = 0; i < o->_M; ++i) {
+                                       for (j = 0; j < o->_N; ++j) {
                                                o->_N_y[i * o->_N + j] = 1.0f / scale;
                                        }
                                }
@@ -802,21 +802,21 @@ void BKE_init_ocean(struct Ocean *o, int M, int N, float Lx, float Lz, float V,
                o->_kz[i] = -2.0f * (float)M_PI * ii / o->_Lz;
 
        // pre-calculate the k matrix
-       for (i = 0; i  < o->_M; ++i)
-               for (j  = 0; j  <= o->_N / 2; ++j)
+       for (i = 0; i < o->_M; ++i)
+               for (j = 0; j <= o->_N / 2; ++j)
                        o->_k[i * (1 + o->_N / 2) + j] = sqrt(o->_kx[i] * o->_kx[i] + o->_kz[j] * o->_kz[j]);
 
        /*srand(seed);*/
        BLI_srand(seed);
 
-       for (i = 0; i  < o->_M; ++i) {
-               for (j = 0; j  < o->_N; ++j) {
+       for (i = 0; i < o->_M; ++i) {
+               for (j = 0; j < o->_N; ++j) {
                        float r1 = gaussRand();
                        float r2 = gaussRand();
 
                        fftw_complex r1r2;
                        init_complex(r1r2, r1, r2);
-                       mul_complex_f(o->_h0[i * o->_N + j], r1r2, (float)(sqrt(Ph(o,  o->_kx[i], o->_kz[j]) / 2.0f)));
+                       mul_complex_f(o->_h0[i * o->_N + j], r1r2, (float)(sqrt(Ph(o, o->_kx[i], o->_kz[j]) / 2.0f)));
                        mul_complex_f(o->_h0_minus[i * o->_N + j], r1r2, (float)(sqrt(Ph(o, -o->_kx[i], -o->_kz[j]) / 2.0f)));
                }
        }
@@ -1253,13 +1253,13 @@ void BKE_bake_ocean(struct Ocean *o, struct OceanCache *och, void (*update_cb)(v
                        printf("Cannot save Displacement File Output to %s\n", string);
 
                if (o->_do_jacobian) {
-                       cache_filename(string, och->bakepath, och->relbase,  f, CACHE_TYPE_FOAM);
+                       cache_filename(string, och->bakepath, och->relbase, f, CACHE_TYPE_FOAM);
                        if (0 == BKE_imbuf_write(ibuf_foam, string, &imf))
                                printf("Cannot save Foam File Output to %s\n", string);
                }
 
                if (o->_do_normals) {
-                       cache_filename(string, och->bakepath,  och->relbase, f, CACHE_TYPE_NORMAL);
+                       cache_filename(string, och->bakepath, och->relbase, f, CACHE_TYPE_NORMAL);
                        if (0 == BKE_imbuf_write(ibuf_normal, string, &imf))
                                printf("Cannot save Normal File Output to %s\n", string);
                }
index 5397b17..941e299 100644 (file)
@@ -206,7 +206,7 @@ static void realloc_particles(ParticleSimulationData *sim, int new_totpart)
        int totpart, totsaved = 0;
 
        if (new_totpart<0) {
-               if (part->distr==PART_DISTR_GRID  && part->from != PART_FROM_VERT) {
+               if ((part->distr == PART_DISTR_GRID) && (part->from != PART_FROM_VERT)) {
                        totpart= part->grid_res;
                        totpart*=totpart*totpart;
                }
index a762af9..8fbb3ee 100644 (file)
@@ -1448,7 +1448,8 @@ void seq_proxy_rebuild(SeqIndexBuildContext *context, short *stop, short *do_upd
                100);
 
        for (cfra = seq->startdisp + seq->startstill; 
-            cfra < seq->enddisp - seq->endstill; cfra++) {
+            cfra < seq->enddisp - seq->endstill; cfra++)
+       {
                if (context->size_flags & IMB_PROXY_25) {
                        seq_proxy_build_frame(render_context, seq, cfra, 25);
                }
@@ -1675,7 +1676,8 @@ int input_have_to_preprocess(
        float mul;
 
        if (seq->flag & (SEQ_FILTERY | SEQ_USE_CROP | SEQ_USE_TRANSFORM | SEQ_FLIPX |
-                        SEQ_FLIPY | SEQ_USE_COLOR_BALANCE | SEQ_MAKE_PREMUL)) {
+                        SEQ_FLIPY | SEQ_USE_COLOR_BALANCE | SEQ_MAKE_PREMUL))
+       {
                return TRUE;
        }
 
@@ -1762,8 +1764,10 @@ static ImBuf *input_preprocess(
                        }
                }
 
-               if (c.top + c.bottom >= ibuf->y || c.left + c.right >= ibuf->x ||
-                   t.xofs >= dx || t.yofs >= dy) {
+               if (c.top  + c.bottom >= ibuf->y ||
+                   c.left + c.right  >= ibuf->x ||
+                   t.xofs >= dx || t.yofs >= dy)
+               {
                        make_black_ibuf(ibuf);
                }
                else {
@@ -3168,7 +3172,7 @@ void seq_tx_handle_xlimits(Sequence *seq, int leftflag, int rightflag)
        }
 
        if (rightflag) {
-               if (seq_tx_get_final_right(seq, 0) <=  seq_tx_get_final_left(seq, 0)) {
+               if (seq_tx_get_final_right(seq, 0) <= seq_tx_get_final_left(seq, 0)) {
                        seq_tx_set_final_right(seq, seq_tx_get_final_left(seq, 0) + 1);
                }
 
@@ -3508,7 +3512,8 @@ Sequence *seq_metastrip(ListBase *seqbase, Sequence *meta, Sequence *seq)
                        return meta;
                }
                else if (iseq->seqbase.first &&
-                        (rval = seq_metastrip(&iseq->seqbase, iseq, seq))) {
+                        (rval = seq_metastrip(&iseq->seqbase, iseq, seq)))
+               {
                        return rval;
                }
        }
index fe7ec83..85027ef 100644 (file)
@@ -697,7 +697,7 @@ static void add_2nd_order_roller(Object *ob, float UNUSED(stiffness), int *count
                        if (bpo) {/* so now we have a 2nd order humpdidump */
                                for (c=bpo->nofsprings;c>0;c--) {
                                        bs2 = sb->bspring + bpo->springs[c-1];
-                                       if ((bs2->v1 != notthis)  && (bs2->v1 > v0)) {
+                                       if ((bs2->v1 != notthis) && (bs2->v1 > v0)) {
                                                (*counter)++;/*hit */
                                                if (addsprings) {
                                                        bs3->v1= v0;
@@ -2228,7 +2228,7 @@ static int _softbody_calc_forces_slice_in_a_thread(Scene *scene, Object *ob, flo
                                        attached = 0;
                                        for (b=obp->nofsprings;b>0;b--) {
                                                bs = sb->bspring + obp->springs[b-1];
-                                               if (( ilast-bb == bs->v2)  || ( ilast-bb == bs->v1)) {
+                                               if (( ilast-bb == bs->v2) || ( ilast-bb == bs->v1)) {
                                                        attached=1;
                                                        continue;}
                                        }
@@ -2600,7 +2600,7 @@ static void softbody_calc_forces(Scene *scene, Object *ob, float forcetime, floa
                                                attached = 0;
                                                for (b=obp->nofsprings;b>0;b--) {
                                                        bs = sb->bspring + obp->springs[b-1];
-                                                       if (( sb->totpoint-a == bs->v2)  || ( sb->totpoint-a == bs->v1)) {
+                                                       if (( sb->totpoint-a == bs->v2) || ( sb->totpoint-a == bs->v1)) {
                                                                attached=1;
                                                                continue;}
                                                }
@@ -4078,7 +4078,8 @@ void sbObjectStep(Scene *scene, Object *ob, float cfra, float (*vertexCos)[3], i
 
        /* verify if we need to create the softbody data */
        if (sb->bpoint == NULL ||
-          ((ob->softflag & OB_SB_EDGES) && !ob->soft->bspring && object_has_edges(ob))) {
+          ((ob->softflag & OB_SB_EDGES) && !ob->soft->bspring && object_has_edges(ob)))
+       {
 
                switch (ob->type) {
                        case OB_MESH:
index ad5bb24..22e702d 100644 (file)
@@ -610,7 +610,8 @@ static void ss_sync_from_derivedmesh(CCGSubSurf *ss, DerivedMesh *dm,
                 * other parts of code significantly to handle missing faces.
                 * since this really shouldn't even be possible we just bail.*/
                if (ccgSubSurf_syncFace(ss, SET_INT_IN_POINTER(i), mp->totloop,
-                                       fVerts, &f) == eCCGError_InvalidValue) {
+                                       fVerts, &f) == eCCGError_InvalidValue)
+               {
                        static int hasGivenError = 0;
 
                        if (!hasGivenError) {
index 32cf966..7bfd418 100644 (file)
@@ -1124,7 +1124,8 @@ static void txt_pop_first(Text *text)
 {
                        
        if (txt_get_span(text->curl, text->sell) < 0 ||
-           (text->curl == text->sell && text->curc > text->selc)) {
+           (text->curl == text->sell && text->curc > text->selc))
+       {
                txt_curs_swap(text);
        }
 
@@ -1140,7 +1141,8 @@ static void txt_pop_first(Text *text)
 static void txt_pop_last(Text *text)
 {
        if (txt_get_span(text->curl, text->sell) > 0 ||
-           (text->curl == text->sell && text->curc < text->selc)) {
+           (text->curl == text->sell && text->curc < text->selc))
+       {
                txt_curs_swap(text);
        }
 
@@ -3214,7 +3216,8 @@ short txt_clear_marker_region(Text *text, TextLine *line, int start, int end, in
                else if (marker->lineno > lineno) break;
 
                if ((marker->start == marker->end && start <= marker->start && marker->start <= end) ||
-                   (marker->start < end && marker->end > start)) {
+                   (marker->start < end && marker->end > start))
+               {
                        BLI_freelinkN(&text->markers, marker);
                        cleared = 1;
                }
@@ -3234,7 +3237,8 @@ short txt_clear_markers(Text *text, int group, int flags)
                next = marker->next;
 
                if ((!group || marker->group == group) &&
-                   (marker->flags & flags) == flags) {
+                   (marker->flags & flags) == flags)
+               {
                        BLI_freelinkN(&text->markers, marker);
                        cleared = 1;
                }
index 2c868ca..2ec42b4 100644 (file)
@@ -233,7 +233,8 @@ void init_tex_mapping(TexMapping *texmap)
        float smat[3][3], rmat[3][3], mat[3][3], proj[3][3];
 
        if (texmap->projx == PROJ_X && texmap->projy == PROJ_Y && texmap->projz == PROJ_Z &&
-           is_zero_v3(texmap->loc) && is_zero_v3(texmap->rot) && is_one_v3(texmap->size)) {
+           is_zero_v3(texmap->loc) && is_zero_v3(texmap->rot) && is_one_v3(texmap->size))
+       {
                unit_m4(texmap->mat);
 
                texmap->flag |= TEXMAP_UNIT_MATRIX;
index a3fdb41..91e93bb 100644 (file)
@@ -472,7 +472,8 @@ static AVStream *alloc_video_stream(RenderData *rd, int codec_id, AVFormatContex
                c->time_base.num = 100;
        }
        else if ((double) ((int) rd->frs_sec_base) ==
-                rd->frs_sec_base) {
+                rd->frs_sec_base)
+       {
                c->time_base.den = rd->frs_sec;
                c->time_base.num = (int) rd->frs_sec_base;
        }
@@ -523,7 +524,7 @@ static AVStream *alloc_video_stream(RenderData *rd, int codec_id, AVFormatContex
 
        if (codec_id == CODEC_ID_FFV1) {
 #ifdef FFMPEG_FFV1_ALPHA_SUPPORTED
-               if (rd->im_format.planes ==  R_IMF_PLANES_RGBA) {
+               if (rd->im_format.planes == R_IMF_PLANES_RGBA) {
                        c->pix_fmt = PIX_FMT_RGB32;
                }
                else {
@@ -535,7 +536,7 @@ static AVStream *alloc_video_stream(RenderData *rd, int codec_id, AVFormatContex
        }
 
        if (codec_id == CODEC_ID_QTRLE) {
-               if (rd->im_format.planes ==  R_IMF_PLANES_RGBA) {
+               if (rd->im_format.planes == R_IMF_PLANES_RGBA) {
                        c->pix_fmt = PIX_FMT_ARGB;
                }
        }
@@ -544,7 +545,8 @@ static AVStream *alloc_video_stream(RenderData *rd, int codec_id, AVFormatContex
 //             || !strcmp(of->oformat->name, "mp4")
 //         || !strcmp(of->oformat->name, "mov")
 //         || !strcmp(of->oformat->name, "3gp")
-           ) {
+           )
+       {
                fprintf(stderr, "Using global header\n");
                c->flags |= CODEC_FLAG_GLOBAL_HEADER;
        }
@@ -903,7 +905,8 @@ void BKE_ffmpeg_filepath_get(char *string, RenderData *rd)
 
        while (*fe) {
                if (BLI_strcasecmp(string + strlen(string) - strlen(*fe), 
-                                  *fe) == 0) {
+                                  *fe) == 0)
+               {
                        break;
                }
                fe++;
@@ -955,7 +958,8 @@ static void write_audio_frames(double to_pts)
 
        while (audio_stream && !finished) {
                if ((audio_time >= to_pts) ||
-                   (write_audio_frame())) {
+                   (write_audio_frame()))
+               {
                        finished = 1;
                }
        }
@@ -1406,8 +1410,8 @@ void BKE_ffmpeg_image_type_verify(RenderData *rd, ImageFormatData *imf)
                if (rd->ffcodecdata.type <= 0 ||
                    rd->ffcodecdata.codec <= 0 ||
                    rd->ffcodecdata.audio_codec <= 0 ||
-                   rd->ffcodecdata.video_bitrate <= 1) {
-
+                   rd->ffcodecdata.video_bitrate <= 1)
+               {
                        rd->ffcodecdata.codec = CODEC_ID_MPEG2VIDEO;
 
                        BKE_ffmpeg_preset_set(rd, FFMPEG_PRESET_DVD);
index 49a6cbc..ed3eedb 100644 (file)
@@ -1529,7 +1529,7 @@ void BLI_join_dirfile(char *dst, const size_t maxlen, const char *dir, const cha
        size_t dirlen = BLI_strnlen(dir, maxlen);
 
        if (dst != dir) {
-               if (dirlen  == maxlen) {
+               if (dirlen == maxlen) {
                        memcpy(dst, dir, dirlen);
                        dst[dirlen - 1] = '\0';
                        return; /* dir fills the path */
index fdb0cc0..f4b5785 100644 (file)
@@ -406,8 +406,9 @@ static void build_mesh_leaf_node(PBVH *bvh, PBVHNode *node)
 
        /* Build the vertex list, unique verts first */
        for (iter = BLI_ghashIterator_new(map), i = 0;
-            !BLI_ghashIterator_isDone(iter);
-            BLI_ghashIterator_step(iter), ++i) {
+            BLI_ghashIterator_isDone(iter) == FALSE;
+            BLI_ghashIterator_step(iter), ++i)
+       {
                void *value = BLI_ghashIterator_getValue(iter);
                int ndx = GET_INT_FROM_POINTER(value);
 
index 5353187..e73899c 100644 (file)
@@ -135,7 +135,7 @@ size_t BLI_strescape(char *dst, const char *src, const size_t maxlen)
                        case '\t':
                        case '\n':
                        case '\r':
-                               if (len + 1 <  maxlen) {
+                               if (len + 1 < maxlen) {
                                        *dst++ = '\\';
                                        len++;
                                }
index 2b5eebb..06fd2bd 100644 (file)
@@ -5025,12 +5025,8 @@ static void direct_link_scene(FileData *fd, Scene *sce)
                        if (seq->strip && seq->strip->done==0) {
                                seq->strip->done = TRUE;
                                
-                               if (seq->type == SEQ_IMAGE ||
-                                  seq->type == SEQ_MOVIE ||
-                                  seq->type == SEQ_RAM_SOUND ||
-                                  seq->type == SEQ_HD_SOUND) {
-                                       seq->strip->stripdata = newdataadr(
-                                               fd, seq->strip->stripdata);
+                               if (ELEM4(seq->type, SEQ_IMAGE, SEQ_MOVIE, SEQ_RAM_SOUND, SEQ_HD_SOUND)) {
+                                       seq->strip->stripdata = newdataadr(fd, seq->strip->stripdata);
                                }
                                else {
                                        seq->strip->stripdata = NULL;
index 4cf17b2..c028c37 100644 (file)
@@ -2331,7 +2331,7 @@ void blo_do_versions_250(FileData *fd, Library *lib, Main *main)
                }
 
                /* redraws flag in SpaceTime has been moved to Screen level */
-               for (sc  = main->screen.first; sc; sc = sc->id.next) {
+               for (sc = main->screen.first; sc; sc = sc->id.next) {
                        if (sc->redraws_flag == 0) {
                                /* just initialize to default? */
                                // XXX: we could also have iterated through areas, and taken them from the first timeline available...
index 799dc82..7b314c3 100644 (file)
@@ -884,9 +884,9 @@ void blo_do_versions_pre250(FileData *fd, Library *lib, Main *main)
 
                /* let faces have default add factor of 0.0 */
                while (ma) {
-                 if (!(ma->mode & MA_HALO))
-                         ma->add = 0.0;
-                 ma = ma->id.next;
+                       if (!(ma->mode & MA_HALO))
+                               ma->add = 0.0;
+                       ma = ma->id.next;
                }
 
                while (ob) {
@@ -3606,7 +3606,7 @@ void blo_do_versions_pre250(FileData *fd, Library *lib, Main *main)
                                /* check if top parent has compound shape set and if yes, set this object
                                 * to compound shaper as well (was the behavior before, now it's optional) */
                                Object *parent = blo_do_versions_newlibadr(fd, lib, ob->parent);
-                               while (parent && parent != ob &&  parent->parent != NULL) {
+                               while (parent && parent != ob && parent->parent != NULL) {
                                        parent = blo_do_versions_newlibadr(fd, lib, parent->parent);
                                }
                                if (parent) {
index 02ebc91..297eb60 100644 (file)
@@ -779,7 +779,7 @@ static void write_renderinfo(WriteData *wd, Main *mainvar)          /* for renderdeamon
        current_screen_compat(mainvar, &curscreen);
 
        for (sce= mainvar->scene.first; sce; sce= sce->id.next) {
-               if (sce->id.lib==NULL  && ( sce==curscreen->scene || (sce->r.scemode & R_BG_RENDER)) ) {
+               if (sce->id.lib == NULL && (sce == curscreen->scene || (sce->r.scemode & R_BG_RENDER))) {
                        data.sfra = sce->r.sfra;
                        data.efra = sce->r.efra;
                        memset(data.scene_name, 0, sizeof(data.scene_name));
index b2d9590..82ad5c1 100644 (file)
@@ -254,7 +254,7 @@ void BMO_slot_copy(BMOperator *source_op, BMOperator *dest_op, const char *src,
                return;
        }
 
-       if (dest_slot->slottype  == BMO_OP_SLOT_ELEMENT_BUF) {
+       if (dest_slot->slottype == BMO_OP_SLOT_ELEMENT_BUF) {
                /* do buffer copy */
                dest_slot->data.buf = NULL;
                dest_slot->len = source_slot->len;
@@ -264,7 +264,7 @@ void BMO_slot_copy(BMOperator *source_op, BMOperator *dest_op, const char *src,
                        memcpy(dest_slot->data.buf, source_slot->data.buf, slot_alloc_size);
                }
        }
-       else if (dest_slot->slottype  == BMO_OP_SLOT_MAPPING) {
+       else if (dest_slot->slottype == BMO_OP_SLOT_MAPPING) {
                GHashIterator it;
                BMOElemMapping *srcmap, *dstmap;
 
index b8abe11..2d4c15d 100644 (file)
@@ -444,7 +444,7 @@ void bmo_bridge_loops_exec(BMesh *bm, BMOperator *op)
                        i2 = i;
                        i2next = clamp_index(i + 1, lenv2);
 
-                       if (vv1[i1] ==  vv1[i1next]) {
+                       if (vv1[i1] == vv1[i1next]) {
                                continue;
                        }
 
index 7f29513..4377eb3 100644 (file)
@@ -597,7 +597,7 @@ void bmo_similarfaces_exec(BMesh *bm, BMOperator *op)
        /* now select the rest (if any) */
        for (i = 0; i < num_total; i++) {
                fm = f_ext[i].f;
-               if (!BMO_elem_flag_test(bm, fm, FACE_MARK)  && !BM_elem_flag_test(fm, BM_ELEM_HIDDEN)) {
+               if (!BMO_elem_flag_test(bm, fm, FACE_MARK) && !BM_elem_flag_test(fm, BM_ELEM_HIDDEN)) {
                        int cont = TRUE;
                        for (idx = 0; idx < num_sels && cont == TRUE; idx++) {
                                fs = f_ext[indices[idx]].f;
index 546ab0e..4ccdc61 100644 (file)
@@ -276,7 +276,7 @@ EditBone *make_boneList(ListBase *edbo, ListBase *bones, EditBone *parent, Bone
                else {
                        /* if the bone is not selected, but connected to its parent
                         *  copy the parents tip selection state */
-                       if (eBone->parent &&  (eBone->flag & BONE_CONNECTED)) {
+                       if (eBone->parent && (eBone->flag & BONE_CONNECTED)) {
                                /* selecting with the mouse gives this behavior */
                                if (eBone->parent->flag & BONE_TIPSEL) {
                                        eBone->flag |= BONE_ROOTSEL;
index b975d15..ab96656 100644 (file)
@@ -1393,7 +1393,8 @@ static void meshdeform_bind_floodfill(MeshDeformBind *mdb)
 
                        if (b != -1) {
                                if (tag[b] == MESHDEFORM_TAG_UNTYPED ||
-                                   (tag[b] == MESHDEFORM_TAG_BOUNDARY && !mdb->boundisect[a][i - 1])) {
+                                   (tag[b] == MESHDEFORM_TAG_BOUNDARY && !mdb->boundisect[a][i - 1]))
+                               {
                                        tag[b] = MESHDEFORM_TAG_EXTERIOR;
                                        stack[stacksize++] = b;
                                }
index 3f056f9..a629312 100644 (file)
@@ -1860,7 +1860,7 @@ static void finalizeGraph(ReebGraph *rg, char passes, char method)
        
        sortArcs(rg);
        
-       for (i = 0; i <  passes; i++) {
+       for (i = 0; i < passes; i++) {
                postprocessGraph(rg, method);
        }
        
index 7afba04..aa29100 100644 (file)
@@ -270,7 +270,7 @@ void printknots(Object *obedit)
        int a, num;
 
        for (nu = editnurb->first; nu; nu = nu->next) {
-               if (isNurbsel(nu) &&  nu->type == CU_NURBS) {
+               if (isNurbsel(nu) && nu->type == CU_NURBS) {
                        if (nu->knotsu) {
                                num = KNOTSU(nu);
                                for (a = 0; a < num; a++) printf("knotu %d: %f\n", a, nu->knotsu[a]);
index 2f9e763..e535990 100644 (file)
@@ -79,7 +79,7 @@ int uiGetRoundBox(void)
 void uiDrawBox(int mode, float minx, float miny, float maxx, float maxy, float rad)
 {
        float vec[7][2] = {{0.195, 0.02}, {0.383, 0.067}, {0.55, 0.169}, {0.707, 0.293},
-                                          {0.831, 0.45}, {0.924, 0.617}, {0.98, 0.805}};
+                          {0.831, 0.45}, {0.924, 0.617}, {0.98, 0.805}};
        int a;
        
        /* mult */
@@ -147,7 +147,7 @@ static void round_box_shade_col(const float col1[3], float const col2[3], const
 void uiDrawBoxShade(int mode, float minx, float miny, float maxx, float maxy, float rad, float shadetop, float shadedown)
 {
        float vec[7][2] = {{0.195, 0.02}, {0.383, 0.067}, {0.55, 0.169}, {0.707, 0.293},
-                                          {0.831, 0.45}, {0.924, 0.617}, {0.98, 0.805}};
+                          {0.831, 0.45}, {0.924, 0.617}, {0.98, 0.805}};
        const float div = maxy - miny;
        const float idiv = 1.0f / div;
        float coltop[3], coldown[3], color[4];
@@ -256,7 +256,7 @@ void uiDrawBoxVerticalShade(int mode, float minx, float miny, float maxx, float
                             float rad, float shadeLeft, float shadeRight)
 {
        float vec[7][2] = {{0.195, 0.02}, {0.383, 0.067}, {0.55, 0.169}, {0.707, 0.293},
-                                          {0.831, 0.45}, {0.924, 0.617}, {0.98, 0.805}};
+                          {0.831, 0.45}, {0.924, 0.617}, {0.98, 0.805}};
        const float div = maxx - minx;
        const float idiv = 1.0f / div;
        float colLeft[3], colRight[3], color[4];
index 4f0274f..cfd0919 100644 (file)
@@ -5751,7 +5751,8 @@ static int ui_handle_list_event(bContext *C, wmEvent *event, ARegion *ar)
                Panel *pa = but->block->panel;
 
                if (ELEM(event->type, UPARROWKEY, DOWNARROWKEY) ||
-                   ((ELEM(event->type, WHEELUPMOUSE, WHEELDOWNMOUSE) && event->alt))) {
+                   ((ELEM(event->type, WHEELUPMOUSE, WHEELDOWNMOUSE) && event->alt)))
+               {
                        /* activate up/down the list */
                        value = RNA_property_int_get(&but->rnapoin, but->rnaprop);
 
index fe7a4e8..42c6bfc 100644 (file)
@@ -127,8 +127,11 @@ typedef struct uiWidgetType {
 
 /* *********************** draw data ************************** */
 
-static float cornervec[WIDGET_CURVE_RESOLU][2] = {{0.0, 0.0}, {0.195, 0.02}, {0.383, 0.067}, {0.55, 0.169},
-                                                                                                 {0.707, 0.293}, {0.831, 0.45}, {0.924, 0.617}, {0.98, 0.805}, {1.0, 1.0}};
+static float cornervec[WIDGET_CURVE_RESOLU][2] = {
+       {0.0, 0.0}, {0.195, 0.02}, {0.383, 0.067},
+       {0.55, 0.169}, {0.707, 0.293}, {0.831, 0.45},
+       {0.924, 0.617}, {0.98, 0.805}, {1.0, 1.0}
+};
 
 #define WIDGET_AA_JITTER 8
 static float jit[WIDGET_AA_JITTER][2] = {
index b74e879..e396391 100644 (file)
@@ -348,7 +348,8 @@ static int edbm_rip_call_edgesplit(BMEditMesh *em, wmOperator *op)
        BMOperator bmop;
 
        if (!EDBM_op_init(em, &bmop, op, "edgesplit edges=%he verts=%hv use_verts=%b",
-                         BM_ELEM_TAG, BM_ELEM_SELECT, TRUE)) {
+                         BM_ELEM_TAG, BM_ELEM_SELECT, TRUE))
+       {
                return FALSE;
        }
        BMO_op_exec(em->bm, &bmop);
index dc0a1a9..58e07b5 100644 (file)
@@ -931,23 +931,16 @@ static int edbm_loop_multiselect_exec(bContext *C, wmOperator *op)
        BMIter iter;
        int totedgesel = 0;
 
-       for (eed = BM_iter_new(&iter, em->bm, BM_EDGES_OF_MESH, NULL);
-            eed; eed = BM_iter_step(&iter)) {
-
+       BM_ITER_MESH (eed, &iter, em->bm, BM_EDGES_OF_MESH) {
                if (BM_elem_flag_test(eed, BM_ELEM_SELECT)) {
                        totedgesel++;
                }
        }
-
        
        edarray = MEM_mallocN(sizeof(BMEdge *) * totedgesel, "edge array");
        edindex = 0;
        
-       for (eed = BM_iter_new(&iter, em->bm, BM_EDGES_OF_MESH, NULL);
-            eed;
-            eed = BM_iter_step(&iter))
-       {
-
+       BM_ITER_MESH (eed, &iter, em->bm, BM_EDGES_OF_MESH) {
                if (BM_elem_flag_test(eed, BM_ELEM_SELECT)) {
                        edarray[edindex] = eed;
                        edindex++;
index 1b3e4ad..e5a85fe 100644 (file)
@@ -3534,8 +3534,7 @@ static int edbm_select_by_number_vertices_exec(bContext *C, wmOperator *op)
        int numverts = RNA_int_get(op->ptr, "number");
        int type = RNA_enum_get(op->ptr, "type");
 
-       for (efa = BM_iter_new(&iter, em->bm, BM_FACES_OF_MESH, NULL);
-            efa; efa = BM_iter_step(&iter)) {
+       BM_ITER_MESH (efa, &iter, em->bm, BM_FACES_OF_MESH) {
 
                int select = 0;
 
@@ -3598,17 +3597,13 @@ static int edbm_select_loose_verts_exec(bContext *C, wmOperator *UNUSED(op))
        BMEdge *eed;
        BMIter iter;
 
-       for (eve = BM_iter_new(&iter, em->bm, BM_VERTS_OF_MESH, NULL);
-            eve; eve = BM_iter_step(&iter)) {
-
+       BM_ITER_MESH (eve, &iter, em->bm, BM_VERTS_OF_MESH) {
                if (!eve->e) {
                        BM_vert_select_set(em->bm, eve, TRUE);
                }
        }
 
-       for (eed = BM_iter_new(&iter, em->bm, BM_EDGES_OF_MESH, NULL);
-            eed; eed = BM_iter_step(&iter)) {
-
+       BM_ITER_MESH (eed, &iter, em->bm, BM_EDGES_OF_MESH) {
                if (!eed->l) {
                        BM_edge_select_set(em->bm, eed, TRUE);
                }
index 1437081..47748fb 100644 (file)
@@ -45,6 +45,7 @@
 #include "BLI_math.h"
 #include "BLI_listbase.h"
 #include "BLI_string.h"
+#include "BLI_string_utf8.h"
 #include "BLI_path_util.h"
 #include "BLI_utildefines.h"
 
@@ -125,8 +126,9 @@ ModifierData *ED_object_modifier_add(ReportList *reports, Main *bmain, Scene *sc
                else
                        BLI_addtail(&ob->modifiers, new_md);
 
-               if (name)
+               if (name) {
                        BLI_strncpy_utf8(new_md->name, name, sizeof(new_md->name));
+               }
 
                /* make sure modifier data has unique name */
 
@@ -223,7 +225,8 @@ static int object_modifier_remove(Object *ob, ModifierData *md, int *sort_depsgr
        }
 
        if (ELEM(md->type, eModifierType_Softbody, eModifierType_Cloth) &&
-           ob->particlesystem.first == NULL) {
+           ob->particlesystem.first == NULL)
+       {
                ob->mode &= ~OB_MODE_PARTICLE_EDIT;
        }
 
index 3a932b5..fa86f08 100644 (file)
@@ -506,7 +506,7 @@ static short select_grouped_siblings(bContext *C, Object *ob)
 
        CTX_DATA_BEGIN (C, Base *, base, selectable_bases)
        {
-               if ((base->object->parent == ob->parent)  && !(base->flag & SELECT)) {
+               if ((base->object->parent == ob->parent) && !(base->flag & SELECT)) {
                        ED_base_object_select(base, BA_SELECT);
                        changed = 1;
                }
index ebc255f..b5d4467 100644 (file)
@@ -342,7 +342,8 @@ static int sculpt_get_brush_geometry(bContext *C, ViewContext *vc,
        window[1] = y + vc->ar->winrct.ymin;
 
        if (vc->obact->sculpt && vc->obact->sculpt->pbvh &&
-           sculpt_stroke_get_location(C, location, window)) {
+           sculpt_stroke_get_location(C, location, window))
+       {
                *pixel_radius =
                    project_brush_radius(vc,
                                         BKE_brush_unprojected_radius_get(scene, brush),
index d5c7b66..e6ef300 100644 (file)
@@ -2131,7 +2131,9 @@ static void project_bucket_clip_face(
                
                /* remove doubles */
                /* first/last check */
-               if (fabsf(isectVCosSS[0][0] - isectVCosSS[(*tot) - 1][0]) < PROJ_GEOM_TOLERANCE &&  fabsf(isectVCosSS[0][1] - isectVCosSS[(*tot) - 1][1]) < PROJ_GEOM_TOLERANCE) {
+               if (fabsf(isectVCosSS[0][0] - isectVCosSS[(*tot) - 1][0]) < PROJ_GEOM_TOLERANCE &&
+                   fabsf(isectVCosSS[0][1] - isectVCosSS[(*tot) - 1][1]) < PROJ_GEOM_TOLERANCE)
+               {
                        (*tot)--;
                }
                
index 3687297..23d1c00 100644 (file)
@@ -225,7 +225,8 @@ static Brush *brush_tool_cycle(Main *bmain, Brush *brush_orig, const int tool, c
             brush = brush->id.next ? brush->id.next : bmain->brush.first)
        {
                if ((brush->ob_mode & ob_mode) &&
-                   (brush_tool(brush, tool_offset) == tool)) {
+                   (brush_tool(brush, tool_offset) == tool))
+               {
                        return brush;
                }
        }
index 6773d50..aea29c2 100644 (file)
@@ -350,7 +350,8 @@ static int sculpt_get_redraw_rect(ARegion *ar, RegionView3D *rv3d,
                                      bb_max,
                                      ar,
                                      rv3d,
-                                     ob)) {
+                                     ob))
+       {
                return 0;
        }
 
@@ -2776,7 +2777,8 @@ static void do_brush_action(Sculpt *sd, Object *ob, Brush *brush)
                }
 
                if (!ELEM(brush->sculpt_tool, SCULPT_TOOL_SMOOTH, SCULPT_TOOL_MASK) &&
-                   brush->autosmooth_factor > 0) {
+                   brush->autosmooth_factor > 0)
+               {
                        if (brush->flag & BRUSH_INVERSE_SMOOTH_PRESSURE) {
                                smooth(sd, ob, nodes, totnode, brush->autosmooth_factor * (1 - ss->cache->pressure), FALSE);
                        }
@@ -3196,7 +3198,8 @@ static void sculpt_init_mirror_clipping(Object *ob, SculptSession *ss)
 
        for (md = ob->modifiers.first; md; md = md->next) {
                if (md->type == eModifierType_Mirror &&
-                   (md->mode & eModifierMode_Realtime)) {
+                   (md->mode & eModifierMode_Realtime))
+               {
                        MirrorModifierData *mmd = (MirrorModifierData *)md;
                        
                        if (mmd->flag & MOD_MIR_CLIPPING) {
@@ -3355,7 +3358,8 @@ static void sculpt_update_brush_delta(Sculpt *sd, Object *ob, Brush *brush)
        if (ELEM5(tool,
                  SCULPT_TOOL_GRAB, SCULPT_TOOL_NUDGE,
                  SCULPT_TOOL_CLAY_STRIPS, SCULPT_TOOL_SNAKE_HOOK,
-                 SCULPT_TOOL_THUMB)) {
+                 SCULPT_TOOL_THUMB))
+       {
                float grab_location[3], imat[4][4], delta[3], loc[3];
 
                if (cache->first_time) {
index 117e599..5131b72 100644 (file)
@@ -381,7 +381,7 @@ static int view_pan_modal(bContext *C, wmOperator *op, wmEvent *event)
 
                        return OPERATOR_FINISHED;
                default:
-                       if (event->type == vpd->event_type &&  event->val == KM_RELEASE) {
+                       if (event->type == vpd->event_type && event->val == KM_RELEASE) {
                                view_pan_exit(C, op, 0);
 
                                return OPERATOR_FINISHED;
index b17ca5e..b0818d4 100644 (file)
@@ -300,8 +300,9 @@ FileSelection ED_fileselect_layout_offset_rect(FileLayout* layout, const rcti* r
        colmax = (rect->xmax)/(layout->tile_w + 2*layout->tile_border_x);
        rowmax = (rect->ymax)/(layout->tile_h + 2*layout->tile_border_y);
        
-       if ( is_inside(colmin, rowmin, layout->columns, layout->rows) || 
-                is_inside(colmax, rowmax, layout->columns, layout->rows) ) {
+       if (is_inside(colmin, rowmin, layout->columns, layout->rows) ||
+           is_inside(colmax, rowmax, layout->columns, layout->rows) )
+       {
                CLAMP(colmin, 0, layout->columns-1);
                CLAMP(rowmin, 0, layout->rows-1);
                CLAMP(colmax, 0, layout->columns-1);
index e2ab5ea..31389bc 100644 (file)
@@ -313,7 +313,7 @@ static int image_view_pan_modal(bContext *C, wmOperator *op, wmEvent *event)
                        image_view_pan_exec(C, op);
                        break;
                default:
-                       if (event->type == vpd->event_type &&  event->val == KM_RELEASE) {
+                       if (event->type == vpd->event_type && event->val == KM_RELEASE) {
                                image_view_pan_exit(C, op, 0);
                                return OPERATOR_FINISHED;
                        }
index bf0d940..dd21fca 100644 (file)
@@ -842,7 +842,7 @@ static ID **get_selected_and_linked_obs(bContext *C, short *count, short scavisf
                                }
                                
                                /* 2nd case: select cont when act selected */
-                               if ((scavisflag & BUTS_CONT_LINK)  && (ob->scavisflag & OB_VIS_CONT)==0) {
+                               if ((scavisflag & BUTS_CONT_LINK) && (ob->scavisflag & OB_VIS_CONT)==0) {
                                        cont= ob->controllers.first;
                                        while (cont) {
                                                for (a=0; a<cont->totlinks; a++) {
@@ -878,7 +878,7 @@ static ID **get_selected_and_linked_obs(bContext *C, short *count, short scavisf
                                }
                                
                                /* 4th case: select actuator when controller selected */
-                               if ( (scavisflag & (BUTS_ACT_LINK|BUTS_ACT_STATE))  && (ob->scavisflag & OB_VIS_CONT)) {
+                               if ( (scavisflag & (BUTS_ACT_LINK|BUTS_ACT_STATE)) && (ob->scavisflag & OB_VIS_CONT)) {
                                        cont= ob->controllers.first;
                                        while (cont) {
                                                for (a=0; a<cont->totlinks; a++) {
@@ -5070,8 +5070,8 @@ void logic_buttons(bContext *C, ARegion *ar)
                                if (!(slogic->scaflag & BUTS_ACT_STATE) ||
                                        !(act->flag & ACT_LINKED) ||            /* always display actuators without links so that is can be edited */
                                         (act->flag & ACT_VISIBLE) ||           /* this actuator has visible connection, display it */
-                                        (act->flag & ACT_PIN && slogic->scaflag & BUTS_ACT_STATE)) {
-                                       
+                                        (act->flag & ACT_PIN && slogic->scaflag & BUTS_ACT_STATE))
+                               {
                                        pin = (slogic->scaflag & BUTS_ACT_STATE && (act->flag & SENS_SHOW || act->flag & SENS_PIN)) ? 1 : 0;
                                        
                                        act->flag |= ACT_VISIBLE;       /* mark the actuator as visible to help implementing the up/down action */
index 49fadf3..392e779 100644 (file)
@@ -367,7 +367,8 @@ static void draw_seq_handle(View2D *v2d, Sequence *seq, float pixelx, short dire
        
        /* draw! */
        if (seq->type < SEQ_EFFECT || 
-           get_sequence_effect_num_inputs(seq->type) == 0) {
+           get_sequence_effect_num_inputs(seq->type) == 0)
+       {
                glEnable(GL_BLEND);
                
                glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
index 2d1ba69..2543b49 100644 (file)
@@ -1365,8 +1365,8 @@ static int sequencer_reassign_inputs_exec(bContext *C, wmOperator *op)
        /* see reassigning would create a cycle */
        if (seq_is_predecessor(seq1, last_seq) ||
            seq_is_predecessor(seq2, last_seq) ||
-           seq_is_predecessor(seq3, last_seq)
-           ) {
+           seq_is_predecessor(seq3, last_seq))
+       {
                BKE_report(op->reports, RPT_ERROR, "Can't reassign inputs: no cycles allowed");
                return OPERATOR_CANCELLED;
        }
@@ -2109,8 +2109,8 @@ static int sequencer_view_all_preview_exec(bContext *C, wmOperator *UNUSED(op))
        imgwidth = (int)(imgwidth * (scene->r.xasp / scene->r.yasp));
 
        if (((imgwidth >= width) || (imgheight >= height)) &&
-           ((width > 0) && (height > 0))) {
-
+           ((width > 0) && (height > 0)))
+       {
                /* Find the zoom value that will fit the image in the image space */
                zoomX = ((float)width) / ((float)imgwidth);
                zoomY = ((float)height) / ((float)imgheight);
index ffb686b..463a262 100644 (file)
@@ -1174,7 +1174,7 @@ static void calc_text_rcts(SpaceText *st, ARegion *ar, rcti *scroll, rcti *back)
                                /* push hl start down */
                                hlstart = barstart + barheight;
                        }
-                       else if (lhlend > st->top  && lhlstart < st->top && hlstart > barstart) {
+                       else if (lhlend > st->top && lhlstart < st->top && hlstart > barstart) {
                                /*fill out start */
                                hlstart = barstart;
                        }
index 111af7f..000f81a 100644 (file)
@@ -3246,7 +3246,8 @@ static void draw_em_fancy(Scene *scene, View3D *v3d, RegionView3D *rv3d,
                }
 
                if ((G.debug & G_DEBUG) && (me->drawflag & ME_DRAWEXTRA_INDICES) &&
-                   !(v3d->flag2 & V3D_RENDER_OVERRIDE)) {
+                   !(v3d->flag2 & V3D_RENDER_OVERRIDE))
+               {
                        draw_em_indices(em);
                }
        }
index f63116a..33141bb 100644 (file)
@@ -1296,7 +1296,8 @@ static void backdrawview3d(Scene *scene, ARegion *ar, View3D *v3d)
                /* do nothing */
        }
        else if (scene->obedit && v3d->drawtype > OB_WIRE &&
-                (v3d->flag & V3D_ZBUF_SELECT)) {
+                (v3d->flag & V3D_ZBUF_SELECT))
+       {
                /* do nothing */
        }
        else {
@@ -2734,8 +2735,8 @@ static void draw_viewport_fps(Scene *scene, ARegion *ar)
        }
 #endif
 
-             /* is this more then half a frame behind? */
-             if (fps + 0.5f < (float)(FPS)) {
+       /* is this more then half a frame behind? */
+       if (fps + 0.5f < (float)(FPS)) {
                UI_ThemeColor(TH_REDALERT);
                BLI_snprintf(printable, sizeof(printable), "fps: %.2f", fps);
        } 
index b0a4f5b..d1aa29d 100644 (file)
@@ -3096,7 +3096,7 @@ static void ElementRotation(TransInfo *t, TransData *td, float mat[3][3], short
                /* rotation */
                if ((t->flag & T_V3D_ALIGN)==0) { // align mode doesn't rotate objects itself
                        /* euler or quaternion? */
-                          if ((td->ext->rotOrder == ROT_MODE_QUAT) || (td->flag & TD_USEQUAT)) {
+                       if ((td->ext->rotOrder == ROT_MODE_QUAT) || (td->flag & TD_USEQUAT)) {
                                mul_serie_m3(fmat, td->mtx, mat, td->smtx, NULL, NULL, NULL, NULL, NULL);
                                mat3_to_quat(quat, fmat);       // Actual transform
                                
index 4d20346..2b11119 100644 (file)
@@ -1393,10 +1393,10 @@ static void createTransCurveVerts(bContext *C, TransInfo *t)
                                if (bezt->hide==0) {
                                        TransDataCurveHandleFlags *hdata = NULL;
 
-                                       if (            propmode ||
-                                                       ((bezt->f2 & SELECT) && hide_handles) ||
-                                                       ((bezt->f1 & SELECT) && hide_handles == 0)
-                                         ) {
+                                       if (propmode ||
+                                           ((bezt->f2 & SELECT) && hide_handles) ||
+                                           ((bezt->f1 & SELECT) && hide_handles == 0))
+                                       {
                                                copy_v3_v3(td->iloc, bezt->vec[0]);
                                                td->loc= bezt->vec[0];
                                                copy_v3_v3(td->center, bezt->vec[(hide_handles || bezt->f2 & SELECT) ? 1:0]);
@@ -1455,10 +1455,10 @@ static void createTransCurveVerts(bContext *C, TransInfo *t)
                                                count++;
                                                tail++;
                                        }
-                                       if (            propmode ||
-                                                       ((bezt->f2 & SELECT) && hide_handles) ||
-                                                       ((bezt->f3 & SELECT) && hide_handles == 0)
-                                         ) {
+                                       if (propmode ||
+                                           ((bezt->f2 & SELECT) && hide_handles) ||
+                                           ((bezt->f3 & SELECT) && hide_handles == 0))
+                                       {
                                                copy_v3_v3(td->iloc, bezt->vec[2]);
                                                td->loc= bezt->vec[2];
                                                copy_v3_v3(td->center, bezt->vec[(hide_handles || bezt->f2 & SELECT) ? 1:2]);
@@ -4438,7 +4438,7 @@ static void set_trans_object_base_flags(TransInfo *t)
 
                        if (parsel) {
                                /* rotation around local centers are allowed to propagate */
-                               if ((t->mode == TFM_ROTATION || t->mode == TFM_TRACKBALL)  && t->around == V3D_LOCAL) {
+                               if ((t->mode == TFM_ROTATION || t->mode == TFM_TRACKBALL) && t->around == V3D_LOCAL) {
                                        base->flag |= BA_TRANSFORM_CHILD;
                                }
                                else {
@@ -4487,7 +4487,7 @@ static int count_proportional_objects(TransInfo *t)
        Base *base;
 
        /* rotations around local centers are allowed to propagate, so we take all objects */
-       if (!((t->mode == TFM_ROTATION || t->mode == TFM_TRACKBALL)  && t->around == V3D_LOCAL)) {
+       if (!((t->mode == TFM_ROTATION || t->mode == TFM_TRACKBALL) && t->around == V3D_LOCAL)) {
                /* mark all parents */
                for (base= scene->base.first; base; base= base->next) {
                        if (TESTBASELIB_BGMODE(v3d, scene, base)) {
index 75d5efc..137d083 100644 (file)
@@ -323,7 +323,7 @@ void applySnapping(TransInfo *t, float *vec)
                
                // Time base quirky code to go around findnearest slowness
                /* !TODO! add exception for object mode, no need to slow it down then */
-               if (current - t->tsnap.last  >= 0.01) {
+               if (current - t->tsnap.last >= 0.01) {
                        t->tsnap.calcSnap(t, vec);
                        t->tsnap.targetSnap(t);
        
@@ -1066,7 +1066,7 @@ static int snapFace(ARegion *ar, float v1co[3], float v2co[3], float v3co[3], fl
                project_int(ar, location, screen_loc);
                new_dist = abs(screen_loc[0] - (int)mval[0]) + abs(screen_loc[1] - (int)mval[1]);
                
-               if (new_dist <= *dist && new_depth < *depth)  {
+               if (new_dist <= *dist && new_depth < *depth) {
                        *depth = new_depth;
                        retval = 1;
                        
index a4227d9..53331db 100644 (file)
@@ -2490,7 +2490,8 @@ static int border_select_exec(bContext *C, wmOperator *op)
                                }
                                else if (pinned) {
                                        if ((luv->flag & MLOOPUV_PINNED) && 
-                                           BLI_in_rctf(&rectf, luv->uv[0], luv->uv[1])) {
+                                           BLI_in_rctf(&rectf, luv->uv[0], luv->uv[1]))
+                                       {
                                                if (select) uvedit_uv_select_enable(em, scene, l, FALSE);
                                                else uvedit_uv_select_disable(em, scene, l);
                                        }
index 872f959..43f3e81 100644 (file)
@@ -319,7 +319,7 @@ static void stitch_calculate_island_snapping(StitchState *state, PreviewPosition
        int i;
        UvElement *element;
 
-       for (i = 0; i <  state->element_map->totalIslands; i++) {
+       for (i = 0; i < state->element_map->totalIslands; i++) {
                if (island_stitch_data[i].addedForPreview) {
                        int numOfIslandUVs = 0, j;
 
@@ -649,7 +649,7 @@ static int stitch_process_data(StitchState *state, Scene *scene, int final)
         *  Setup preview for stitchable islands *
         *****************************************/
        if (state->snap_islands) {
-               for (i = 0; i <  state->element_map->totalIslands; i++) {
+               for (i = 0; i < state->element_map->totalIslands; i++) {
                        if (island_stitch_data[i].addedForPreview) {
                                int numOfIslandUVs = 0, j;
                                UvElement *element;
index 899f4af..6538da2 100644 (file)
@@ -449,8 +449,8 @@ int GPU_verify_image(Image *ima, ImageUser *iuser, int tftile, int compare, int
 
        /* if tiling mode or repeat changed, change texture matrix to fit */
        if (GTS.tilemode!=GTS.curtilemode || GTS.curtileXRep!=GTS.tileXRep ||
-          GTS.curtileYRep != GTS.tileYRep) {
-
+           GTS.curtileYRep != GTS.tileYRep)
+       {
                glMatrixMode(GL_TEXTURE);
                glLoadIdentity();
 
index 5918cf9..4cb868a 100644 (file)
@@ -539,7 +539,8 @@ static void add_to_diffuse(GPUMaterial *mat, Material *ma, GPUShadeInput *shi, G
        GPUNodeLink *fac, *tmp, *addcol;
        
        if (!(mat->scene->gm.flag & GAME_GLSL_NO_RAMPS) &&
-          ma->ramp_col && (ma->mode & MA_RAMP_COL)) {
+           ma->ramp_col && (ma->mode & MA_RAMP_COL))
+       {
                /* MA_RAMP_IN_RESULT is exceptional */
                if (ma->rampin_col==MA_RAMP_IN_RESULT) {
                        addcol = shi->rgb;
@@ -579,7 +580,8 @@ static void ramp_spec_result(GPUShadeInput *shi, GPUNodeLink **spec)
        GPUNodeLink *fac;
 
        if (!(mat->scene->gm.flag & GAME_GLSL_NO_RAMPS) &&
-          ma->ramp_spec && ma->rampin_spec==MA_RAMP_IN_RESULT) {
+           ma->ramp_spec && ma->rampin_spec==MA_RAMP_IN_RESULT)
+       {
                GPU_link(mat, "ramp_rgbtobw", *spec, &fac);
                
                /* colorband + blend */
@@ -775,7 +777,8 @@ static void shade_one_light(GPUShadeInput *shi, GPUShadeResult *shr, GPULamp *la
 
        if (mat->scene->gm.flag & GAME_GLSL_NO_SHADERS);
        else if (!(lamp->mode & LA_NO_SPEC) && !(lamp->mode & LA_ONLYSHADOW) &&
-          (GPU_link_changed(shi->spec) || ma->spec != 0.0f)) {
+                (GPU_link_changed(shi->spec) || ma->spec != 0.0f))
+       {
                if (lamp->type == LA_HEMI) {
                        GPU_link(mat, "shade_hemi_spec", vn, lv, view, GPU_uniform(&ma->spec), shi->har, visifac, &t);
                        GPU_link(mat, "shade_add_spec", t, lcol, shi->specrgb, &outcol);
index a085653..b702e59 100644 (file)
@@ -603,14 +603,14 @@ static int startffmpeg(struct anim *anim)
 #ifdef FFMPEG_SWSCALE_COLOR_SPACE_SUPPORT
        /* Try do detect if input has 0-255 YCbCR range (JFIF Jpeg MotionJpeg) */
        if (!sws_getColorspaceDetails(anim->img_convert_ctx, (int **)&inv_table, &srcRange,
-                                     &table, &dstRange, &brightness, &contrast, &saturation)) {
-
+                                     &table, &dstRange, &brightness, &contrast, &saturation))
+       {
                srcRange = srcRange || anim->pCodecCtx->color_range == AVCOL_RANGE_JPEG;
                inv_table = sws_getCoefficients(anim->pCodecCtx->colorspace);
 
                if (sws_setColorspaceDetails(anim->img_convert_ctx, (int *)inv_table, srcRange,
-                                            table, dstRange, brightness, contrast, saturation)) {
-
+                                            table, dstRange, brightness, contrast, saturation))
+               {
                        printf("Warning: Could not set libswscale colorspace details.\n");
                }
        }
@@ -940,7 +940,8 @@ static ImBuf *ffmpeg_fetchibuf(struct anim *anim, int position,
               (long long int)pts_to_search, pts_time_base, frame_rate, st_time);
 
        if (anim->last_frame && 
-           anim->last_pts <= pts_to_search && anim->next_pts > pts_to_search) {
+           anim->last_pts <= pts_to_search && anim->next_pts > pts_to_search)
+       {
                av_log(anim->pFormatCtx, AV_LOG_DEBUG, 
                       "FETCH: frame repeat: last: %lld next: %lld\n",
                       (long long int)anim->last_pts, 
index 3966135..438988f 100644 (file)
@@ -1507,7 +1507,7 @@ void DirectDrawSurface::printInfo() const
                printf("\tMisc flag: %u\n", header.header10.miscFlag);
                printf("\tArray size: %u\n", header.header10.arraySize);
        }
-       
+
     if (header.reserved[9] == FOURCC_NVTT)
        {
                int major = (header.reserved[10] >> 16) & 0xFF;
index 30142e5..a043469 100644 (file)
@@ -339,8 +339,9 @@ static int check_pixel_assigned(const void *buffer, const char *mask, const int
                if (mask != NULL) {
                        res = mask[index] != 0 ? 1 : 0;
                }
-               else if ( (is_float && ((const float *) buffer)[alpha_index] != 0.0f) ||
-                         (!is_float && ((const unsigned char *) buffer)[alpha_index] != 0) ) {
+               else if ((is_float  && ((const float *) buffer)[alpha_index] != 0.0f) ||
+                        (!is_float && ((const unsigned char *) buffer)[alpha_index] != 0) )
+               {
                        res = 1;
                }
        }
index 460ca93..0090577 100644 (file)
@@ -269,7 +269,8 @@ static void fill_gap(indexer_dv_context *This, int isPAL)
        }
 
        while (This->gap_start != This->ref_time_read ||
-              This->gap_frame != This->curr_frame) {
+              This->gap_frame != This->curr_frame)
+       {
                inc_frame(&This->gap_frame, &This->gap_start, isPAL);
                This->frameno_offset++;
        }
@@ -320,7 +321,7 @@ static void proc_frame(indexer_dv_context *This,
                                This->gap_frame = -1;
                        }
                }
-               else if (This->ref_time_read_new  == This->ref_time_read) {
+               else if (This->ref_time_read_new == This->ref_time_read) {
                        // do nothing
                }
                else {
index 2178b6a..556ec64 100644 (file)
@@ -819,7 +819,8 @@ int imb_savetiff(ImBuf *ibuf, const char *name, int flags)
        TIFFSetField(image, TIFFTAG_RESOLUTIONUNIT,  RESUNIT_INCH);
        if (TIFFWriteEncodedStrip(image, 0,
                                  (bitspersample == 16) ? (unsigned char *)pixels16 : pixels,
-                                 ibuf->x * ibuf->y * samplesperpixel * bitspersample / 8) == -1) {
+                                 ibuf->x * ibuf->y * samplesperpixel * bitspersample / 8) == -1)
+       {
                fprintf(stderr,
                        "imb_savetiff: Could not write encoded TIFF.\n");
                TIFFClose(image);
index 4820347..a86e2be 100644 (file)
@@ -188,9 +188,9 @@ static int IMB_ispic_name(const char *name)
 int IMB_ispic(const char *filename)
 {
        if (U.uiflag & USER_FILTERFILEEXTS) {
-               if (    (BLI_testextensie_array(filename, imb_ext_image)) ||
-                       (G.have_quicktime && BLI_testextensie_array(filename, imb_ext_image_qt))
-                       ) {
+               if ((BLI_testextensie_array(filename, imb_ext_image)) ||
+                   (G.have_quicktime && BLI_testextensie_array(filename, imb_ext_image_qt)))
+               {
                        return IMB_ispic_name(filename);
                }
                else {
index 80c80d0..231dd52 100644 (file)
@@ -952,7 +952,7 @@ static void reconstruct_struct(SDNA *newsdna, SDNA *oldsdna,
                elen = elementsize(newsdna, spc[0], spc[1]);
 
                /* test: is type a struct? */
-               if (spc[0] >= firststructtypenr  &&  !ispointer(name)) {
+               if (spc[0] >= firststructtypenr && !ispointer(name)) {
                
                        /* where does the old struct data start (and is there an old one?) */
                        cpo = find_elem(oldsdna, type, name, spo, data, &sppo);
@@ -1020,7 +1020,7 @@ void DNA_struct_switch_endian(SDNA *oldsdna, int oldSDNAnr, char *data)
                elen = elementsize(oldsdna, spc[0], spc[1]);
 
                /* test: is type a struct? */
-               if (spc[0] >= firststructtypenr  &&  !ispointer(name)) {
+               if (spc[0] >= firststructtypenr && !ispointer(name)) {
                        /* where does the old data start (is there one?) */
                        cpo = find_elem(oldsdna, type, name, spo, data, NULL);
                        if (cpo) {
index d148182..fa6b555 100644 (file)
@@ -420,7 +420,8 @@ static const char *rna_parameter_type_name(PropertyRNA *parm)
                return type;
 
        switch (parm->type) {
-               case PROP_POINTER:  {
+               case PROP_POINTER:
+               {
                        PointerPropertyRNA *pparm = (PointerPropertyRNA *)parm;
 
                        if (parm->flag & PROP_RNAPTR)
@@ -428,7 +429,8 @@ static const char *rna_parameter_type_name(PropertyRNA *parm)
                        else
                                return rna_find_dna_type((const char *)pparm->type);
                }
-               case PROP_COLLECTION: {
+               case PROP_COLLECTION:
+               {
                        return "ListBase";
                }
                default:
index 70f6afd..7676f4a 100644 (file)
@@ -4793,7 +4793,8 @@ char *RNA_property_as_string(bContext *C, PointerRNA *ptr, PropertyRNA *prop)
                        BLI_dynstr_append(dynstr, "[");
 
                        for (RNA_property_collection_begin(ptr, prop, &collect_iter); collect_iter.valid;
-                            RNA_property_collection_next(&collect_iter)) {
+                            RNA_property_collection_next(&collect_iter))
+                       {
                                PointerRNA itemptr = collect_iter.ptr;
 
                                if (first_time == 0)
index a38c769..4bfcabc 100644 (file)
@@ -243,7 +243,8 @@ static EnumPropertyItem *rna_DynamicPaint_surface_type_itemf(bContext *C, Pointe
 
        /* Displace */
        if (surface->format == MOD_DPAINT_SURFACE_F_VERTEX ||
-           surface->format == MOD_DPAINT_SURFACE_F_IMAGESEQ) {
+           surface->format == MOD_DPAINT_SURFACE_F_IMAGESEQ)
+       {
                tmp.value = MOD_DPAINT_SURFACE_T_DISPLACE;
                tmp.identifier = "DISPLACE";
                tmp.name = "Displace";
index 4d7ecc9..a3e538d 100644 (file)
@@ -411,7 +411,8 @@ void rna_Object_ray_cast(Object *ob, ReportList *reports, float ray_start[3], fl
                hit.index = -1;
                
                if (BLI_bvhtree_ray_cast(treeData.tree, ray_start, ray_nor, 0.0f, &hit,
-                                        treeData.raycast_callback, &treeData) != -1) {
+                                        treeData.raycast_callback, &treeData) != -1)
+               {
                        if (hit.dist <= dist) {
                                copy_v3_v3(r_location, hit.co);
                                copy_v3_v3(r_normal, hit.no);
index f907e2f..c6c97fa 100644 (file)
@@ -2326,7 +2326,7 @@ static void rna_def_scene_game_data(BlenderRNA *brna)
        StructRNA *srna;
        PropertyRNA *prop;
 
-       static EnumPropertyItem aasamples_items[]  = {
+       static EnumPropertyItem aasamples_items[] = {
                {0, "SAMPLES_0", 0, "Off", ""},
                {2, "SAMPLES_2", 0, "2x", ""},
                {4, "SAMPLES_4", 0, "4x", ""},
index eaddcc9..e88eee5 100644 (file)
@@ -2792,7 +2792,7 @@ static void rna_def_userdef_system(BlenderRNA *brna)
                {0, NULL, 0, NULL, NULL}
        };
 
-       static EnumPropertyItem anisotropic_items[]  = {
+       static EnumPropertyItem anisotropic_items[] = {
                {1, "FILTER_0", 0, "Off", ""},
                {2, "FILTER_2", 0, "2x", ""},
                {4, "FILTER_4", 0, "4x", ""},
index 159da9a..7d7bfad 100644 (file)
@@ -78,12 +78,14 @@ static CustomDataMask requiredDataMask(Object *UNUSED(ob), ModifierData *md)
                for (; surface; surface = surface->next) {
                        /* tface */
                        if (surface->format == MOD_DPAINT_SURFACE_F_IMAGESEQ || 
-                           surface->init_color_type == MOD_DPAINT_INITIAL_TEXTURE) {
+                           surface->init_color_type == MOD_DPAINT_INITIAL_TEXTURE)
+                       {
                                dataMask |= (1 << CD_MTFACE);
                        }
                        /* mcol */
                        if (surface->type == MOD_DPAINT_SURFACE_T_PAINT ||
-                           surface->init_color_type == MOD_DPAINT_INITIAL_VERTEXCOLOR) {
+                           surface->init_color_type == MOD_DPAINT_INITIAL_VERTEXCOLOR)
+                       {
                                dataMask |= (1 << CD_MCOL);
                        }
                        /* CD_MDEFORMVERT */
index 942e0fc..1c0040a 100644 (file)
@@ -3184,7 +3184,7 @@ void *BPy_BMElem_PySeq_As_Array(BMesh **r_bm, PyObject *seq, Py_ssize_t min, Py_
                        }
                        /* trick so we can ensure all items have the same mesh,
                         * and allows us to pass the 'bm' as NULL. */
-                       else if (do_bm_check && (bm  && bm != item->bm)) {
+                       else if (do_bm_check && (bm && bm != item->bm)) {
                                PyErr_Format(PyExc_ValueError,
                                             "%s: %d %s is from another mesh",
                                             error_prefix, i, BPy_BMElem_StringFromHType(htype));
index 9fd120b..15eeb59 100644 (file)
@@ -277,7 +277,7 @@ static PyObject *BPy_IDGroup_Map_GetItem(BPy_IDProperty *self, PyObject *item)
        IDProperty *idprop;
        const char *name;
 
-       if (self->prop->type  != IDP_GROUP) {
+       if (self->prop->type != IDP_GROUP) {
                PyErr_SetString(PyExc_TypeError, "unsubscriptable object");
                return NULL;
        }
@@ -483,7 +483,7 @@ const char *BPy_IDProperty_Map_ValidateAndCreate(PyObject *name_obj, IDProperty
 
 int BPy_Wrap_SetMapItem(IDProperty *prop, PyObject *key, PyObject *val)
 {
-       if (prop->type  != IDP_GROUP) {
+       if (prop->type != IDP_GROUP) {
                PyErr_SetString(PyExc_TypeError, "unsubscriptable object");
                return -1;
        }
index a5350b9..1d02acb 100644 (file)
@@ -291,7 +291,8 @@ static void bpy_lib_exit_warn_idname(BPy_Library *self, const char *name_plural,
        PyErr_Fetch(&exc, &val, &tb);
        if (PyErr_WarnFormat(PyExc_UserWarning, 1,
                             "load: '%s' does not contain %s[\"%s\"]",
-                            self->abspath, name_plural, idname)) {
+                            self->abspath, name_plural, idname))
+       {
                /* Spurious errors can appear at shutdown */
                if (PyErr_ExceptionMatches(PyExc_Warning)) {
                        PyErr_WriteUnraisable((PyObject *)self);
@@ -306,7 +307,8 @@ static void bpy_lib_exit_warn_type(BPy_Library *self, PyObject *item)
        PyErr_Fetch(&exc, &val, &tb);
        if (PyErr_WarnFormat(PyExc_UserWarning, 1,
                             "load: '%s' expected a string type, not a %.200s",
-                            self->abspath, Py_TYPE(item)->tp_name)) {
+                            self->abspath, Py_TYPE(item)->tp_name))
+       {
                /* Spurious errors can appear at shutdown */
                if (PyErr_ExceptionMatches(PyExc_Warning)) {
                        PyErr_WriteUnraisable((PyObject *)self);
index 8f5a9fe..1056227 100644 (file)
@@ -389,7 +389,7 @@ static PyObject *pyop_getrna(PyObject *UNUSED(self), PyObject *value)
                return NULL;
        }
        ot = WM_operatortype_find(opname, TRUE);
-       if (ot  == NULL) {
+       if (ot == NULL) {
                PyErr_Format(PyExc_KeyError, "_bpy.ops.get_rna(\"%s\") not found", opname);
                return NULL;
        }
index d1da466..5ac1214 100644 (file)
@@ -196,7 +196,8 @@ static PyObject *Quaternion_cross(QuaternionObject *self, PyObject *value)
                return NULL;
 
        if (mathutils_array_parse(tquat, QUAT_SIZE, QUAT_SIZE, value,
-                                 "Quaternion.cross(other), invalid 'other' arg") == -1) {
+                                 "Quaternion.cross(other), invalid 'other' arg") == -1)
+       {
                return NULL;
        }
 
index a071c0b..ab1192b 100644 (file)
@@ -707,8 +707,8 @@ void quicktime_verify_image_type(RenderData *rd, ImageFormatData *imf)
        if (imf->imtype == R_IMF_IMTYPE_QUICKTIME) {
                if ((rd->qtcodecsettings.codecType == 0) ||
                    (rd->qtcodecsettings.codecSpatialQuality < 0) ||
-                   (rd->qtcodecsettings.codecSpatialQuality > 100)) {
-                       
+                   (rd->qtcodecsettings.codecSpatialQuality > 100))
+               {
                        rd->qtcodecsettings.codecType = kJPEGCodecType;
                        rd->qtcodecsettings.codec = (int)anyCodec;
                        rd->qtcodecsettings.codecSpatialQuality = (codecHighQuality * 100) / codecLosslessQuality;
index 7549207..170d2ef 100644 (file)
@@ -450,7 +450,8 @@ void RE_InitState(Render *re, Render *source, RenderData *rd, SceneRenderLayer *
        }
        
        if (re->rectx < 2 || re->recty < 2 || (BKE_imtype_is_movie(rd->im_format.imtype) &&
-                                                                                 (re->rectx < 16 || re->recty < 16) )) {
+                                              (re->rectx < 16 || re->recty < 16) ))
+       {
                BKE_report(re->reports, RPT_ERROR, "Image too small");
                re->ok= 0;
                return;
@@ -1833,7 +1834,8 @@ int RE_is_rendering_allowed(Scene *scene, Object *camera_override, ReportList *r
        
        if (scene->r.mode & R_BORDER) {
                if (scene->r.border.xmax <= scene->r.border.xmin ||
-                  scene->r.border.ymax <= scene->r.border.ymin) {
+                   scene->r.border.ymax <= scene->r.border.ymin)
+               {
                        BKE_report(reports, RPT_ERROR, "No border area selected.");
                        return 0;
                }
@@ -2376,7 +2378,7 @@ void RE_layer_load_from_file(RenderLayer *layer, ReportList *reports, const char
 {
        ImBuf *ibuf = IMB_loadiffname(filename, IB_rect);
 
-       if (ibuf  && (ibuf->rect || ibuf->rect_float)) {
+       if (ibuf && (ibuf->rect || ibuf->rect_float)) {
                if (ibuf->x == layer->rectx && ibuf->y == layer->recty) {
                        if (ibuf->rect_float==NULL)
                                IMB_float_from_rect(ibuf);
index 556ca6b..ad147d6 100644 (file)
@@ -1539,7 +1539,8 @@ static int wm_handler_fileselect_call(bContext *C, ListBase *handlers, wmEventHa
                                /* a bit weak, might become arg for WM_event_fileselect? */
                                /* XXX also extension code in image-save doesnt work for this yet */
                                if (RNA_struct_find_property(handler->op->ptr, "check_existing") &&
-                                   RNA_boolean_get(handler->op->ptr, "check_existing")) {
+                                   RNA_boolean_get(handler->op->ptr, "check_existing"))
+                               {
                                        char *path = RNA_string_get_alloc(handler->op->ptr, "filepath", NULL, 0);
                                        /* this gives ownership to pupmenu */
                                        uiPupMenuSaveOver(C, handler->op, (path) ? path : "");
@@ -2612,7 +2613,8 @@ static wmWindow *wm_event_cursor_other_windows(wmWindowManager *wm, wmWindow *wi
                        
                        if (owin != win) {
                                if (mx - owin->posx >= 0 && my - owin->posy >= 0 &&
-                                   mx - owin->posx <= owin->sizex && my - owin->posy <= owin->sizey) {
+                                   mx - owin->posx <= owin->sizex && my - owin->posy <= owin->sizey)
+                               {
                                        evt->x = mx - (int)owin->posx;
                                        evt->y = my - (int)owin->posy;
                                        
index 22d1cbe..18caa8c 100644 (file)
@@ -785,8 +785,8 @@ char *WM_keymap_item_to_string(wmKeyMapItem *kmi, char *str, int len)
        if (kmi->shift == KM_ANY &&
            kmi->ctrl == KM_ANY &&
            kmi->alt == KM_ANY &&
-           kmi->oskey == KM_ANY) {
-
+           kmi->oskey == KM_ANY)
+       {
                strcat(buf, "Any ");
        }
        else {
index b613aab..d7cfe6c 100644 (file)
@@ -3216,7 +3216,8 @@ static int radial_control_get_path(PointerRNA *ctx_ptr, wmOperator *op,
                PropertyType prop_type = RNA_property_type(*r_prop);
 
                if (((flags & RC_PROP_REQUIRE_BOOL) && (prop_type != PROP_BOOLEAN)) ||
-                   ((flags & RC_PROP_REQUIRE_FLOAT) && prop_type != PROP_FLOAT)) {
+                   ((flags & RC_PROP_REQUIRE_FLOAT) && prop_type != PROP_FLOAT))
+               {
                        MEM_freeN(str);
                        BKE_reportf(op->reports, RPT_ERROR,
                                    "Property from path %s is not a float", name);
index f732edc..aa243ed 100644 (file)
@@ -161,7 +161,7 @@ int multitex_nodes(struct Tex *tex, float *texvec, float *dxt, float *dyt, int o
 struct Material *RE_init_sample_material(struct Material *orig_mat, struct Scene *scene) {return (struct Material *)NULL;}
 void RE_free_sample_material(struct Material *mat) {}
 void RE_sample_material_color(struct Material *mat, float color[3], float *alpha, const float volume_co[3], const float surface_co[3],
-                                                  int face_index, short hit_quad, struct DerivedMesh *orcoDm, struct Object *ob) {}
+                              int face_index, short hit_quad, struct DerivedMesh *orcoDm, struct Object *ob) {}
 
 /* nodes */
 struct RenderResult *RE_GetResult(struct Render *re){return (struct RenderResult *) NULL;}
@@ -507,13 +507,13 @@ void BPY_context_update(struct bContext *C){};
 /* intern/dualcon */
 struct DualConMesh;
 struct DualConMesh *dualcon(const struct DualConMesh *input_mesh,
-                           void *create_mesh,
-                           int flags,
-                           int mode,
-                           float threshold,
-                           float hermite_num,
-                           float scale,
-                           int depth) {return 0;}
+                            void *create_mesh,
+                            int flags,
+                            int mode,
+                            float threshold,
+                            float hermite_num,
+                            float scale,
+                            int depth) {return 0;}
 
 /* intern/cycles */
 struct CCLDeviceInfo;
index 682ff57..c9371b9 100644 (file)
@@ -54,7 +54,8 @@ bool BL_MeshDeformer::Apply(RAS_IPolyMaterial*)
 
        // only apply once per frame if the mesh is actually modified
        if (m_pMeshObject->MeshModified() &&
-          m_lastDeformUpdate != m_gameobj->GetLastFrame()) {
+           m_lastDeformUpdate != m_gameobj->GetLastFrame())
+       {
                // For each material
                for (list<RAS_MeshMaterial>::iterator mit= m_pMeshObject->GetFirstMaterial();
                        mit != m_pMeshObject->GetLastMaterial(); ++ mit) {
index 1b15547..656c429 100644 (file)
@@ -65,8 +65,8 @@ public:
        void    UnlinkAllActuators();
        void    UnlinkActuator(class SCA_IActuator* actua);
        void    UnlinkSensor(class SCA_ISensor* sensor);
-       void    SetState(unsigned int state) { m_statemask = state; }
-       void    ApplyState(unsigned int state);
+       void    SetState(unsigned int state) { m_statemask = state; }
+       void    ApplyState(unsigned int state);
        void    Deactivate()
        {
                // the controller can only be part of a sensor m_newControllers list
index 4728729..76b9a8d 100644 (file)
@@ -101,8 +101,9 @@ bool SCA_ISensor::IsPositiveTrigger()
 }
 
 void SCA_ISensor::SetPulseMode(bool posmode, 
-                                                          bool negmode,
-                                                          int freq) {
+                               bool negmode,
+                               int freq)
+{
        m_pos_pulsemode = posmode;
        m_neg_pulsemode = negmode;
        m_pulse_frequency = freq;
index a356b20..92ba610 100644 (file)
@@ -50,8 +50,10 @@ public:
        virtual void NextFrame();
 
        bool Connect(char *address, unsigned int port, char *password,
-                    unsigned int localport, unsigned int timeout) {
-               return true;}
+                    unsigned int localport, unsigned int timeout)
+       {
+               return true;
+       }
        bool Disconnect(void) {return true;}
 
        virtual void SendNetworkMessage(class NG_NetworkMessage* msg);
index d6c9ddd..828ee01 100644 (file)
@@ -99,11 +99,11 @@ public:
 
        /**
         */
-       enum    {        
-                       RAS_RENDER_3DPOLYGON_TEXT = 64, /* GEMAT_TEXT */
-                       KX_BACKCULL = 16,               /* GEMAT_BACKCULL */
-                       KX_TEX = 4096,                  /* GEMAT_TEX */
-                       KX_LINES = 32768         
+       enum {
+               RAS_RENDER_3DPOLYGON_TEXT = 64, /* GEMAT_TEXT */
+               KX_BACKCULL = 16,               /* GEMAT_BACKCULL */
+               KX_TEX = 4096,                  /* GEMAT_TEX */
+               KX_LINES = 32768
        };
 
        /**
index b5b38fd..e026419 100644 (file)
@@ -112,8 +112,8 @@ SG_Spatial::
 UpdateSpatialData(
                const SG_Spatial *parent,
                double time,
-               bool& parentUpdated
-               ) {
+               bool& parentUpdated)
+{
        bool bComputesWorldTransform = false;
 
        // update spatial controllers