style cleanup, brackets in else/if, some indentation.
authorCampbell Barton <ideasman42@gmail.com>
Tue, 6 Mar 2012 18:40:15 +0000 (18:40 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Tue, 6 Mar 2012 18:40:15 +0000 (18:40 +0000)
116 files changed:
source/blender/blenkernel/intern/DerivedMesh.c
source/blender/blenkernel/intern/boids.c
source/blender/blenkernel/intern/cloth.c
source/blender/blenkernel/intern/collision.c
source/blender/blenkernel/intern/effect.c
source/blender/blenkernel/intern/fcurve.c
source/blender/blenkernel/intern/font.c
source/blender/blenkernel/intern/icons.c
source/blender/blenkernel/intern/image_gen.c
source/blender/blenkernel/intern/navmesh_conversion.c
source/blender/blenkernel/intern/nla.c
source/blender/blenkernel/intern/ocean.c
source/blender/blenkernel/intern/particle.c
source/blender/blenkernel/intern/shrinkwrap.c
source/blender/blenkernel/intern/smoke.c
source/blender/blenkernel/intern/sound.c
source/blender/blenkernel/intern/unit.c
source/blender/blenkernel/intern/writeffmpeg.c
source/blender/blenlib/intern/BLI_args.c
source/blender/blenlib/intern/BLI_memarena.c
source/blender/blenlib/intern/freetypefont.c
source/blender/blenlib/intern/listbase.c
source/blender/blenlib/intern/math_geom.c
source/blender/blenlib/intern/path_util.c
source/blender/blenlib/intern/threads.c
source/blender/blenloader/intern/readfile.c
source/blender/bmesh/operators/bmo_bevel.c
source/blender/editors/animation/anim_channels_defines.c
source/blender/editors/animation/anim_channels_edit.c
source/blender/editors/animation/anim_draw.c
source/blender/editors/animation/anim_filter.c
source/blender/editors/animation/anim_markers.c
source/blender/editors/animation/keyframing.c
source/blender/editors/armature/editarmature.c
source/blender/editors/armature/editarmature_retarget.c
source/blender/editors/gpencil/drawgpencil.c
source/blender/editors/gpencil/gpencil_paint.c
source/blender/editors/interface/interface_draw.c
source/blender/editors/interface/interface_handlers.c
source/blender/editors/interface/interface_icons.c
source/blender/editors/interface/interface_templates.c
source/blender/editors/mesh/loopcut.c
source/blender/editors/object/object_constraint.c
source/blender/editors/object/object_relations.c
source/blender/editors/physics/particle_edit.c
source/blender/editors/physics/physics_fluid.c
source/blender/editors/screen/screen_ops.c
source/blender/editors/sculpt_paint/sculpt.c
source/blender/editors/sculpt_paint/sculpt_uv.c
source/blender/editors/sound/sound_ops.c
source/blender/editors/space_file/file_ops.c
source/blender/editors/space_file/fsmenu.c
source/blender/editors/space_file/space_file.c
source/blender/editors/space_graph/graph_draw.c
source/blender/editors/space_graph/graph_select.c
source/blender/editors/space_logic/logic_window.c
source/blender/editors/space_nla/nla_draw.c
source/blender/editors/space_nla/nla_edit.c
source/blender/editors/space_node/node_edit.c
source/blender/editors/space_sequencer/sequencer_draw.c
source/blender/editors/space_text/text_ops.c
source/blender/editors/space_text/text_python.c
source/blender/editors/space_view3d/drawobject.c
source/blender/editors/space_view3d/drawvolume.c
source/blender/editors/transform/transform.c
source/blender/editors/transform/transform_constraints.c
source/blender/editors/transform/transform_conversions.c
source/blender/editors/transform/transform_generics.c
source/blender/editors/transform/transform_input.c
source/blender/editors/transform/transform_manipulator.c
source/blender/editors/transform/transform_orientations.c
source/blender/editors/transform/transform_snap.c
source/blender/editors/util/numinput.c
source/blender/editors/uvedit/uvedit_smart_stitch.c
source/blender/gpu/intern/gpu_codegen.c
source/blender/gpu/intern/gpu_draw.c
source/blender/imbuf/intern/cineon/cineonlib.c
source/blender/imbuf/intern/jp2.c
source/blender/imbuf/intern/jpeg.c
source/blender/imbuf/intern/radiance_hdr.c
source/blender/imbuf/intern/util.c
source/blender/makesdna/intern/makesdna.c
source/blender/makesrna/intern/rna_actuator.c
source/blender/makesrna/intern/rna_controller.c
source/blender/makesrna/intern/rna_modifier.c
source/blender/makesrna/intern/rna_object.c
source/blender/makesrna/intern/rna_scene.c
source/blender/makesrna/intern/rna_space.c
source/blender/modifiers/intern/MOD_boolean_util.c
source/blender/modifiers/intern/MOD_cloth.c
source/blender/modifiers/intern/MOD_collision.c
source/blender/modifiers/intern/MOD_displace.c
source/blender/modifiers/intern/MOD_dynamicpaint.c
source/blender/modifiers/intern/MOD_explode.c
source/blender/modifiers/intern/MOD_fluidsim.c
source/blender/modifiers/intern/MOD_fluidsim_util.c
source/blender/modifiers/intern/MOD_mask.c
source/blender/modifiers/intern/MOD_simpledeform.c
source/blender/modifiers/intern/MOD_smoke.c
source/blender/modifiers/intern/MOD_surface.c
source/blender/nodes/composite/nodes/node_composite_brightness.c
source/blender/nodes/texture/node_texture_util.c
source/blender/python/intern/bpy_operator.c
source/blender/render/intern/source/convertblender.c
source/blender/render/intern/source/pipeline.c
source/blender/render/intern/source/rayshade.c
source/blender/render/intern/source/render_result.c
source/blender/render/intern/source/render_texture.c
source/blender/render/intern/source/renderdatabase.c
source/blender/render/intern/source/shadeinput.c
source/blender/render/intern/source/volume_precache.c
source/blender/render/intern/source/voxeldata.c
source/blender/windowmanager/intern/wm_draw.c
source/blender/windowmanager/intern/wm_event_system.c
source/blender/windowmanager/intern/wm_init_exit.c
source/creator/creator.c

index 0d12785..bc9794d 100644 (file)
@@ -2460,14 +2460,12 @@ void DM_calc_auto_bump_scale(DerivedMesh *dm)
        MFace * mface = dm->getTessFaceArray(dm);
        MTFace * mtface = dm->getTessFaceDataArray(dm, CD_MTFACE);
 
        MFace * mface = dm->getTessFaceArray(dm);
        MTFace * mtface = dm->getTessFaceDataArray(dm, CD_MTFACE);
 
-       if(mtface)
-       {
+       if(mtface) {
                double dsum = 0.0;
                int nr_accumulated = 0;
                int f;
 
                double dsum = 0.0;
                int nr_accumulated = 0;
                int f;
 
-               for ( f=0; f<totface; f++ )
-               {
+               for ( f=0; f < totface; f++ ) {
                        {
                                float * verts[4], * tex_coords[4];
                                const int nr_verts = mface[f].v4!=0 ? 4 : 3;
                        {
                                float * verts[4], * tex_coords[4];
                                const int nr_verts = mface[f].v4!=0 ? 4 : 3;
@@ -2490,32 +2488,33 @@ void DM_calc_auto_bump_scale(DerivedMesh *dm)
                                }
 
                                // verify last vertex as well if this is a quad
                                }
 
                                // verify last vertex as well if this is a quad
-                               if ( is_degenerate==0 && nr_verts==4 )
-                               {
-                                       if(     equals_v3v3(verts[3], verts[0]) || equals_v3v3(verts[3], verts[1]) || equals_v3v3(verts[3], verts[2]) ||
-                                               equals_v2v2(tex_coords[3], tex_coords[0]) || equals_v2v2(tex_coords[3], tex_coords[1]) || equals_v2v2(tex_coords[3], tex_coords[2]) )
+                               if (is_degenerate == 0 && nr_verts == 4) {
+                                       if (equals_v3v3(verts[3], verts[0]) || equals_v3v3(verts[3], verts[1]) || equals_v3v3(verts[3], verts[2]) ||
+                                           equals_v2v2(tex_coords[3], tex_coords[0]) || equals_v2v2(tex_coords[3], tex_coords[1]) || equals_v2v2(tex_coords[3], tex_coords[2]) )
                                        {
                                                is_degenerate = 1;
                                        }
 
                                        // verify the winding is consistent
                                        {
                                                is_degenerate = 1;
                                        }
 
                                        // verify the winding is consistent
-                                       if ( is_degenerate==0 )
-                                       {
+                                       if (is_degenerate == 0) {
                                                float prev_edge[2];
                                                int is_signed = 0;
                                                sub_v2_v2v2(prev_edge, tex_coords[0], tex_coords[3]);
 
                                                i = 0;
                                                float prev_edge[2];
                                                int is_signed = 0;
                                                sub_v2_v2v2(prev_edge, tex_coords[0], tex_coords[3]);
 
                                                i = 0;
-                                               while ( is_degenerate==0 && i<4 )
-                                               {
+                                               while (is_degenerate == 0 && i < 4) {
                                                        float cur_edge[2], signed_area;
                                                        sub_v2_v2v2(cur_edge, tex_coords[(i+1)&0x3], tex_coords[i]);
                                                        signed_area = prev_edge[0]*cur_edge[1] - prev_edge[1]*cur_edge[0];
                                                        float cur_edge[2], signed_area;
                                                        sub_v2_v2v2(cur_edge, tex_coords[(i+1)&0x3], tex_coords[i]);
                                                        signed_area = prev_edge[0]*cur_edge[1] - prev_edge[1]*cur_edge[0];
-                                                       if ( i==0 ) is_signed = signed_area<0.0f ? 1 : 0;
-                                                       else if((is_signed!=0)!=(signed_area<0.0f)) is_degenerate=1;
 
 
-                                                       if ( is_degenerate==0 )
-                                                       {
+                                                       if (i == 0 ) {
+                                                               is_signed = (signed_area < 0.0f) ? 1 : 0;
+                                                       }
+                                                       else if((is_signed != 0) != (signed_area < 0.0f)) {
+                                                               is_degenerate = 1;
+                                                       }
+
+                                                       if (is_degenerate == 0) {
                                                                copy_v2_v2(prev_edge, cur_edge);
                                                                ++i;
                                                        }
                                                                copy_v2_v2(prev_edge, cur_edge);
                                                                ++i;
                                                        }
@@ -2524,13 +2523,11 @@ void DM_calc_auto_bump_scale(DerivedMesh *dm)
                                }
 
                                // proceed if not a degenerate face
                                }
 
                                // proceed if not a degenerate face
-                               if ( is_degenerate==0 )
-                               {
+                               if (is_degenerate == 0) {
                                        int nr_tris_to_pile=0;
                                        // quads split at shortest diagonal
                                        int offs = 0;           // initial triangulation is 0,1,2 and 0, 2, 3
                                        int nr_tris_to_pile=0;
                                        // quads split at shortest diagonal
                                        int offs = 0;           // initial triangulation is 0,1,2 and 0, 2, 3
-                                       if ( nr_verts==4 )
-                                       {
+                                       if (nr_verts == 4) {
                                                float pos_len_diag0, pos_len_diag1;
                                                float vtmp[3];
                                                sub_v3_v3v3(vtmp, verts[2], verts[0]);
                                                float pos_len_diag0, pos_len_diag1;
                                                float vtmp[3];
                                                sub_v3_v3v3(vtmp, verts[2], verts[0]);
@@ -2538,10 +2535,10 @@ void DM_calc_auto_bump_scale(DerivedMesh *dm)
                                                sub_v3_v3v3(vtmp, verts[3], verts[1]);
                                                pos_len_diag1 = dot_v3v3(vtmp, vtmp);
 
                                                sub_v3_v3v3(vtmp, verts[3], verts[1]);
                                                pos_len_diag1 = dot_v3v3(vtmp, vtmp);
 
-                                               if(pos_len_diag1<pos_len_diag0)
+                                               if(pos_len_diag1<pos_len_diag0) {
                                                        offs=1;         // alter split
                                                        offs=1;         // alter split
-                                               else if(pos_len_diag0==pos_len_diag1)           // do UV check instead
-                                               {
+                                               }
+                                               else if(pos_len_diag0==pos_len_diag1) { /* do UV check instead */
                                                        float tex_len_diag0, tex_len_diag1;
 
                                                        sub_v2_v2v2(vtmp, tex_coords[2], tex_coords[0]);
                                                        float tex_len_diag0, tex_len_diag1;
 
                                                        sub_v2_v2v2(vtmp, tex_coords[2], tex_coords[0]);
@@ -2549,15 +2546,13 @@ void DM_calc_auto_bump_scale(DerivedMesh *dm)
                                                        sub_v2_v2v2(vtmp, tex_coords[3], tex_coords[1]);
                                                        tex_len_diag1 = dot_v2v2(vtmp, vtmp);
 
                                                        sub_v2_v2v2(vtmp, tex_coords[3], tex_coords[1]);
                                                        tex_len_diag1 = dot_v2v2(vtmp, vtmp);
 
-                                                       if(tex_len_diag1<tex_len_diag0)
-                                                       {
-                                                               offs=1;         // alter split
+                                                       if (tex_len_diag1<tex_len_diag0) {
+                                                               offs=1; /* alter split */
                                                        }
                                                }
                                        }
                                        nr_tris_to_pile = nr_verts - 2;
                                                        }
                                                }
                                        }
                                        nr_tris_to_pile = nr_verts - 2;
-                                       if ( nr_tris_to_pile==1 || nr_tris_to_pile==2 )
-                                       {
+                                       if (nr_tris_to_pile==1 || nr_tris_to_pile==2) {
                                                const int indices[] = {offs+0, offs+1, offs+2, offs+0, offs+2, (offs+3)&0x3 };
                                                int t;
                                                for ( t=0; t<nr_tris_to_pile; t++ )
                                                const int indices[] = {offs+0, offs+1, offs+2, offs+0, offs+2, (offs+3)&0x3 };
                                                int t;
                                                for ( t=0; t<nr_tris_to_pile; t++ )
@@ -2598,8 +2593,7 @@ void DM_calc_auto_bump_scale(DerivedMesh *dm)
                        dm->auto_bump_scale = use_as_render_bump_scale;
                }
        }
                        dm->auto_bump_scale = use_as_render_bump_scale;
                }
        }
-       else
-       {
+       else {
                dm->auto_bump_scale = 1.0f;
        }
 }
                dm->auto_bump_scale = 1.0f;
        }
 }
index f3f4d7c..8fa0a46 100644 (file)
@@ -250,8 +250,7 @@ static int rule_avoid_collision(BoidRule *rule, BoidBrainData *bbd, BoidValues *
        }
 
        //check boids in own system
        }
 
        //check boids in own system
-       if(acbr->options & BRULE_ACOLL_WITH_BOIDS)
-       {
+       if (acbr->options & BRULE_ACOLL_WITH_BOIDS) {
                neighbors = BLI_kdtree_range_search(bbd->sim->psys->tree, acbr->look_ahead * len_v3(pa->prev_state.vel), pa->prev_state.co, pa->prev_state.ave, &ptn);
                if(neighbors > 1) for(n=1; n<neighbors; n++) {
                        copy_v3_v3(co1, pa->prev_state.co);
                neighbors = BLI_kdtree_range_search(bbd->sim->psys->tree, acbr->look_ahead * len_v3(pa->prev_state.vel), pa->prev_state.co, pa->prev_state.ave, &ptn);
                if(neighbors > 1) for(n=1; n<neighbors; n++) {
                        copy_v3_v3(co1, pa->prev_state.co);
index e2d12c0..e5276d1 100644 (file)
@@ -288,8 +288,7 @@ void bvhtree_update_from_cloth(ClothModifierData *clmd, int moving)
                                
                                ret = BLI_bvhtree_update_node(bvhtree, i, co, co_moving, (mfaces->v4 ? 4 : 3));
                        }
                                
                                ret = BLI_bvhtree_update_node(bvhtree, i, co, co_moving, (mfaces->v4 ? 4 : 3));
                        }
-                       else
-                       {
+                       else {
                                ret = BLI_bvhtree_update_node(bvhtree, i, co, NULL, (mfaces->v4 ? 4 : 3));
                        }
                        
                                ret = BLI_bvhtree_update_node(bvhtree, i, co, NULL, (mfaces->v4 ? 4 : 3));
                        }
                        
@@ -332,8 +331,7 @@ void bvhselftree_update_from_cloth(ClothModifierData *clmd, int moving)
                                
                                ret = BLI_bvhtree_update_node(bvhtree, i, co, co_moving, 1);
                        }
                                
                                ret = BLI_bvhtree_update_node(bvhtree, i, co, co_moving, 1);
                        }
-                       else
-                       {
+                       else {
                                ret = BLI_bvhtree_update_node(bvhtree, i, co, NULL, 1);
                        }
                        
                                ret = BLI_bvhtree_update_node(bvhtree, i, co, NULL, 1);
                        }
                        
@@ -1096,8 +1094,7 @@ static int cloth_build_springs ( ClothModifierData *clmd, DerivedMesh *dm )
                        
                        BLI_linklist_prepend ( &cloth->springs, spring );
                }
                        
                        BLI_linklist_prepend ( &cloth->springs, spring );
                }
-               else
-               {
+               else {
                        cloth_free_errorsprings(cloth, edgehash, edgelist);
                        return 0;
                }
                        cloth_free_errorsprings(cloth, edgehash, edgelist);
                        return 0;
                }
index 5e65d10..ce0de32 100644 (file)
@@ -2543,8 +2543,7 @@ int cloth_bvh_objcollision (Object *ob, ClothModifierData * clmd, float step, fl
                                                        ret = 1;
                                                        ret2 += ret;
                                                }
                                                        ret = 1;
                                                        ret2 += ret;
                                                }
-                                               else
-                                               {
+                                               else {
                                                        // check for approximated time collisions
                                                }
                                        }
                                                        // check for approximated time collisions
                                                }
                                        }
index 21c798c..1124922 100644 (file)
@@ -426,8 +426,7 @@ static float eff_calc_visibility(ListBase *colliders, EffectorCache *eff, Effect
                if(col->ob == eff->ob)
                        continue;
                
                if(col->ob == eff->ob)
                        continue;
                
-               if(collmd->bvhtree)
-               {
+               if (collmd->bvhtree) {
                        BVHTreeRayHit hit;
                        
                        hit.index = -1;
                        BVHTreeRayHit hit;
                        
                        hit.index = -1;
index 3efcd3d..50e3c2c 100644 (file)
@@ -1873,15 +1873,13 @@ static float fcurve_eval_keyframes (FCurve *fcu, BezTriple *bezts, float evaltim
        lastbezt= prevbezt + a;
        
        /* evaluation time at or past endpoints? */
        lastbezt= prevbezt + a;
        
        /* evaluation time at or past endpoints? */
-       if (prevbezt->vec[1][0] >= evaltime) 
-       {
+       if (prevbezt->vec[1][0] >= evaltime) {
                /* before or on first keyframe */
                if ( (fcu->extend == FCURVE_EXTRAPOLATE_LINEAR) && (prevbezt->ipo != BEZT_IPO_CONST) &&
                /* before or on first keyframe */
                if ( (fcu->extend == FCURVE_EXTRAPOLATE_LINEAR) && (prevbezt->ipo != BEZT_IPO_CONST) &&
-                       !(fcu->flag & FCURVE_DISCRETE_VALUES) ) 
+                       !(fcu->flag & FCURVE_DISCRETE_VALUES) )
                {
                        /* linear or bezier interpolation */
                {
                        /* linear or bezier interpolation */
-                       if (prevbezt->ipo==BEZT_IPO_LIN) 
-                       {
+                       if (prevbezt->ipo==BEZT_IPO_LIN) {
                                /* Use the next center point instead of our own handle for
                                 * linear interpolated extrapolate 
                                 */
                                /* Use the next center point instead of our own handle for
                                 * linear interpolated extrapolate 
                                 */
@@ -1981,8 +1979,7 @@ static float fcurve_eval_keyframes (FCurve *fcu, BezTriple *bezts, float evaltim
                        cvalue= lastbezt->vec[1][1];
                }
        }
                        cvalue= lastbezt->vec[1][1];
                }
        }
-       else 
-       {
+       else {
                /* evaltime occurs somewhere in the middle of the curve */
                for (a=0; prevbezt && bezt && (a < fcu->totvert-1); a++, prevbezt=bezt, bezt++) 
                {
                /* evaltime occurs somewhere in the middle of the curve */
                for (a=0; prevbezt && bezt && (a < fcu->totvert-1); a++, prevbezt=bezt, bezt++) 
                {
@@ -1991,8 +1988,7 @@ static float fcurve_eval_keyframes (FCurve *fcu, BezTriple *bezts, float evaltim
                                cvalue= bezt->vec[1][1];
                        }
                        /* evaltime occurs within the interval defined by these two keyframes */
                                cvalue= bezt->vec[1][1];
                        }
                        /* evaltime occurs within the interval defined by these two keyframes */
-                       else if ((prevbezt->vec[1][0] <= evaltime) && (bezt->vec[1][0] >= evaltime))
-                       {
+                       else if ((prevbezt->vec[1][0] <= evaltime) && (bezt->vec[1][0] >= evaltime)) {
                                /* value depends on interpolation mode */
                                if ((prevbezt->ipo == BEZT_IPO_CONST) || (fcu->flag & FCURVE_DISCRETE_VALUES))
                                {
                                /* value depends on interpolation mode */
                                if ((prevbezt->ipo == BEZT_IPO_CONST) || (fcu->flag & FCURVE_DISCRETE_VALUES))
                                {
@@ -2012,8 +2008,7 @@ static float fcurve_eval_keyframes (FCurve *fcu, BezTriple *bezts, float evaltim
                                        else
                                                cvalue= prevbezt->vec[1][1];
                                }
                                        else
                                                cvalue= prevbezt->vec[1][1];
                                }
-                               else 
-                               {
+                               else {
                                        /* bezier interpolation */
                                                /* v1,v2 are the first keyframe and its 2nd handle */
                                        v1[0]= prevbezt->vec[1][0];
                                        /* bezier interpolation */
                                                /* v1,v2 are the first keyframe and its 2nd handle */
                                        v1[0]= prevbezt->vec[1][0];
index ba23b21..4cf4790 100644 (file)
@@ -165,8 +165,7 @@ static VFontData *vfont_get_data(Main *bmain, VFont *vfont)
                                pf= vfont->packedfile;
                                
                                // We need to copy a tmp font to memory unless it is already there
                                pf= vfont->packedfile;
                                
                                // We need to copy a tmp font to memory unless it is already there
-                               if(!tmpfnt)
-                               {
+                               if(!tmpfnt) {
                                        tpf= MEM_callocN(sizeof(*tpf), "PackedFile");
                                        tpf->data= MEM_mallocN(pf->size, "packFile");
                                        tpf->size= pf->size;
                                        tpf= MEM_callocN(sizeof(*tpf), "PackedFile");
                                        tpf->data= MEM_mallocN(pf->size, "packFile");
                                        tpf->size= pf->size;
@@ -178,11 +177,11 @@ static VFontData *vfont_get_data(Main *bmain, VFont *vfont)
                                        tmpfnt->vfont= vfont;
                                        BLI_addtail(&ttfdata, tmpfnt);
                                }
                                        tmpfnt->vfont= vfont;
                                        BLI_addtail(&ttfdata, tmpfnt);
                                }
-                       } else {
+                       }
+                       else {
                                pf= newPackedFile(NULL, vfont->name, ID_BLEND_PATH(bmain, &vfont->id));
                                pf= newPackedFile(NULL, vfont->name, ID_BLEND_PATH(bmain, &vfont->id));
-                               
-                               if(!tmpfnt)
-                               {
+
+                               if (!tmpfnt) {
                                        tpf= newPackedFile(NULL, vfont->name, ID_BLEND_PATH(bmain, &vfont->id));
                                        
                                        // Add temporary packed file to globals
                                        tpf= newPackedFile(NULL, vfont->name, ID_BLEND_PATH(bmain, &vfont->id));
                                        
                                        // Add temporary packed file to globals
@@ -257,8 +256,7 @@ VFont *load_vfont(Main *bmain, const char *name)
                        }
                        
                        // Do not add FO_BUILTIN_NAME to temporary listbase
                        }
                        
                        // Do not add FO_BUILTIN_NAME to temporary listbase
-                       if(strcmp(filename, FO_BUILTIN_NAME))
-                       {
+                       if (strcmp(filename, FO_BUILTIN_NAME)) {
                                tmpfnt= (struct TmpFont *) MEM_callocN(sizeof(struct TmpFont), "temp_font");
                                tmpfnt->pf= tpf;
                                tmpfnt->vfont= vfont;
                                tmpfnt= (struct TmpFont *) MEM_callocN(sizeof(struct TmpFont), "temp_font");
                                tmpfnt->pf= tpf;
                                tmpfnt->vfont= vfont;
index 533dd78..7203895 100644 (file)
@@ -66,8 +66,7 @@ static void icon_free(void *val)
 {
        Icon* icon = val;
 
 {
        Icon* icon = val;
 
-       if (icon)
-       {
+       if (icon) {
                if (icon->drawinfo_free) {              
                        icon->drawinfo_free(icon->drawinfo);
                }
                if (icon->drawinfo_free) {              
                        icon->drawinfo_free(icon->drawinfo);
                }
@@ -236,8 +235,7 @@ void BKE_icon_changed(int id)
 
        icon = BLI_ghash_lookup(gIcons, SET_INT_IN_POINTER(id));
        
 
        icon = BLI_ghash_lookup(gIcons, SET_INT_IN_POINTER(id));
        
-       if (icon)
-       {
+       if (icon) {
                PreviewImage *prv = BKE_previewimg_get((ID*)icon->obj);
 
                /* all previews changed */
                PreviewImage *prv = BKE_previewimg_get((ID*)icon->obj);
 
                /* all previews changed */
@@ -302,8 +300,7 @@ void BKE_icon_set(int icon_id, struct Icon* icon)
 
        old_icon = BLI_ghash_lookup(gIcons, SET_INT_IN_POINTER(icon_id));
 
 
        old_icon = BLI_ghash_lookup(gIcons, SET_INT_IN_POINTER(icon_id));
 
-       if (old_icon)
-       {
+       if (old_icon) {
                printf("BKE_icon_set: Internal error, icon already set: %d\n", icon_id);
                return;
        }
                printf("BKE_icon_set: Internal error, icon already set: %d\n", icon_id);
                return;
        }
index 111350b..d4185af 100644 (file)
@@ -202,12 +202,9 @@ static void checker_board_color_tint(unsigned char *rect, float *rect_float, int
        int x, y;
        float blend_half= blend * 0.5f;
 
        int x, y;
        float blend_half= blend * 0.5f;
 
-       for(y= 0; y < height; y++)
-       {
-               for(x= 0; x < width; x++)
-               {
-                       if( ( (y/size)%2 == 1 && (x/size)%2 == 1 ) || ( (y/size)%2 == 0 && (x/size)%2 == 0 ) )
-                       {
+       for (y= 0; y < height; y++) {
+               for (x= 0; x < width; x++) {
+                       if (((y / size) % 2 == 1 && (x / size) % 2 == 1 ) || ( (y / size) % 2 == 0 && (x / size) % 2 == 0 )) {
                                if (rect) {
                                        rect[0]= (char)BLEND_CHAR(rect[0], blend);
                                        rect[1]= (char)BLEND_CHAR(rect[1], blend);
                                if (rect) {
                                        rect[0]= (char)BLEND_CHAR(rect[0], blend);
                                        rect[1]= (char)BLEND_CHAR(rect[1], blend);
@@ -251,12 +248,9 @@ static void checker_board_color_tint(unsigned char *rect, float *rect_float, int
 static void checker_board_grid_fill(unsigned char *rect, float *rect_float, int width, int height, float blend)
 {
        int x, y;
 static void checker_board_grid_fill(unsigned char *rect, float *rect_float, int width, int height, float blend)
 {
        int x, y;
-       for(y= 0; y < height; y++)
-       {
-               for(x= 0; x < width; x++)
-               {
-                       if( ((y % 32) == 0) || ((x % 32) == 0)  || x == 0 )
-                       {
+       for(y= 0; y < height; y++) {
+               for(x= 0; x < width; x++) {
+                       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);
                                if (rect) {
                                        rect[0]= BLEND_CHAR(rect[0], blend);
                                        rect[1]= BLEND_CHAR(rect[1], blend);
index 4c9c0a3..cdba036 100644 (file)
@@ -248,8 +248,7 @@ int buildPolygonsByDetailedMeshes(const int vertsPerPoly, const int npolys,
                                //move to next edge                                     
                                edge = (edge+1)%3;
                        }
                                //move to next edge                                     
                                edge = (edge+1)%3;
                        }
-                       else
-                       {
+                       else {
                                //move to next tri
                                int twinedge = -1;
                                for (k=0; k<3; k++)
                                //move to next tri
                                int twinedge = -1;
                                for (k=0; k<3; k++)
index 814f071..f67d327 100644 (file)
@@ -352,8 +352,7 @@ NlaStrip *add_nla_soundstrip (Scene *scene, Speaker *speaker)
         * otherwise default to length of 10 frames
         */
 #ifdef WITH_AUDASPACE
         * otherwise default to length of 10 frames
         */
 #ifdef WITH_AUDASPACE
-       if (speaker->sound) 
-       {
+       if (speaker->sound) {
                AUD_SoundInfo info = AUD_getInfo(speaker->sound->playback_handle);
                
                strip->end = (float)ceil((double)info.length * FPS);
                AUD_SoundInfo info = AUD_getInfo(speaker->sound->playback_handle);
                
                strip->end = (float)ceil((double)info.length * FPS);
@@ -1395,8 +1394,7 @@ static void BKE_nlastrip_validate_autoblends (NlaTrack *nlt, NlaStrip *nls)
         *        is directly followed/preceeded by another strip, forming an 
         *        'island' of continuous strips
         */
         *        is directly followed/preceeded by another strip, forming an 
         *        'island' of continuous strips
         */
-       if ( (ps || ns) && ((nls->prev == NULL) || IS_EQF(nls->prev->end, nls->start)==0) )
-       {
+       if ((ps || ns) && ((nls->prev == NULL) || IS_EQF(nls->prev->end, nls->start)==0)) {
                /* start overlaps - pick the largest overlap */
                if ( ((ps && ns) && (*ps > *ns)) || (ps) )
                        nls->blendin= *ps - nls->start;
                /* start overlaps - pick the largest overlap */
                if ( ((ps && ns) && (*ps > *ns)) || (ps) )
                        nls->blendin= *ps - nls->start;
@@ -1406,8 +1404,7 @@ static void BKE_nlastrip_validate_autoblends (NlaTrack *nlt, NlaStrip *nls)
        else /* no overlap allowed/needed */
                nls->blendin= 0.0f;
                
        else /* no overlap allowed/needed */
                nls->blendin= 0.0f;
                
-       if ( (pe || ne) && ((nls->next == NULL) || IS_EQF(nls->next->start, nls->end)==0) )
-       {
+       if ((pe || ne) && ((nls->next == NULL) || IS_EQF(nls->next->start, nls->end)==0)) {
                /* end overlaps - pick the largest overlap */
                if ( ((pe && ne) && (*pe > *ne)) || (pe) )
                        nls->blendout= nls->end - *pe;
                /* end overlaps - pick the largest overlap */
                if ( ((pe && ne) && (*pe > *ne)) || (pe) )
                        nls->blendout= nls->end - *pe;
index dd9444d..87929d6 100644 (file)
@@ -435,8 +435,7 @@ void BKE_ocean_eval_uv_catrom(struct Ocean *oc, struct OceanResult *ocr, float u
                        ocr->disp[0] = INTERP(oc->_disp_x);
                        ocr->disp[2] = INTERP(oc->_disp_z);
                }
                        ocr->disp[0] = INTERP(oc->_disp_x);
                        ocr->disp[2] = INTERP(oc->_disp_z);
                }
-               else
-               {
+               else {
                        ocr->disp[0] = 0.0;
                        ocr->disp[2] = 0.0;
                }
                        ocr->disp[0] = 0.0;
                        ocr->disp[2] = 0.0;
                }
@@ -479,8 +478,7 @@ void BKE_ocean_eval_ij(struct Ocean *oc, struct OceanResult *ocr, int i,int j)
                ocr->disp[0] = oc->_disp_x[i*oc->_N+j];
                ocr->disp[2] = oc->_disp_z[i*oc->_N+j];
        }
                ocr->disp[0] = oc->_disp_x[i*oc->_N+j];
                ocr->disp[2] = oc->_disp_z[i*oc->_N+j];
        }
-       else
-       {
+       else {
                ocr->disp[0] = 0.0f;
                ocr->disp[2] = 0.0f;
        }
                ocr->disp[0] = 0.0f;
                ocr->disp[2] = 0.0f;
        }
index 78df8d2..d86b3c7 100644 (file)
@@ -543,11 +543,9 @@ void psys_free(Object *ob, ParticleSystem * psys)
                }
                
                // check if we are last non-visible particle system
                }
                
                // check if we are last non-visible particle system
-               for(tpsys=ob->particlesystem.first; tpsys; tpsys=tpsys->next) {
-                       if(tpsys->part)
-                       {
-                               if(ELEM(tpsys->part->ren_as,PART_DRAW_OB,PART_DRAW_GR))
-                               {
+               for (tpsys=ob->particlesystem.first; tpsys; tpsys=tpsys->next) {
+                       if (tpsys->part) {
+                               if (ELEM(tpsys->part->ren_as,PART_DRAW_OB,PART_DRAW_GR)) {
                                        nr++;
                                        break;
                                }
                                        nr++;
                                        break;
                                }
@@ -3487,16 +3485,14 @@ void object_remove_particle_system(Scene *scene, Object *ob)
                return;
 
        /* clear all other appearances of this pointer (like on smoke flow modifier) */
                return;
 
        /* clear all other appearances of this pointer (like on smoke flow modifier) */
-       if((md = modifiers_findByType(ob, eModifierType_Smoke)))
-       {
+       if ((md = modifiers_findByType(ob, eModifierType_Smoke))) {
                SmokeModifierData *smd = (SmokeModifierData *)md;
                if((smd->type == MOD_SMOKE_TYPE_FLOW) && smd->flow && smd->flow->psys)
                        if(smd->flow->psys == psys)
                                smd->flow->psys = NULL;
        }
 
                SmokeModifierData *smd = (SmokeModifierData *)md;
                if((smd->type == MOD_SMOKE_TYPE_FLOW) && smd->flow && smd->flow->psys)
                        if(smd->flow->psys == psys)
                                smd->flow->psys = NULL;
        }
 
-       if((md = modifiers_findByType(ob, eModifierType_DynamicPaint)))
-       {
+       if ((md = modifiers_findByType(ob, eModifierType_DynamicPaint))) {
                DynamicPaintModifierData *pmd = (DynamicPaintModifierData *)md;
                if(pmd->brush && pmd->brush->psys)
                        if(pmd->brush->psys == psys)
                DynamicPaintModifierData *pmd = (DynamicPaintModifierData *)md;
                if(pmd->brush && pmd->brush->psys)
                        if(pmd->brush->psys == psys)
index a98834c..6800c21 100644 (file)
@@ -236,8 +236,7 @@ int normal_projection_project_vertex(char options, const float *vert, const floa
 
                hit_tmp.dist *= mat4_to_scale( ((SpaceTransform*)transf)->local2target );
        }
 
                hit_tmp.dist *= mat4_to_scale( ((SpaceTransform*)transf)->local2target );
        }
-       else
-       {
+       else {
                co = vert;
                no = dir;
        }
                co = vert;
                no = dir;
        }
@@ -303,8 +302,7 @@ static void shrinkwrap_calc_normal_projection(ShrinkwrapCalcData *calc)
        {
                if(calc->vert == NULL) return;
        }
        {
                if(calc->vert == NULL) return;
        }
-       else
-       {
+       else {
                //The code supports any axis that is a combination of X,Y,Z
                //although currently UI only allows to set the 3 different axis
                if(calc->smd->projAxis & MOD_SHRINKWRAP_PROJECT_OVER_X_AXIS) proj_axis[0] = 1.0f;
                //The code supports any axis that is a combination of X,Y,Z
                //although currently UI only allows to set the 3 different axis
                if(calc->smd->projAxis & MOD_SHRINKWRAP_PROJECT_OVER_X_AXIS) proj_axis[0] = 1.0f;
@@ -355,8 +353,7 @@ static void shrinkwrap_calc_normal_projection(ShrinkwrapCalcData *calc)
                                        copy_v3_v3(tmp_no, proj_axis);
                                }
                        }
                                        copy_v3_v3(tmp_no, proj_axis);
                                }
                        }
-                       else
-                       {
+                       else {
                                copy_v3_v3(tmp_co, co);
                                copy_v3_v3(tmp_no, proj_axis);
                        }
                                copy_v3_v3(tmp_co, co);
                                copy_v3_v3(tmp_no, proj_axis);
                        }
@@ -439,12 +436,10 @@ static void shrinkwrap_calc_nearest_surface_point(ShrinkwrapCalcData *calc)
                if(weight == 0.0f) continue;
 
                //Convert the vertex to tree coordinates
                if(weight == 0.0f) continue;
 
                //Convert the vertex to tree coordinates
-               if(calc->vert)
-               {
+               if(calc->vert) {
                        copy_v3_v3(tmp_co, calc->vert[i].co);
                }
                        copy_v3_v3(tmp_co, calc->vert[i].co);
                }
-               else
-               {
+               else {
                        copy_v3_v3(tmp_co, co);
                }
                space_transform_apply(&calc->local2target, tmp_co);
                        copy_v3_v3(tmp_co, co);
                }
                space_transform_apply(&calc->local2target, tmp_co);
@@ -469,8 +464,7 @@ static void shrinkwrap_calc_nearest_surface_point(ShrinkwrapCalcData *calc)
                                //Make the vertex stay on the front side of the face
                                madd_v3_v3v3fl(tmp_co, nearest.co, nearest.no, calc->keepDist);
                        }
                                //Make the vertex stay on the front side of the face
                                madd_v3_v3v3fl(tmp_co, nearest.co, nearest.no, calc->keepDist);
                        }
-                       else
-                       {
+                       else {
                                //Adjusting the vertex weight, so that after interpolating it keeps a certain distance from the nearest position
                                float dist = sasqrt( nearest.dist );
                                if(dist > FLT_EPSILON)
                                //Adjusting the vertex weight, so that after interpolating it keeps a certain distance from the nearest position
                                float dist = sasqrt( nearest.dist );
                                if(dist > FLT_EPSILON)
index 8f0fcc0..bffd470 100644 (file)
@@ -211,8 +211,7 @@ static int smokeModifier_init (SmokeModifierData *smd, Object *ob, Scene *scene,
                                smd->domain->res[1] = (int)(size[1] * scale + 0.5);
                                smd->domain->res[2] = (int)(size[2] * scale + 0.5);
                        }
                                smd->domain->res[1] = (int)(size[1] * scale + 0.5);
                                smd->domain->res[2] = (int)(size[2] * scale + 0.5);
                        }
-                       else
-                       {
+                       else {
                                scale = res / size[2];
                                smd->domain->dx = size[2] / res;
                                smd->domain->res[2] = res;
                                scale = res / size[2];
                                smd->domain->dx = size[2] / res;
                                smd->domain->res[2] = res;
@@ -220,8 +219,7 @@ static int smokeModifier_init (SmokeModifierData *smd, Object *ob, Scene *scene,
                                smd->domain->res[1] = (int)(size[1] * scale + 0.5);
                        }
                }
                                smd->domain->res[1] = (int)(size[1] * scale + 0.5);
                        }
                }
-               else
-               {
+               else {
                        if(size[1] > size[2])
                        {
                                scale = res / size[1];
                        if(size[1] > size[2])
                        {
                                scale = res / size[1];
@@ -230,8 +228,7 @@ static int smokeModifier_init (SmokeModifierData *smd, Object *ob, Scene *scene,
                                smd->domain->res[0] = (int)(size[0] * scale + 0.5);
                                smd->domain->res[2] = (int)(size[2] * scale + 0.5);
                        }
                                smd->domain->res[0] = (int)(size[0] * scale + 0.5);
                                smd->domain->res[2] = (int)(size[2] * scale + 0.5);
                        }
-                       else
-                       {
+                       else {
                                scale = res / size[2];
                                smd->domain->dx = size[2] / res;
                                smd->domain->res[2] = res;
                                scale = res / size[2];
                                smd->domain->dx = size[2] / res;
                                smd->domain->res[2] = res;
@@ -378,8 +375,7 @@ static void fill_scs_points(Object *ob, DerivedMesh *dm, SmokeCollSettings *scs)
                                sub_v3_v3v3(side1,  mvert[ mface[i].v3 ].co, mvert[ mface[i].v1 ].co);
                                sub_v3_v3v3(side2,  mvert[ mface[i].v4 ].co, mvert[ mface[i].v1 ].co);
                        }
                                sub_v3_v3v3(side1,  mvert[ mface[i].v3 ].co, mvert[ mface[i].v1 ].co);
                                sub_v3_v3v3(side2,  mvert[ mface[i].v4 ].co, mvert[ mface[i].v1 ].co);
                        }
-                       else
-                       {
+                       else {
                                sub_v3_v3v3(side1,  mvert[ mface[i].v2 ].co, mvert[ mface[i].v1 ].co);
                                sub_v3_v3v3(side2,  mvert[ mface[i].v3 ].co, mvert[ mface[i].v1 ].co);
                        }
                                sub_v3_v3v3(side1,  mvert[ mface[i].v2 ].co, mvert[ mface[i].v1 ].co);
                                sub_v3_v3v3(side2,  mvert[ mface[i].v3 ].co, mvert[ mface[i].v1 ].co);
                        }
@@ -410,8 +406,7 @@ static void fill_scs_points(Object *ob, DerivedMesh *dm, SmokeCollSettings *scs)
                                                copy_v3_v3(p2, mvert[ mface[i].v3 ].co);
                                                copy_v3_v3(p3, mvert[ mface[i].v4 ].co);
                                        }
                                                copy_v3_v3(p2, mvert[ mface[i].v3 ].co);
                                                copy_v3_v3(p3, mvert[ mface[i].v4 ].co);
                                        }
-                                       else
-                                       {
+                                       else {
                                                copy_v3_v3(p2, mvert[ mface[i].v2 ].co);
                                                copy_v3_v3(p3, mvert[ mface[i].v3 ].co);
                                        }
                                                copy_v3_v3(p2, mvert[ mface[i].v2 ].co);
                                                copy_v3_v3(p3, mvert[ mface[i].v3 ].co);
                                        }
@@ -1073,8 +1068,7 @@ static void smoke_calc_domain(Scene *scene, Object *ob, SmokeModifierData *smd)
                                                                if(psys->particles[p].flag & (PARS_NO_DISP|PARS_UNEXIST))
                                                                        continue;
                                                        }
                                                                if(psys->particles[p].flag & (PARS_NO_DISP|PARS_UNEXIST))
                                                                        continue;
                                                        }
-                                                       else
-                                                       {
+                                                       else {
                                                                /* handle child particle */
                                                                ChildParticle *cpa = &psys->child[p - totpart];
                                        
                                                                /* handle child particle */
                                                                ChildParticle *cpa = &psys->child[p - totpart];
                                        
@@ -1272,8 +1266,7 @@ static void smoke_calc_domain(Scene *scene, Object *ob, SmokeModifierData *smd)
 
                                                                                
                                }                                                       
 
                                                                                
                                }                                                       
-                               else                                                    
-                               {                                                               
+                               else {                                                          
                                        /*                                                              
                                        for()                                                           
                                        {                                                                       
                                        /*                                                              
                                        for()                                                           
                                        {                                                                       
@@ -1630,14 +1623,12 @@ static void get_cell(float *p0, int res[3], float dx, float *pos, int *cell, int
        sub_v3_v3v3(tmp, pos, p0);
        mul_v3_fl(tmp, 1.0 / dx);
 
        sub_v3_v3v3(tmp, pos, p0);
        mul_v3_fl(tmp, 1.0 / dx);
 
-       if(correct)
-       {
+       if (correct) {
                cell[0] = MIN2(res[0] - 1, MAX2(0, (int)floor(tmp[0])));
                cell[1] = MIN2(res[1] - 1, MAX2(0, (int)floor(tmp[1])));
                cell[2] = MIN2(res[2] - 1, MAX2(0, (int)floor(tmp[2])));
        }
                cell[0] = MIN2(res[0] - 1, MAX2(0, (int)floor(tmp[0])));
                cell[1] = MIN2(res[1] - 1, MAX2(0, (int)floor(tmp[1])));
                cell[2] = MIN2(res[2] - 1, MAX2(0, (int)floor(tmp[2])));
        }
-       else
-       {
+       else {
                cell[0] = (int)floor(tmp[0]);
                cell[1] = (int)floor(tmp[1]);
                cell[2] = (int)floor(tmp[2]);
                cell[0] = (int)floor(tmp[0]);
                cell[1] = (int)floor(tmp[1]);
                cell[2] = (int)floor(tmp[2]);
@@ -1687,8 +1678,7 @@ static void smoke_calc_transparency(float *result, float *input, float *p0, floa
                                        // we're ouside
                                        get_cell(p0, res, dx, pos, cell, 1);
                                }
                                        // we're ouside
                                        get_cell(p0, res, dx, pos, cell, 1);
                                }
-                               else
-                               {
+                               else {
                                        // we're inside
                                        get_cell(p0, res, dx, light, cell, 1);
                                }
                                        // we're inside
                                        get_cell(p0, res, dx, light, cell, 1);
                                }
index 594c7a9..a41e765 100644 (file)
@@ -628,19 +628,16 @@ void sound_seek_scene(struct Main *bmain, struct Scene *scene)
                AUD_resume(scene->sound_scene_handle);
                if (scene->sound_scrub_handle && AUD_getStatus(scene->sound_scrub_handle) != AUD_STATUS_INVALID)
                        AUD_seek(scene->sound_scrub_handle, 0);
                AUD_resume(scene->sound_scene_handle);
                if (scene->sound_scrub_handle && AUD_getStatus(scene->sound_scrub_handle) != AUD_STATUS_INVALID)
                        AUD_seek(scene->sound_scrub_handle, 0);
-               else
-               {
+               else {
                        if (scene->sound_scrub_handle)
                                AUD_stop(scene->sound_scrub_handle);
                        scene->sound_scrub_handle = AUD_pauseAfter(scene->sound_scene_handle, 1 / FPS);
                }
        }
                        if (scene->sound_scrub_handle)
                                AUD_stop(scene->sound_scrub_handle);
                        scene->sound_scrub_handle = AUD_pauseAfter(scene->sound_scene_handle, 1 / FPS);
                }
        }
-       else
-       {
+       else {
                if (scene->audio.flag & AUDIO_SYNC)
                        AUD_seekSequencer(scene->sound_scene_handle, CFRA / FPS);
                if (scene->audio.flag & AUDIO_SYNC)
                        AUD_seekSequencer(scene->sound_scene_handle, CFRA / FPS);
-               else
-               {
+               else {
                        if (status == AUD_STATUS_PLAYING)
                                AUD_seek(scene->sound_scene_handle, CFRA / FPS);
                }
                        if (status == AUD_STATUS_PLAYING)
                                AUD_seek(scene->sound_scene_handle, CFRA / FPS);
                }
@@ -731,14 +728,12 @@ void sound_update_scene(struct Scene* scene)
                                                        {
                                                                if (speaker->sound)
                                                                        AUD_moveSequence(strip->speaker_handle, strip->start / FPS, -1, 0);
                                                        {
                                                                if (speaker->sound)
                                                                        AUD_moveSequence(strip->speaker_handle, strip->start / FPS, -1, 0);
-                                                               else
-                                                               {
+                                                               else {
                                                                        AUD_removeSequence(scene->sound_scene, strip->speaker_handle);
                                                                        strip->speaker_handle = NULL;
                                                                }
                                                        }
                                                                        AUD_removeSequence(scene->sound_scene, strip->speaker_handle);
                                                                        strip->speaker_handle = NULL;
                                                                }
                                                        }
-                                                       else
-                                                       {
+                                                       else {
                                                                if (speaker->sound)
                                                                {
                                                                        strip->speaker_handle = AUD_addSequence(scene->sound_scene, speaker->sound->playback_handle, strip->start / FPS, -1, 0);
                                                                if (speaker->sound)
                                                                {
                                                                        strip->speaker_handle = AUD_addSequence(scene->sound_scene, speaker->sound->playback_handle, strip->start / FPS, -1, 0);
index c3ba8f1..3b84cb4 100644 (file)
@@ -689,8 +689,7 @@ void bUnit_ToUnitAltName(char *str, int len_max, const char *orig_str, int syste
 
        /* find and substitute all units */
        for (unit= usys->units; unit->name; unit++) {
 
        /* find and substitute all units */
        for (unit= usys->units; unit->name; unit++) {
-               if (len_max > 0 && (unit->name_alt || unit == unit_def))
-               {
+               if (len_max > 0 && (unit->name_alt || unit == unit_def)) {
                        const char *found= unit_find_str(orig_str, unit->name_short);
                        if (found) {
                                int offset= (int)(found - orig_str);
                        const char *found= unit_find_str(orig_str, unit->name_short);
                        if (found) {
                                int offset= (int)(found - orig_str);
index 9d68e1d..bca7f6f 100644 (file)
@@ -627,8 +627,7 @@ static AVStream* alloc_audio_stream(RenderData *rd, int codec_id, AVFormatContex
 
        if((c->codec_id >= CODEC_ID_PCM_S16LE) && (c->codec_id <= CODEC_ID_PCM_DVD))
                audio_input_samples = audio_outbuf_size * 8 / c->bits_per_coded_sample / c->channels;
 
        if((c->codec_id >= CODEC_ID_PCM_S16LE) && (c->codec_id <= CODEC_ID_PCM_DVD))
                audio_input_samples = audio_outbuf_size * 8 / c->bits_per_coded_sample / c->channels;
-       else
-       {
+       else {
                audio_input_samples = c->frame_size;
                if(c->frame_size * c->channels * sizeof(int16_t) * 4 > audio_outbuf_size)
                        audio_outbuf_size = c->frame_size * c->channels * sizeof(int16_t) * 4;
                audio_input_samples = c->frame_size;
                if(c->frame_size * c->channels * sizeof(int16_t) * 4 > audio_outbuf_size)
                        audio_outbuf_size = c->frame_size * c->channels * sizeof(int16_t) * 4;
@@ -994,8 +993,7 @@ void end_ffmpeg(void)
        }*/
 
 #ifdef WITH_AUDASPACE
        }*/
 
 #ifdef WITH_AUDASPACE
-       if(audio_mixdown_device)
-       {
+       if (audio_mixdown_device) {
                AUD_closeReadDevice(audio_mixdown_device);
                audio_mixdown_device = 0;
        }
                AUD_closeReadDevice(audio_mixdown_device);
                audio_mixdown_device = 0;
        }
index bbf005e..3d13764 100644 (file)
@@ -237,8 +237,7 @@ void BLI_argsPrintArgDoc(struct bArgs *ba, const char *arg)
 {
        bArgument *a = lookUp(ba, arg, -1, -1);
 
 {
        bArgument *a = lookUp(ba, arg, -1, -1);
 
-       if (a)
-       {
+       if (a) {
                bArgDoc *d = a->doc;
 
                internalDocPrint(d);
                bArgDoc *d = a->doc;
 
                internalDocPrint(d);
@@ -251,10 +250,8 @@ void BLI_argsPrintOtherDoc(struct bArgs *ba)
 {
        bArgDoc *d;
 
 {
        bArgDoc *d;
 
-       for( d = ba->docs.first; d; d = d->next)
-       {
-               if (d->done == 0)
-               {
+       for (d = ba->docs.first; d; d = d->next) {
+               if (d->done == 0) {
                        internalDocPrint(d);
                }
        }
                        internalDocPrint(d);
                }
        }
index 4debe1a..72f312b 100644 (file)
@@ -94,8 +94,7 @@ void *BLI_memarena_alloc(MemArena *ma, int size)
        if (size>ma->cursize) {
                unsigned char *tmp;
                
        if (size>ma->cursize) {
                unsigned char *tmp;
                
-               if(size > ma->bufsize - (ma->align - 1))
-               {
+               if(size > ma->bufsize - (ma->align - 1)) {
                        ma->cursize = PADUP(size+1, ma->align);
                }
                else ma->cursize = ma->bufsize;
                        ma->cursize = PADUP(size+1, ma->align);
                }
                else ma->cursize = ma->bufsize;
index 8fe081f..f55ebf9 100644 (file)
@@ -99,8 +99,7 @@ static void freetypechar_to_vchar(FT_Face face, FT_ULong charcode, VFontData *vf
        err= FT_Load_Glyph(face, glyph_index, FT_LOAD_NO_SCALE | FT_LOAD_NO_BITMAP);
        
        // If loading succeeded, convert the FT glyph to the internal format
        err= FT_Load_Glyph(face, glyph_index, FT_LOAD_NO_SCALE | FT_LOAD_NO_BITMAP);
        
        // If loading succeeded, convert the FT glyph to the internal format
-       if(!err)
-       {
+       if(!err) {
                int *npoints;
                int *onpoints;
                
                int *npoints;
                int *onpoints;
                
@@ -162,9 +161,8 @@ static void freetypechar_to_vchar(FT_Face face, FT_ULong charcode, VFontData *vf
                                if(k == 0) m = l;
                                        
                                //virtual conic on-curve points
                                if(k == 0) m = l;
                                        
                                //virtual conic on-curve points
-                               if(k < npoints[j] - 1 )
-                               {
-                                       if( ftoutline.tags[l] == FT_Curve_Tag_Conic && ftoutline.tags[l+1] == FT_Curve_Tag_Conic) {
+                               if (k < npoints[j] - 1) {
+                                       if (ftoutline.tags[l] == FT_Curve_Tag_Conic && ftoutline.tags[l+1] == FT_Curve_Tag_Conic) {
                                                dx = (ftoutline.points[l].x + ftoutline.points[l+1].x)* scale / 2.0f;
                                                dy = (ftoutline.points[l].y + ftoutline.points[l+1].y)* scale / 2.0f;
 
                                                dx = (ftoutline.points[l].x + ftoutline.points[l+1].x)* scale / 2.0f;
                                                dy = (ftoutline.points[l].y + ftoutline.points[l+1].y)* scale / 2.0f;
 
@@ -291,8 +289,7 @@ static int objchr_to_ftvfontdata(VFont *vfont, FT_ULong charcode)
        if(!tf) return FALSE;
        
        // Load the font to memory
        if(!tf) return FALSE;
        
        // Load the font to memory
-       if(tf->pf)
-       {
+       if (tf->pf) {
                err= FT_New_Memory_Face( library,
                        tf->pf->data,
                        tf->pf->size,
                err= FT_New_Memory_Face( library,
                        tf->pf->data,
                        tf->pf->size,
@@ -369,17 +366,14 @@ static VFontData *objfnt_to_ftvfontdata(PackedFile * pf)
        lcode= charcode= FT_Get_First_Char(face, &glyph_index);
 
        // No charmap found from the ttf so we need to figure it out
        lcode= charcode= FT_Get_First_Char(face, &glyph_index);
 
        // No charmap found from the ttf so we need to figure it out
-       if(glyph_index == 0)
-       {
+       if (glyph_index == 0) {
                FT_CharMap  found = NULL;
                FT_CharMap  charmap;
                int n;
 
                FT_CharMap  found = NULL;
                FT_CharMap  charmap;
                int n;
 
-               for ( n = 0; n < face->num_charmaps; n++ )
-               {
+               for (n = 0; n < face->num_charmaps; n++) {
                        charmap = face->charmaps[n];
                        charmap = face->charmaps[n];
-                       if (charmap->encoding == FT_ENCODING_APPLE_ROMAN)
-                       {
+                       if (charmap->encoding == FT_ENCODING_APPLE_ROMAN) {
                                found = charmap;
                                break;
                        }
                                found = charmap;
                                break;
                        }
index 6155bf8..71077f8 100644 (file)
@@ -182,10 +182,8 @@ void BLI_sortlist(ListBase *listbase, int (*cmp)(void *, void *))
        if (cmp == NULL) return;
        if (listbase == NULL) return;
 
        if (cmp == NULL) return;
        if (listbase == NULL) return;
 
-       if (listbase->first != listbase->last)
-       {
-               for( previous = listbase->first, current = previous->next; current; current = next )
-               {
+       if (listbase->first != listbase->last) {
+               for (previous = listbase->first, current = previous->next; current; current = next) {
                        next = current->next;
                        previous = current->prev;
                        
                        next = current->next;
                        previous = current->prev;
                        
index 9f5e191..18418f3 100644 (file)
@@ -957,8 +957,7 @@ int isect_sweeping_sphere_tri_v3(
                        return 0;
                }
        }
                        return 0;
                }
        }
-       else
-       {
+       else {
                float t0=(-a+radius)/nordotv;
                float t1=(-a-radius)/nordotv;
 
                float t0=(-a+radius)/nordotv;
                float t1=(-a-radius)/nordotv;
 
@@ -1279,13 +1278,11 @@ int isect_line_line_strict_v3(const float v1[3], const float v2[3], const float
 
                        return 1; /* intersection found */
                }
 
                        return 1; /* intersection found */
                }
-               else
-               {
+               else {
                        return 0;
                }
        }
                        return 0;
                }
        }
-       else
-       {
+       else {
                return 0;
        }
 } 
                return 0;
        }
 } 
index 54a865c..ffee440 100644 (file)
@@ -468,8 +468,7 @@ void BLI_path_rel(char *file, const char *relfile)
        /* the last slash in the file indicates where the path part ends */
        lslash = BLI_last_slash(temp);
 
        /* the last slash in the file indicates where the path part ends */
        lslash = BLI_last_slash(temp);
 
-       if (lslash) 
-       {       
+       if (lslash) {
                /* find the prefix of the filename that is equal for both filenames.
                 * This is replaced by the two slashes at the beginning */
                char *p= temp;
                /* find the prefix of the filename that is equal for both filenames.
                 * This is replaced by the two slashes at the beginning */
                char *p= temp;
@@ -838,8 +837,7 @@ const char *BLI_getDefaultDocumentFolder(void)
                 */
                hResult = SHGetFolderPath(NULL, CSIDL_PERSONAL, NULL, SHGFP_TYPE_CURRENT, documentfolder);
                
                 */
                hResult = SHGetFolderPath(NULL, CSIDL_PERSONAL, NULL, SHGFP_TYPE_CURRENT, documentfolder);
                
-               if (hResult == S_OK)
-               {
+               if (hResult == S_OK) {
                        if (BLI_is_dir(documentfolder)) return documentfolder;
                }
                
                        if (BLI_is_dir(documentfolder)) return documentfolder;
                }
                
index 6048ca8..3894a6a 100644 (file)
@@ -464,12 +464,10 @@ ThreadedWorker *BLI_create_worker(void *(*do_thread)(void *), int tot, int sleep
        
        worker = MEM_callocN(sizeof(ThreadedWorker), "threadedworker");
        
        
        worker = MEM_callocN(sizeof(ThreadedWorker), "threadedworker");
        
-       if (tot > RE_MAX_THREAD)
-       {
+       if (tot > RE_MAX_THREAD) {
                tot = RE_MAX_THREAD;
        }
                tot = RE_MAX_THREAD;
        }
-       else if (tot < 1)
-       {
+       else if (tot < 1) {
                tot= 1;
        }
        
                tot= 1;
        }
        
@@ -498,25 +496,20 @@ void BLI_insert_work(ThreadedWorker *worker, void *param)
        WorkParam *p = MEM_callocN(sizeof(WorkParam), "workparam");
        int index;
        
        WorkParam *p = MEM_callocN(sizeof(WorkParam), "workparam");
        int index;
        
-       if (BLI_available_threads(&worker->threadbase) == 0)
-       {
+       if (BLI_available_threads(&worker->threadbase) == 0) {
                index = worker->total;
                index = worker->total;
-               while(index == worker->total)
-               {
+               while(index == worker->total) {
                        PIL_sleep_ms(worker->sleep_time);
                        
                        PIL_sleep_ms(worker->sleep_time);
                        
-                       for (index = 0; index < worker->total; index++)
-                       {
-                               if (worker->busy[index] == 0)
-                               {
+                       for (index = 0; index < worker->total; index++) {
+                               if (worker->busy[index] == 0) {
                                        BLI_remove_thread_index(&worker->threadbase, index);
                                        break;
                                }
                        }
                }
        }
                                        BLI_remove_thread_index(&worker->threadbase, index);
                                        break;
                                }
                        }
                }
        }
-       else
-       {
+       else {
                index = BLI_available_thread_index(&worker->threadbase);
        }
        
                index = BLI_available_thread_index(&worker->threadbase);
        }
        
index 81e9cbb..e5125d0 100644 (file)
@@ -10818,8 +10818,7 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
                                                sAct->sound3D.min_gain = sound->min_gain;
                                                sAct->sound3D.rolloff_factor = sound->attenuation;
                                        }
                                                sAct->sound3D.min_gain = sound->min_gain;
                                                sAct->sound3D.rolloff_factor = sound->attenuation;
                                        }
-                                       else
-                                       {
+                                       else {
                                                sAct->sound3D.reference_distance = 1.0f;
                                                sAct->volume = 1.0f;
                                                sAct->sound3D.max_gain = 1.0f;
                                                sAct->sound3D.reference_distance = 1.0f;
                                                sAct->volume = 1.0f;
                                                sAct->sound3D.max_gain = 1.0f;
index 879e5e1..e055cd2 100644 (file)
@@ -362,8 +362,7 @@ void bmo_bevel_exec(BMesh *bm, BMOperator *op)
                        float co[3];
 
                        if (BMO_elem_flag_test(bm, l->e, BEVEL_FLAG)) {
                        float co[3];
 
                        if (BMO_elem_flag_test(bm, l->e, BEVEL_FLAG)) {
-                               if (BMO_elem_flag_test(bm, l->prev->e, BEVEL_FLAG))
-                               {
+                               if (BMO_elem_flag_test(bm, l->prev->e, BEVEL_FLAG)) {
                                        tag = tags + BM_elem_index_get(l);
                                        calc_corner_co(bm, l, fac, co, do_dist, do_even);
                                        tag->newv = BM_vert_create(bm, co, l->v);
                                        tag = tags + BM_elem_index_get(l);
                                        calc_corner_co(bm, l, fac, co, do_dist, do_even);
                                        tag->newv = BM_vert_create(bm, co, l->v);
index f15ce72..9e3630a 100644 (file)
@@ -2600,8 +2600,7 @@ short ANIM_channel_setting_get (bAnimContext *ac, bAnimListElem *ale, int settin
        bAnimChannelType *acf= ANIM_channel_get_typeinfo(ale);
        
        /* 1) check that the setting exists for the current context */
        bAnimChannelType *acf= ANIM_channel_get_typeinfo(ale);
        
        /* 1) check that the setting exists for the current context */
-       if ( (acf) && (!acf->has_setting || acf->has_setting(ac, ale, setting)) ) 
-       {
+       if ((acf) && (!acf->has_setting || acf->has_setting(ac, ale, setting))) {
                /* 2) get pointer to check for flag in, and the flag to check for */
                short negflag, ptrsize;
                int flag;
                /* 2) get pointer to check for flag in, and the flag to check for */
                short negflag, ptrsize;
                int flag;
@@ -2678,8 +2677,7 @@ void ANIM_channel_setting_set (bAnimContext *ac, bAnimListElem *ale, int setting
        bAnimChannelType *acf= ANIM_channel_get_typeinfo(ale);
        
        /* 1) check that the setting exists for the current context */
        bAnimChannelType *acf= ANIM_channel_get_typeinfo(ale);
        
        /* 1) check that the setting exists for the current context */
-       if ( (acf) && (!acf->has_setting || acf->has_setting(ac, ale, setting)) ) 
-       {
+       if ((acf) && (!acf->has_setting || acf->has_setting(ac, ale, setting))) {
                /* 2) get pointer to check for flag in, and the flag to check for */
                short negflag, ptrsize;
                int flag;
                /* 2) get pointer to check for flag in, and the flag to check for */
                short negflag, ptrsize;
                int flag;
@@ -2831,8 +2829,7 @@ void ANIM_channel_draw (bAnimContext *ac, bAnimListElem *ale, float yminc, float
                UI_DrawString(offset, ytext, name);
                
                /* draw red underline if channel is disabled */
                UI_DrawString(offset, ytext, name);
                
                /* draw red underline if channel is disabled */
-               if ((ale->type == ANIMTYPE_FCURVE) && (ale->flag & FCURVE_DISABLED)) 
-               {
+               if ((ale->type == ANIMTYPE_FCURVE) && (ale->flag & FCURVE_DISABLED)) {
                        // FIXME: replace hardcoded color here, and check on extents!
                        glColor3f(1.0f, 0.0f, 0.0f);
                        glLineWidth(2.0);
                        // FIXME: replace hardcoded color here, and check on extents!
                        glColor3f(1.0f, 0.0f, 0.0f);
                        glLineWidth(2.0);
index 74ae587..ec1583f 100644 (file)
@@ -541,8 +541,7 @@ void ANIM_fcurve_delete_from_animdata (bAnimContext *ac, AnimData *adt, FCurve *
                        /* XXX: there's a problem where many actions could build up in the file if multiple
                         * full add/delete cycles are performed on the same objects, but assume that this is rare
                         */
                        /* XXX: there's a problem where many actions could build up in the file if multiple
                         * full add/delete cycles are performed on the same objects, but assume that this is rare
                         */
-               if ((adt->action->curves.first == NULL) && (adt->flag & ADT_NLA_EDIT_ON)==0)
-               {
+               if ((adt->action->curves.first == NULL) && (adt->flag & ADT_NLA_EDIT_ON)==0) {
                        id_us_min(&adt->action->id);
                        adt->action = NULL;
                }
                        id_us_min(&adt->action->id);
                        adt->action = NULL;
                }
index 714c327..1ef02f4 100644 (file)
@@ -367,18 +367,15 @@ void ANIM_nla_mapping_apply_fcurve (AnimData *adt, FCurve *fcu, short restore, s
 float ANIM_unit_mapping_get_factor (Scene *scene, ID *id, FCurve *fcu, short restore)
 {
        /* sanity checks */
 float ANIM_unit_mapping_get_factor (Scene *scene, ID *id, FCurve *fcu, short restore)
 {
        /* sanity checks */
-       if (id && fcu && fcu->rna_path) 
-       {
+       if (id && fcu && fcu->rna_path) {
                PointerRNA ptr, id_ptr;
                PropertyRNA *prop;
                
                /* get RNA property that F-Curve affects */
                RNA_id_pointer_create(id, &id_ptr);
                PointerRNA ptr, id_ptr;
                PropertyRNA *prop;
                
                /* get RNA property that F-Curve affects */
                RNA_id_pointer_create(id, &id_ptr);
-               if (RNA_path_resolve(&id_ptr, fcu->rna_path, &ptr, &prop)) 
-               {
+               if (RNA_path_resolve(&id_ptr, fcu->rna_path, &ptr, &prop)) {
                        /* rotations: radians <-> degrees? */
                        /* rotations: radians <-> degrees? */
-                       if (RNA_SUBTYPE_UNIT(RNA_property_subtype(prop)) == PROP_UNIT_ROTATION)
-                       {
+                       if (RNA_SUBTYPE_UNIT(RNA_property_subtype(prop)) == PROP_UNIT_ROTATION) {
                                /* if the radians flag is not set, default to using degrees which need conversions */
                                if ((scene) && (scene->unit.system_rotation == USER_UNIT_ROT_RADIANS) == 0) {
                                        if (restore)
                                /* if the radians flag is not set, default to using degrees which need conversions */
                                if ((scene) && (scene->unit.system_rotation == USER_UNIT_ROT_RADIANS) == 0) {
                                        if (restore)
index 81836d8..05a2cc3 100644 (file)
@@ -1038,8 +1038,7 @@ static size_t animfilter_act_group (bAnimContext *ac, ListBase *anim_data, bDope
                         * but to do this, we need to check that the group doesn't have it's not-visible flag set preventing 
                         * all its sub-curves to be shown
                         */
                         * but to do this, we need to check that the group doesn't have it's not-visible flag set preventing 
                         * all its sub-curves to be shown
                         */
-                       if ( !(filter_mode & ANIMFILTER_CURVE_VISIBLE) || !(agrp->flag & AGRP_NOTVISIBLE) )
-                       {
+                       if (!(filter_mode & ANIMFILTER_CURVE_VISIBLE) || !(agrp->flag & AGRP_NOTVISIBLE)) {
                                /* group must be editable for its children to be editable (if we care about this) */
                                if (!(filter_mode & ANIMFILTER_FOREDIT) || EDITABLE_AGRP(agrp)) {
                                        /* get first F-Curve which can be used here */
                                /* group must be editable for its children to be editable (if we care about this) */
                                if (!(filter_mode & ANIMFILTER_FOREDIT) || EDITABLE_AGRP(agrp)) {
                                        /* get first F-Curve which can be used here */
index 7f7b1b2..b3efeff 100644 (file)
@@ -83,10 +83,10 @@ static ListBase *context_get_markers(Scene *scene, ScrArea *sa)
                        /* local markers can only be shown when there's only a single active action to grab them from 
                         *      - flag only takes effect when there's an action, otherwise it can get too confusing?
                         */
                        /* local markers can only be shown when there's only a single active action to grab them from 
                         *      - flag only takes effect when there's an action, otherwise it can get too confusing?
                         */
-                       if (ELEM(saction->mode, SACTCONT_ACTION, SACTCONT_SHAPEKEY) && (saction->action)) 
-                       {
-                               if (saction->flag & SACTION_POSEMARKERS_SHOW)
+                       if (ELEM(saction->mode, SACTCONT_ACTION, SACTCONT_SHAPEKEY) && (saction->action)) {
+                               if (saction->flag & SACTION_POSEMARKERS_SHOW) {
                                        return &saction->action->markers;
                                        return &saction->action->markers;
+                               }
                        }
                }
        }
                        }
                }
        }
@@ -851,8 +851,7 @@ static int ed_marker_move_modal(bContext *C, wmOperator *op, wmEvent *evt)
                float vec[3];
                char str_tx[256];
                
                float vec[3];
                char str_tx[256];
                
-               if (handleNumInput(&mm->num, evt))
-               {
+               if (handleNumInput(&mm->num, evt)) {
                        applyNumInput(&mm->num, vec);
                        outputNumInput(&mm->num, str_tx);
                        
                        applyNumInput(&mm->num, vec);
                        outputNumInput(&mm->num, str_tx);
                        
index 161f549..2a66a6c 100644 (file)
@@ -105,8 +105,7 @@ short ANIM_get_keyframing_flags (Scene *scene, short incl_mode)
        }
                
        /* only if including settings from the autokeying mode... */
        }
                
        /* only if including settings from the autokeying mode... */
-       if (incl_mode) 
-       { 
+       if (incl_mode) { 
                /* keyframing mode - only replace existing keyframes */
                if (IS_AUTOKEY_MODE(scene, EDITKEYS)) 
                        flag |= INSERTKEY_REPLACE;
                /* keyframing mode - only replace existing keyframes */
                if (IS_AUTOKEY_MODE(scene, EDITKEYS)) 
                        flag |= INSERTKEY_REPLACE;
index 6a128ab..365eb28 100644 (file)
@@ -2533,8 +2533,7 @@ EditBone *duplicateEditBoneObjects(EditBone *curBone, const char *name, ListBase
        curBone->temp = eBone;
        eBone->temp = curBone;
        
        curBone->temp = eBone;
        eBone->temp = curBone;
        
-       if (name != NULL)
-       {
+       if (name != NULL) {
                BLI_strncpy(eBone->name, name, sizeof(eBone->name));
        }
 
                BLI_strncpy(eBone->name, name, sizeof(eBone->name));
        }
 
@@ -5557,8 +5556,7 @@ void transform_armature_mirror_update(Object *obedit)
                                        eboflip->roll= -ebo->roll;
                                        
                                        /* Also move connected parent, in case parent's name isn't mirrored properly */
                                        eboflip->roll= -ebo->roll;
                                        
                                        /* Also move connected parent, in case parent's name isn't mirrored properly */
-                                       if (eboflip->parent && eboflip->flag & BONE_CONNECTED)
-                                       {
+                                       if (eboflip->parent && eboflip->flag & BONE_CONNECTED) {
                                                EditBone *parent = eboflip->parent;
                                                copy_v3_v3(parent->tail, eboflip->head);
                                                parent->rad_tail = ebo->rad_head;
                                                EditBone *parent = eboflip->parent;
                                                copy_v3_v3(parent->tail, eboflip->head);
                                                parent->rad_tail = ebo->rad_head;
@@ -5589,8 +5587,7 @@ EditBone * subdivideByAngle(Scene *scene, Object *obedit, ReebArc *arc, ReebNode
        bArmature *arm= obedit->data;
        EditBone *lastBone = NULL;
        
        bArmature *arm= obedit->data;
        EditBone *lastBone = NULL;
        
-       if (scene->toolsettings->skgen_options & SKGEN_CUT_ANGLE)
-       {
+       if (scene->toolsettings->skgen_options & SKGEN_CUT_ANGLE) {
                ReebArcIterator arc_iter;
                BArcIterator *iter = (BArcIterator*)&arc_iter;
                float *previous = NULL, *current = NULL;
                ReebArcIterator arc_iter;
                BArcIterator *iter = (BArcIterator*)&arc_iter;
                float *previous = NULL, *current = NULL;
@@ -5624,8 +5621,7 @@ EditBone * subdivideByAngle(Scene *scene, Object *obedit, ReebArc *arc, ReebNode
                        len1 = normalize_v3(vec1);
                        len2 = normalize_v3(vec2);
 
                        len1 = normalize_v3(vec1);
                        len2 = normalize_v3(vec2);
 
-                       if (len1 > 0.0f && len2 > 0.0f && dot_v3v3(vec1, vec2) < angleLimit)
-                       {
+                       if (len1 > 0.0f && len2 > 0.0f && dot_v3v3(vec1, vec2) < angleLimit) {
                                copy_v3_v3(parent->tail, previous);
 
                                child = ED_armature_edit_bone_add(arm, "Bone");
                                copy_v3_v3(parent->tail, previous);
 
                                child = ED_armature_edit_bone_add(arm, "Bone");
@@ -5641,8 +5637,7 @@ EditBone * subdivideByAngle(Scene *scene, Object *obedit, ReebArc *arc, ReebNode
                /* If the bone wasn't subdivided, delete it and return NULL
                 * to let subsequent subdivision methods do their thing. 
                 * */
                /* If the bone wasn't subdivided, delete it and return NULL
                 * to let subsequent subdivision methods do their thing. 
                 * */
-               if (parent == root)
-               {
+               if (parent == root) {
                        if(parent==arm->act_edbone) arm->act_edbone= NULL;
                        ED_armature_edit_bone_remove(arm, parent);
                        parent = NULL;
                        if(parent==arm->act_edbone) arm->act_edbone= NULL;
                        ED_armature_edit_bone_remove(arm, parent);
                        parent = NULL;
@@ -5658,8 +5653,7 @@ EditBone * test_subdivideByCorrelation(Scene *scene, Object *obedit, ReebArc *ar
 {
        EditBone *lastBone = NULL;
 
 {
        EditBone *lastBone = NULL;
 
-       if (scene->toolsettings->skgen_options & SKGEN_CUT_CORRELATION)
-       {
+       if (scene->toolsettings->skgen_options & SKGEN_CUT_CORRELATION) {
                float invmat[4][4]= MAT4_UNITY;
                float tmat[3][3]= MAT3_UNITY;
                ReebArcIterator arc_iter;
                float invmat[4][4]= MAT4_UNITY;
                float tmat[3][3]= MAT3_UNITY;
                ReebArcIterator arc_iter;
@@ -5682,19 +5676,16 @@ float arcLengthRatio(ReebArc *arc)
        
        arcLength = len_v3v3(arc->head->p, arc->tail->p);
        
        
        arcLength = len_v3v3(arc->head->p, arc->tail->p);
        
-       if (arc->bcount > 0)
-       {
+       if (arc->bcount > 0) {
                /* Add the embedding */
                /* Add the embedding */
-               for ( i = 1; i < arc->bcount; i++)
-               {
+               for ( i = 1; i < arc->bcount; i++) {
                        embedLength += len_v3v3(arc->buckets[i - 1].p, arc->buckets[i].p);
                }
                /* Add head and tail -> embedding vectors */
                embedLength += len_v3v3(arc->head->p, arc->buckets[0].p);
                embedLength += len_v3v3(arc->tail->p, arc->buckets[arc->bcount - 1].p);
        }
                        embedLength += len_v3v3(arc->buckets[i - 1].p, arc->buckets[i].p);
                }
                /* Add head and tail -> embedding vectors */
                embedLength += len_v3v3(arc->head->p, arc->buckets[0].p);
                embedLength += len_v3v3(arc->tail->p, arc->buckets[arc->bcount - 1].p);
        }
-       else
-       {
+       else {
                embedLength = arcLength;
        }
        
                embedLength = arcLength;
        }
        
@@ -5734,8 +5725,7 @@ void generateSkeletonFromReebGraph(Scene *scene, ReebGraph *rg)
        
        src = scene->basact->object;
        
        
        src = scene->basact->object;
        
-       if (obedit != NULL)
-       {
+       if (obedit != NULL) {
                ED_armature_from_edit(obedit);
                ED_armature_edit_free(obedit);
        }
                ED_armature_from_edit(obedit);
                ED_armature_edit_free(obedit);
        }
@@ -5772,32 +5762,28 @@ void generateSkeletonFromReebGraph(Scene *scene, ReebGraph *rg)
                 * Finally, the arc direction is stored in its flag: 1 (low -> high), -1 (high -> low)
                 */
 
                 * Finally, the arc direction is stored in its flag: 1 (low -> high), -1 (high -> low)
                 */
 
-               /* if arc is a symmetry axis, internal bones go up the tree */          
-               if (arc->symmetry_level == 1 && arc->tail->degree != 1)
-               {
+               /* if arc is a symmetry axis, internal bones go up the tree */
+               if (arc->symmetry_level == 1 && arc->tail->degree != 1) {
                        head = arc->tail;
                        tail = arc->head;
                        
                        arc->flag = -1; /* mark arc direction */
                }
                /* Bones point AWAY from the symmetry axis */
                        head = arc->tail;
                        tail = arc->head;
                        
                        arc->flag = -1; /* mark arc direction */
                }
                /* Bones point AWAY from the symmetry axis */
-               else if (arc->head->symmetry_level == 1)
-               {
+               else if (arc->head->symmetry_level == 1) {
                        head = arc->head;
                        tail = arc->tail;
                        
                        arc->flag = 1; /* mark arc direction */
                }
                        head = arc->head;
                        tail = arc->tail;
                        
                        arc->flag = 1; /* mark arc direction */
                }
-               else if (arc->tail->symmetry_level == 1)
-               {
+               else if (arc->tail->symmetry_level == 1) {
                        head = arc->tail;
                        tail = arc->head;
                        
                        arc->flag = -1; /* mark arc direction */
                }
                /* otherwise, always go from low weight to high weight */
                        head = arc->tail;
                        tail = arc->head;
                        
                        arc->flag = -1; /* mark arc direction */
                }
                /* otherwise, always go from low weight to high weight */
-               else
-               {
+               else {
                        head = arc->head;
                        tail = arc->tail;
                        
                        head = arc->head;
                        tail = arc->tail;
                        
@@ -5805,10 +5791,8 @@ void generateSkeletonFromReebGraph(Scene *scene, ReebGraph *rg)
                }
                
                /* Loop over subdivision methods */     
                }
                
                /* Loop over subdivision methods */     
-               for (i = 0; lastBone == NULL && i < SKGEN_SUB_TOTAL; i++)
-               {
-                       switch(scene->toolsettings->skgen_subdivisions[i])
-                       {
+               for (i = 0; lastBone == NULL && i < SKGEN_SUB_TOTAL; i++) {
+                       switch(scene->toolsettings->skgen_subdivisions[i]) {
                                case SKGEN_SUB_LENGTH:
                                        lastBone = test_subdivideByLength(scene, obedit, arc, head, tail);
                                        break;
                                case SKGEN_SUB_LENGTH:
                                        lastBone = test_subdivideByLength(scene, obedit, arc, head, tail);
                                        break;
@@ -5821,8 +5805,7 @@ void generateSkeletonFromReebGraph(Scene *scene, ReebGraph *rg)
                        }
                }
        
                        }
                }
        
-               if (lastBone == NULL)
-               {
+               if (lastBone == NULL) {
                        EditBone        *bone;
                        bone = ED_armature_edit_bone_add(obedit->data, "Bone");
                        bone->flag |= BONE_SELECTED|BONE_TIPSEL|BONE_ROOTSEL;
                        EditBone        *bone;
                        bone = ED_armature_edit_bone_add(obedit->data, "Bone");
                        bone->flag |= BONE_SELECTED|BONE_TIPSEL|BONE_ROOTSEL;
@@ -5843,20 +5826,18 @@ void generateSkeletonFromReebGraph(Scene *scene, ReebGraph *rg)
                ReebArc *incomingArc = NULL;
                int i;
 
                ReebArc *incomingArc = NULL;
                int i;
 
-               for (i = 0; i < node->degree; i++)
-               {
+               for (i = 0; i < node->degree; i++) {
                        arc = (ReebArc*)node->arcs[i];
 
                        /* if arc is incoming into the node */
                        arc = (ReebArc*)node->arcs[i];
 
                        /* if arc is incoming into the node */
-                       if ((arc->head == node && arc->flag == -1) || (arc->tail == node && arc->flag == 1))
+                       if ((arc->head == node && arc->flag == -1) ||
+                           (arc->tail == node && arc->flag ==  1))
                        {
                        {
-                               if (incomingArc == NULL)
-                               {
+                               if (incomingArc == NULL) {
                                        incomingArc = arc;
                                        /* loop further to make sure there's only one incoming arc */
                                }
                                        incomingArc = arc;
                                        /* loop further to make sure there's only one incoming arc */
                                }
-                               else
-                               {
+                               else {
                                        /* skip this node if more than one incomingArc */
                                        incomingArc = NULL;
                                        break; /* No need to look further, we are skipping already */
                                        /* skip this node if more than one incomingArc */
                                        incomingArc = NULL;
                                        break; /* No need to look further, we are skipping already */
@@ -5864,8 +5845,7 @@ void generateSkeletonFromReebGraph(Scene *scene, ReebGraph *rg)
                        }
                }
 
                        }
                }
 
-               if (incomingArc != NULL)
-               {
+               if (incomingArc != NULL) {
                        EditBone *parentBone = BLI_ghash_lookup(arcBoneMap, incomingArc);
 
                        /* Look for outgoing arcs and parent their bones */
                        EditBone *parentBone = BLI_ghash_lookup(arcBoneMap, incomingArc);
 
                        /* Look for outgoing arcs and parent their bones */
@@ -5874,8 +5854,7 @@ void generateSkeletonFromReebGraph(Scene *scene, ReebGraph *rg)
                                arc = node->arcs[i];
 
                                /* if arc is outgoing from the node */
                                arc = node->arcs[i];
 
                                /* if arc is outgoing from the node */
-                               if ((arc->head == node && arc->flag == 1) || (arc->tail == node && arc->flag == -1))
-                               {
+                               if ((arc->head == node && arc->flag == 1) || (arc->tail == node && arc->flag == -1)) {
                                        EditBone *childBone = BLI_ghash_lookup(arcBoneMap, arc);
 
                                        /* find the root bone */
                                        EditBone *childBone = BLI_ghash_lookup(arcBoneMap, arc);
 
                                        /* find the root bone */
index f1ea39e..375184d 100644 (file)
@@ -2901,12 +2901,10 @@ void BIF_retargetArc(bContext *C, ReebArc *earc, RigGraph *template_rigg)
        char *num_string = scene->toolsettings->skgen_num_string;
        int free_template = 0;
        
        char *num_string = scene->toolsettings->skgen_num_string;
        int free_template = 0;
        
-       if (template_rigg)
-       {
-               ob = template_rigg->ob;         
+       if (template_rigg) {
+               ob = template_rigg->ob;
        }
        }
-       else
-       {
+       else {
                free_template = 1;
                ob = obedit;
                template_rigg = armatureSelectedToGraph(C, ob, ob->data);
                free_template = 1;
                ob = obedit;
                template_rigg = armatureSelectedToGraph(C, ob, ob->data);
index 5e9acc5..76af016 100644 (file)
@@ -189,8 +189,7 @@ static void gp_draw_stroke_point (bGPDspoint *points, short thickness, short dfl
                                glVertex2fv(co);
                        glEnd();
                }
                                glVertex2fv(co);
                        glEnd();
                }
-               else 
-               {
+               else {
                        /* draw filled circle as is done in circf (but without the matrix push/pops which screwed things up) */
                        GLUquadricObj *qobj = gluNewQuadric(); 
                        
                        /* draw filled circle as is done in circf (but without the matrix push/pops which screwed things up) */
                        GLUquadricObj *qobj = gluNewQuadric(); 
                        
@@ -289,8 +288,7 @@ static void gp_draw_stroke (bGPDspoint *points, int totpoints, short thickness_s
        /* tessellation code - draw stroke as series of connected quads with connection
         * edges rotated to minimise shrinking artifacts, and rounded endcaps
         */
        /* tessellation code - draw stroke as series of connected quads with connection
         * edges rotated to minimise shrinking artifacts, and rounded endcaps
         */
-       else 
-       { 
+       else {
                bGPDspoint *pt1, *pt2;
                float pm[2];
                int i;
                bGPDspoint *pt1, *pt2;
                float pm[2];
                int i;
@@ -384,8 +382,8 @@ static void gp_draw_stroke (bGPDspoint *points, int totpoints, short thickness_s
                                mt[1]= mb[1] * pthick;
                                athick= len_v2(mt);
                                dfac= pthick - (athick * 2);
                                mt[1]= mb[1] * pthick;
                                athick= len_v2(mt);
                                dfac= pthick - (athick * 2);
-                               if ( ((athick * 2.0f) < pthick) && (IS_EQF(athick, pthick)==0) )
-                               {
+
+                               if (((athick * 2.0f) < pthick) && (IS_EQF(athick, pthick)==0)) {
                                        mt[0] += (mb[0] * dfac);
                                        mt[1] += (mb[1] * dfac);
                                }       
                                        mt[0] += (mb[0] * dfac);
                                        mt[1] += (mb[1] * dfac);
                                }       
index 84d3162..535a0f9 100644 (file)
@@ -194,8 +194,7 @@ static void gp_get_3d_reference (tGPsdata *p, float vec[3])
        
        /* the reference point used depends on the owner... */
 #if 0 // XXX: disabled for now, since we can't draw relative to the owner yet
        
        /* the reference point used depends on the owner... */
 #if 0 // XXX: disabled for now, since we can't draw relative to the owner yet
-       if (p->ownerPtr.type == &RNA_Object) 
-       {
+       if (p->ownerPtr.type == &RNA_Object) {
                Object *ob= (Object *)p->ownerPtr.data;
                
                /* active Object 
                Object *ob= (Object *)p->ownerPtr.data;
                
                /* active Object 
@@ -517,10 +516,8 @@ static void gp_stroke_simplify (tGPsdata *p)
                pressure += old_points[offs].pressure * sfac; \
        }
        
                pressure += old_points[offs].pressure * sfac; \
        }
        
-       for (i = 0, j = 0; i < num_points; i++)
-       {
-               if (i - j == 3)
-               {
+       for (i = 0, j = 0; i < num_points; i++) {
+               if (i - j == 3) {
                        float co[2], pressure;
                        int mco[2];
                        
                        float co[2], pressure;
                        int mco[2];
                        
@@ -1855,8 +1852,7 @@ static int gpencil_draw_modal (bContext *C, wmOperator *op, wmEvent *event)
        /* handle mode-specific events */
        if (p->status == GP_STATUS_PAINTING) {
                /* handle painting mouse-movements? */
        /* handle mode-specific events */
        if (p->status == GP_STATUS_PAINTING) {
                /* handle painting mouse-movements? */
-               if (ELEM(event->type, MOUSEMOVE, INBETWEEN_MOUSEMOVE) || (p->flags & GP_PAINTFLAG_FIRSTRUN)) 
-               {
+               if (ELEM(event->type, MOUSEMOVE, INBETWEEN_MOUSEMOVE) || (p->flags & GP_PAINTFLAG_FIRSTRUN)) {
                        /* handle drawing event */
                        //printf("\t\tGP - add point\n");
                        gpencil_draw_apply_event(op, event);
                        /* handle drawing event */
                        //printf("\t\tGP - add point\n");
                        gpencil_draw_apply_event(op, event);
index 97248e8..1cf93ba 100644 (file)
@@ -557,24 +557,21 @@ static void ui_draw_but_CHARTAB(uiBut *but)
 
                        // Set the font to be either unicode or FO_BUILTIN_NAME 
                        wstr[0] = cs;
 
                        // Set the font to be either unicode or FO_BUILTIN_NAME 
                        wstr[0] = cs;
-                       if(strcmp(G.selfont->name, FO_BUILTIN_NAME))
-                       {
+                       if (strcmp(G.selfont->name, FO_BUILTIN_NAME)) {
                                BLI_strncpy_wchar_as_utf8((char *)ustr, (wchar_t *)wstr, sizeof(ustr));
                        }
                                BLI_strncpy_wchar_as_utf8((char *)ustr, (wchar_t *)wstr, sizeof(ustr));
                        }
-                       else
-                       {
-                               if(G.ui_international == TRUE)
-                               {
+                       else {
+                               if (G.ui_international == TRUE) {
                                        BLI_strncpy_wchar_as_utf8((char *)ustr, (wchar_t *)wstr, sizeof(ustr));
                                }
                                        BLI_strncpy_wchar_as_utf8((char *)ustr, (wchar_t *)wstr, sizeof(ustr));
                                }
-                               else
-                               {
+                               else {
                                        ustr[0] = cs;
                                        ustr[1] = 0;
                                }
                        }
 
                                        ustr[0] = cs;
                                        ustr[1] = 0;
                                }
                        }
 
-                       if((G.selfont && strcmp(G.selfont->name, FO_BUILTIN_NAME)) || (G.selfont && !strcmp(G.selfont->name, FO_BUILTIN_NAME) && G.ui_international == TRUE))
+                       if ((G.selfont && strcmp(G.selfont->name, FO_BUILTIN_NAME)) ||
+                           (G.selfont && !strcmp(G.selfont->name, FO_BUILTIN_NAME) && G.ui_international == TRUE))
                        {
                                float wid;
                                float llx, lly, llz, urx, ury, urz;
                        {
                                float wid;
                                float llx, lly, llz, urx, ury, urz;
@@ -595,8 +592,7 @@ static void ui_draw_but_CHARTAB(uiBut *but)
                                ui_rasterpos_safe(px, py, but->aspect);
                                FTF_DrawString((char *) ustr, FTF_USE_GETTEXT | FTF_INPUT_UTF8);
                        }
                                ui_rasterpos_safe(px, py, but->aspect);
                                FTF_DrawString((char *) ustr, FTF_USE_GETTEXT | FTF_INPUT_UTF8);
                        }
-                       else
-                       {
+                       else {
                                ui_rasterpos_safe(sx + butw/2, sy + buth/2, but->aspect);
                                UI_DrawString(but->font, (char *) ustr, 0);
                        }
                                ui_rasterpos_safe(sx + butw/2, sy + buth/2, but->aspect);
                                UI_DrawString(but->font, (char *) ustr, 0);
                        }
index cc30cda..0496c8c 100644 (file)
@@ -4193,8 +4193,7 @@ static int ui_do_but_CHARTAB(bContext *UNUSED(C), uiBlock *UNUSED(block), uiBut
                        if(che > G.charmax)
                                che = 0;
 
                        if(che > G.charmax)
                                che = 0;
 
-                       if(G.obedit)
-                       {
+                       if(G.obedit) {
                                do_textedit(0,0,che);
                        }
 
                                do_textedit(0,0,che);
                        }
 
@@ -4227,10 +4226,8 @@ static int ui_do_but_CHARTAB(bContext *UNUSED(C), uiBlock *UNUSED(block), uiBut
                        return WM_UI_HANDLER_BREAK;
                }
                else if(ELEM(event->type, WHEELDOWNMOUSE, PAGEDOWNKEY)) {
                        return WM_UI_HANDLER_BREAK;
                }
                else if(ELEM(event->type, WHEELDOWNMOUSE, PAGEDOWNKEY)) {
-                       for(but= block->buttons.first; but; but= but->next)
-                       {
-                               if(but->type == CHARTAB)
-                               {
+                       for(but= block->buttons.first; but; but= but->next) {
+                               if(but->type == CHARTAB) {
                                        G.charstart = G.charstart + (12*6);
                                        if(G.charstart > (0xffff - 12*6))
                                                G.charstart = 0xffff - (12*6);
                                        G.charstart = G.charstart + (12*6);
                                        if(G.charstart > (0xffff - 12*6))
                                                G.charstart = 0xffff - (12*6);
index bde2c33..552d5b0 100644 (file)
@@ -1015,8 +1015,7 @@ static void icon_draw_size(float x, float y, int icon_id, float aspect, float al
 
 static void ui_id_preview_image_render_size(bContext *C, ID *id, PreviewImage *pi, int size)
 {
 
 static void ui_id_preview_image_render_size(bContext *C, ID *id, PreviewImage *pi, int size)
 {
-       if ((pi->changed[size] ||!pi->rect[size])) /* changed only ever set by dynamic icons */
-       {
+       if ((pi->changed[size] ||!pi->rect[size])) { /* changed only ever set by dynamic icons */
                /* create the rect if necessary */
                icon_set_image(C, id, pi, size);
 
                /* create the rect if necessary */
                icon_set_image(C, id, pi, size);
 
index 70336eb..aa2d939 100644 (file)
@@ -774,8 +774,7 @@ static uiLayout *draw_modifier(uiLayout *layout, Scene *scene, Object *ob,
                }
 
                if (ob->type==OB_MESH) {
                }
 
                if (ob->type==OB_MESH) {
-                       if (modifier_couldBeCage(scene, md) && (index <= lastCageIndex))
-                       {
+                       if (modifier_couldBeCage(scene, md) && (index <= lastCageIndex)) {
                                /* -- convert to rna ? */
                                but = uiDefIconButBitI(block, TOG, eModifierMode_OnCage, 0, ICON_MESH_DATA, 0, 0, UI_UNIT_X-2, UI_UNIT_Y, &md->mode, 0.0, 0.0, 0.0, 0.0,
                                                TIP_("Apply modifier to editing cage during Editmode"));
                                /* -- convert to rna ? */
                                but = uiDefIconButBitI(block, TOG, eModifierMode_OnCage, 0, ICON_MESH_DATA, 0, 0, UI_UNIT_X-2, UI_UNIT_Y, &md->mode, 0.0, 0.0, 0.0, 0.0,
                                                TIP_("Apply modifier to editing cage during Editmode"));
index 59151cf..358cd8d 100644 (file)
@@ -514,8 +514,7 @@ static int loopcut_modal (bContext *C, wmOperator *op, wmEvent *event)
        if (event->val==KM_PRESS) {
                float value;
                
        if (event->val==KM_PRESS) {
                float value;
                
-               if (handleNumInput(&lcd->num, event))
-               {
+               if (handleNumInput(&lcd->num, event)) {
                        applyNumInput(&lcd->num, &value);
                        
                        cuts= CLAMPIS(value, 1, 32);
                        applyNumInput(&lcd->num, &value);
                        
                        cuts= CLAMPIS(value, 1, 32);
index a90edb2..b7b2033 100644 (file)
@@ -391,8 +391,7 @@ static void test_constraints (Object *owner, bPoseChannel *pchan)
                                /* if the number of points does not match the amount required by the chain length,
                                 * free the points array and request a rebind...
                                 */
                                /* if the number of points does not match the amount required by the chain length,
                                 * free the points array and request a rebind...
                                 */
-                               if ((data->points == NULL) || (data->numpoints != data->chainlen+1))
-                               {
+                               if ((data->points == NULL) || (data->numpoints != data->chainlen+1)) {
                                        /* free the points array */
                                        if (data->points) {
                                                MEM_freeN(data->points);
                                        /* free the points array */
                                        if (data->points) {
                                                MEM_freeN(data->points);
index 2945075..931896e 100644 (file)
@@ -319,13 +319,11 @@ static int make_proxy_exec (bContext *C, wmOperator *op)
        GroupObject *go;
        Scene *scene= CTX_data_scene(C);
 
        GroupObject *go;
        Scene *scene= CTX_data_scene(C);
 
-       if (gob->dup_group != NULL)
-       {
+       if (gob->dup_group != NULL) {
                go= BLI_findlink(&gob->dup_group->gobject, RNA_enum_get(op->ptr, "object"));
                ob= go->ob;
        }
                go= BLI_findlink(&gob->dup_group->gobject, RNA_enum_get(op->ptr, "object"));
                ob= go->ob;
        }
-       else
-       {
+       else {
                ob= gob;
                gob = NULL;
        }
                ob= gob;
                gob = NULL;
        }
@@ -598,8 +596,7 @@ int ED_object_parent_set(ReportList *reports, Main *bmain, Scene *scene, Object
                                
                                /* BUT, to keep the deforms, we need a modifier, and then we need to set the object that it uses */
                                // XXX currently this should only happen for meshes, curves, surfaces, and lattices - this stuff isn't available for metas yet
                                
                                /* BUT, to keep the deforms, we need a modifier, and then we need to set the object that it uses */
                                // XXX currently this should only happen for meshes, curves, surfaces, and lattices - this stuff isn't available for metas yet
-                               if (ELEM5(ob->type, OB_MESH, OB_CURVE, OB_SURF, OB_FONT, OB_LATTICE))
-                               {
+                               if (ELEM5(ob->type, OB_MESH, OB_CURVE, OB_SURF, OB_FONT, OB_LATTICE)) {
                                        ModifierData *md;
                                        
                                        switch (partype) {
                                        ModifierData *md;
                                        
                                        switch (partype) {
index 3cc7c8a..e08139e 100644 (file)
@@ -252,9 +252,8 @@ static PTCacheEdit *pe_get_current(Scene *scene, Object *ob, int create)
                                break;
                        }
                }
                                break;
                        }
                }
-               else if(pset->edittype == PE_TYPE_SOFTBODY && pid->type == PTCACHE_TYPE_SOFTBODY) {
-                       if(create && pid->cache->flag & PTCACHE_BAKED && !pid->cache->edit)
-                       {
+               else if (pset->edittype == PE_TYPE_SOFTBODY && pid->type == PTCACHE_TYPE_SOFTBODY) {
+                       if (create && pid->cache->flag & PTCACHE_BAKED && !pid->cache->edit) {
                                pset->flag |= PE_FADE_TIME;
                                // NICE TO HAVE but doesn't work: pset->brushtype = PE_BRUSH_COMB;
                                PE_create_particle_edit(scene, ob, pid->cache, NULL);
                                pset->flag |= PE_FADE_TIME;
                                // NICE TO HAVE but doesn't work: pset->brushtype = PE_BRUSH_COMB;
                                PE_create_particle_edit(scene, ob, pid->cache, NULL);
@@ -262,9 +261,8 @@ static PTCacheEdit *pe_get_current(Scene *scene, Object *ob, int create)
                        edit = pid->cache->edit;
                        break;
                }
                        edit = pid->cache->edit;
                        break;
                }
-               else if(pset->edittype == PE_TYPE_CLOTH && pid->type == PTCACHE_TYPE_CLOTH) {
-                       if(create && pid->cache->flag & PTCACHE_BAKED && !pid->cache->edit)
-                       {
+               else if (pset->edittype == PE_TYPE_CLOTH && pid->type == PTCACHE_TYPE_CLOTH) {
+                       if (create && pid->cache->flag & PTCACHE_BAKED && !pid->cache->edit) {
                                pset->flag |= PE_FADE_TIME;
                                // NICE TO HAVE but doesn't work: pset->brushtype = PE_BRUSH_COMB;
                                PE_create_particle_edit(scene, ob, pid->cache, NULL);
                                pset->flag |= PE_FADE_TIME;
                                // NICE TO HAVE but doesn't work: pset->brushtype = PE_BRUSH_COMB;
                                PE_create_particle_edit(scene, ob, pid->cache, NULL);
@@ -3632,10 +3630,10 @@ static void brush_edit_apply(bContext *C, wmOperator *op, PointerRNA *itemptr)
                                PE_update_object(scene, ob, 1);
                }
 
                                PE_update_object(scene, ob, 1);
                }
 
-               if(edit->psys)
+               if (edit->psys) {
                        WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE|NA_EDITED, ob);
                        WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE|NA_EDITED, ob);
-               else
-               {
+               }
+               else {
                        DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
                        WM_event_add_notifier(C, NC_OBJECT|ND_MODIFIER, ob);
                }
                        DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
                        WM_event_add_notifier(C, NC_OBJECT|ND_MODIFIER, ob);
                }
index d3af007..96a59ee 100644 (file)
@@ -860,8 +860,7 @@ static void fluidsim_delete_until_lastframe(FluidsimSettings *fss, const char *r
 
                curFrame++;
 
 
                curFrame++;
 
-               if((exists = BLI_exists(targetFile)))
-               {
+               if ((exists = BLI_exists(targetFile))) {
                        BLI_delete(targetFile, 0, 0);
                        BLI_delete(targetFileVel, 0, 0);
                        BLI_delete(previewFile, 0, 0);
                        BLI_delete(targetFile, 0, 0);
                        BLI_delete(targetFileVel, 0, 0);
                        BLI_delete(previewFile, 0, 0);
index 5504434..a8ad50b 100644 (file)
@@ -2907,10 +2907,13 @@ static int screen_animation_step(bContext *C, wmOperator *UNUSED(op), wmEvent *e
                else if (sad->flag & ANIMPLAY_FLAG_NO_SYNC) sync= 0;
                else sync= (scene->flag & SCE_FRAME_DROP);
                
                else if (sad->flag & ANIMPLAY_FLAG_NO_SYNC) sync= 0;
                else sync= (scene->flag & SCE_FRAME_DROP);
                
-               if((scene->audio.flag & AUDIO_SYNC) && !(sad->flag & ANIMPLAY_FLAG_REVERSE) && finite(time = sound_sync_scene(scene)))
-                       scene->r.cfra = (double)time * FPS + 0.5;
-               else
+               if ((scene->audio.flag & AUDIO_SYNC) &&
+                   (sad->flag & ANIMPLAY_FLAG_REVERSE) == FALSE &&
+                   finite(time = sound_sync_scene(scene)))
                {
                {
+                       scene->r.cfra = (double)time * FPS + 0.5;
+               }
+               else {
                        if (sync) {
                                int step = floor(wt->duration * FPS);
                                /* skip frames */
                        if (sync) {
                                int step = floor(wt->duration * FPS);
                                /* skip frames */
index b5ecff7..9c78b61 100644 (file)
@@ -1543,11 +1543,10 @@ static void do_layer_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode
                
                unode= sculpt_undo_push_node(ob, nodes[n]);
                origco=unode->co;
                
                unode= sculpt_undo_push_node(ob, nodes[n]);
                origco=unode->co;
-               if(!unode->layer_disp)
-                       {
-                               #pragma omp critical 
-                               unode->layer_disp= MEM_callocN(sizeof(float)*unode->totvert, "layer disp");
-                       }
+               if (!unode->layer_disp) {
+                       #pragma omp critical 
+                       unode->layer_disp= MEM_callocN(sizeof(float)*unode->totvert, "layer disp");
+               }
 
                layer_disp= unode->layer_disp;
 
 
                layer_disp= unode->layer_disp;
 
index f0aedae..72e9f86 100644 (file)
@@ -414,8 +414,7 @@ static void uv_sculpt_stroke_exit(bContext *C, wmOperator *op)
        if (data->timer) {
                WM_event_remove_timer(CTX_wm_manager(C), CTX_wm_window(C), data->timer);
        }
        if (data->timer) {
                WM_event_remove_timer(CTX_wm_manager(C), CTX_wm_window(C), data->timer);
        }
-       if (data->elementMap)
-       {
+       if (data->elementMap) {
                EDBM_free_uv_element_map(data->elementMap);
        }
        if (data->uv) {
                EDBM_free_uv_element_map(data->elementMap);
        }
        if (data->uv) {
index 205b206..8f6a01d 100644 (file)
@@ -345,8 +345,7 @@ static int sound_mixdown_exec(bContext *C, wmOperator *op)
        result = AUD_mixdown(scene->sound_scene, SFRA * specs.rate / FPS, (EFRA - SFRA) * specs.rate / FPS,
                                                 accuracy, filename, specs, container, codec, bitrate);
 
        result = AUD_mixdown(scene->sound_scene, SFRA * specs.rate / FPS, (EFRA - SFRA) * specs.rate / FPS,
                                                 accuracy, filename, specs, container, codec, bitrate);
 
-       if(result)
-       {
+       if (result) {
                BKE_report(op->reports, RPT_ERROR, result);
                return OPERATOR_CANCELLED;
        }
                BKE_report(op->reports, RPT_ERROR, result);
                return OPERATOR_CANCELLED;
        }
index 05de70b..f663307 100644 (file)
@@ -215,8 +215,7 @@ static FileSelect file_select(bContext* C, const rcti* rect, FileSelType select,
        if (sel.first != sel.last) select = 0;
 
        /* Do we have a valid selection and are we actually selecting */
        if (sel.first != sel.last) select = 0;
 
        /* Do we have a valid selection and are we actually selecting */
-       if ( (sel.last >= 0) && ((select == FILE_SEL_ADD) || (select == FILE_SEL_TOGGLE)) )
-       {
+       if ((sel.last >= 0) && ((select == FILE_SEL_ADD) || (select == FILE_SEL_TOGGLE))) {
                /* Check last selection, if selected, act on the file or dir */
                if (filelist_is_selected(sfile->files, sel.last, check_type)) {
                        retval = file_select_do(C, sel.last);
                /* Check last selection, if selected, act on the file or dir */
                if (filelist_is_selected(sfile->files, sel.last, check_type)) {
                        retval = file_select_do(C, sel.last);
@@ -1171,9 +1170,8 @@ int file_filename_exec(bContext *C, wmOperator *UNUSED(unused))
 {
        SpaceFile *sfile= CTX_wm_space_file(C);
        
 {
        SpaceFile *sfile= CTX_wm_space_file(C);
        
-       if(sfile->params) {
-               if (file_select_match(sfile, sfile->params->file))
-               {
+       if (sfile->params) {
+               if (file_select_match(sfile, sfile->params->file)) {
                        sfile->params->file[0] = '\0';
                        WM_event_add_notifier(C, NC_SPACE|ND_SPACE_FILE_PARAMS, NULL);
                }
                        sfile->params->file[0] = '\0';
                        WM_event_add_notifier(C, NC_SPACE|ND_SPACE_FILE_PARAMS, NULL);
                }
index 4f4ad52..4c9d2be 100644 (file)
@@ -334,8 +334,8 @@ void fsmenu_read_system(struct FSMenu* fsmenu)
                                continue;
                        
                        FSRefMakePath(&dir, path, FILE_MAX);
                                continue;
                        
                        FSRefMakePath(&dir, path, FILE_MAX);
-                       if (strcmp((char*)path, "/home") && strcmp((char*)path, "/net"))
-                       { /* /net and /home are meaningless on OSX, home folders are stored in /Users */
+                       if (strcmp((char*)path, "/home") && strcmp((char*)path, "/net")) {
+                               /* /net and /home are meaningless on OSX, home folders are stored in /Users */
                                fsmenu_insert_entry(fsmenu, FS_CATEGORY_SYSTEM, (char *)path, 1, 0);
                        }
                }
                                fsmenu_insert_entry(fsmenu, FS_CATEGORY_SYSTEM, (char *)path, 1, 0);
                        }
                }
index 7821547..9eafd45 100644 (file)
@@ -196,8 +196,8 @@ static void file_refresh(const bContext *C, ScrArea *UNUSED(sa))
        filelist_hidedot(sfile->files, params->flag & FILE_HIDE_DOT);
        filelist_setfilter(sfile->files, params->flag & FILE_FILTER ? params->filter : 0);      
        filelist_setfilter_types(sfile->files, params->filter_glob);
        filelist_hidedot(sfile->files, params->flag & FILE_HIDE_DOT);
        filelist_setfilter(sfile->files, params->flag & FILE_FILTER ? params->filter : 0);      
        filelist_setfilter_types(sfile->files, params->filter_glob);
-       if (filelist_empty(sfile->files))
-       {
+
+       if (filelist_empty(sfile->files)) {
                thumbnails_stop(sfile->files, C);
                filelist_readdir(sfile->files);
                if(params->sort!=FILE_SORT_NONE) {
                thumbnails_stop(sfile->files, C);
                filelist_readdir(sfile->files);
                if(params->sort!=FILE_SORT_NONE) {
index f1afb3c..8af16bd 100644 (file)
@@ -292,8 +292,7 @@ static void draw_fcurve_vertices (SpaceIpo *sipo, ARegion *ar, FCurve *fcu, shor
        glPointSize(UI_GetThemeValuef(TH_VERTEX_SIZE));
        
        /* draw the two handles first (if they're shown, the curve doesn't have just a single keyframe, and the curve is being edited) */
        glPointSize(UI_GetThemeValuef(TH_VERTEX_SIZE));
        
        /* draw the two handles first (if they're shown, the curve doesn't have just a single keyframe, and the curve is being edited) */
-       if (do_handles)
-       {
+       if (do_handles) {
                set_fcurve_vertex_color(fcu, 0);
                draw_fcurve_vertices_handles(fcu, sipo, v2d, 0, sel_handle_only);
                
                set_fcurve_vertex_color(fcu, 0);
                draw_fcurve_vertices_handles(fcu, sipo, v2d, 0, sel_handle_only);
                
@@ -327,8 +326,7 @@ static int draw_fcurve_handles_check(SpaceIpo *sipo, FCurve *fcu)
        {
                return 0;
        } 
        {
                return 0;
        } 
-       else 
-       {
+       else {
                return 1;
        }
 }
                return 1;
        }
 }
@@ -368,8 +366,7 @@ static void draw_fcurve_handles (SpaceIpo *sipo, FCurve *fcu)
                                fp= bezt->vec[0];
                                
                                /* only draw first handle if previous segment had handles */
                                fp= bezt->vec[0];
                                
                                /* only draw first handle if previous segment had handles */
-                               if ( (!prevbezt && (bezt->ipo==BEZT_IPO_BEZ)) || (prevbezt && (prevbezt->ipo==BEZT_IPO_BEZ)) ) 
-                               {
+                               if ((!prevbezt && (bezt->ipo==BEZT_IPO_BEZ)) || (prevbezt && (prevbezt->ipo==BEZT_IPO_BEZ))) {
                                        UI_GetThemeColor3ubv(basecol + bezt->h1, col);
                                        col[3]= drawFCurveFade(fcu) * 255;
                                        glColor4ubv((GLubyte *)col);
                                        UI_GetThemeColor3ubv(basecol + bezt->h1, col);
                                        col[3]= drawFCurveFade(fcu) * 255;
                                        glColor4ubv((GLubyte *)col);
@@ -378,8 +375,7 @@ static void draw_fcurve_handles (SpaceIpo *sipo, FCurve *fcu)
                                }
                                
                                /* only draw second handle if this segment is bezier */
                                }
                                
                                /* only draw second handle if this segment is bezier */
-                               if (bezt->ipo == BEZT_IPO_BEZ) 
-                               {
+                               if (bezt->ipo == BEZT_IPO_BEZ) {
                                        UI_GetThemeColor3ubv(basecol + bezt->h2, col);
                                        col[3]= drawFCurveFade(fcu) * 255;
                                        glColor4ubv((GLubyte *)col);
                                        UI_GetThemeColor3ubv(basecol + bezt->h2, col);
                                        col[3]= drawFCurveFade(fcu) * 255;
                                        glColor4ubv((GLubyte *)col);
index e44f1ab..bdd3497 100644 (file)
@@ -1006,14 +1006,12 @@ static void get_nearest_fcurve_verts_list (bAnimContext *ac, const int mval[2],
                                /* handles - only do them if they're visible */
                                if (fcurve_handle_sel_check(sipo, bezt1) && (fcu->totvert > 1)) {
                                        /* first handle only visible if previous segment had handles */
                                /* handles - only do them if they're visible */
                                if (fcurve_handle_sel_check(sipo, bezt1) && (fcu->totvert > 1)) {
                                        /* first handle only visible if previous segment had handles */
-                                       if ( (!prevbezt && (bezt1->ipo==BEZT_IPO_BEZ)) || (prevbezt && (prevbezt->ipo==BEZT_IPO_BEZ)) )
-                                       {
+                                       if ((!prevbezt && (bezt1->ipo==BEZT_IPO_BEZ)) || (prevbezt && (prevbezt->ipo==BEZT_IPO_BEZ))) {
                                                nearest_fcurve_vert_store(matches, v2d, fcu, bezt1, NULL, NEAREST_HANDLE_LEFT, mval);
                                        }
                                        
                                        /* second handle only visible if this segment is bezier */
                                                nearest_fcurve_vert_store(matches, v2d, fcu, bezt1, NULL, NEAREST_HANDLE_LEFT, mval);
                                        }
                                        
                                        /* second handle only visible if this segment is bezier */
-                                       if (bezt1->ipo == BEZT_IPO_BEZ) 
-                                       {
+                                       if (bezt1->ipo == BEZT_IPO_BEZ) {
                                                nearest_fcurve_vert_store(matches, v2d, fcu, bezt1, NULL, NEAREST_HANDLE_RIGHT, mval);
                                        }
                                }
                                                nearest_fcurve_vert_store(matches, v2d, fcu, bezt1, NULL, NEAREST_HANDLE_RIGHT, mval);
                                        }
                                }
index 26c56e9..07d47e6 100644 (file)
@@ -1359,11 +1359,12 @@ static short draw_sensorbuttons(Object *ob, bSensor *sens, uiBlock *block, short
                                uiDefBut(block, TEX, 1, "Max: ",                xco+width/2,yco-92,width/2, 19,
                                        ps->maxvalue, 0, MAX_NAME, 0, 0, "check for max value");
                        }
                                uiDefBut(block, TEX, 1, "Max: ",                xco+width/2,yco-92,width/2, 19,
                                        ps->maxvalue, 0, MAX_NAME, 0, 0, "check for max value");
                        }
-                       else if(ps->type == SENS_PROP_CHANGED);
-                       else
-                       {
+                       else if(ps->type == SENS_PROP_CHANGED) {
+                               /* pass */
+                       }
+                       else {
                                uiDefBut(block, TEX, 1, "Value: ",              xco+30,yco-92,width-60, 19,
                                uiDefBut(block, TEX, 1, "Value: ",              xco+30,yco-92,width-60, 19,
-                                       ps->value, 0, MAX_NAME, 0, 0, "check for value");
+                                        ps->value, 0, MAX_NAME, 0, 0, "check for value");
                        }
                        
                        yco-= ysize;
                        }
                        
                        yco-= ysize;
@@ -1511,14 +1512,12 @@ static short draw_sensorbuttons(Object *ob, bSensor *sens, uiBlock *block, short
                                &raySens->mode, 0.0, 0.0, 0, 0,
                                "Toggle collision on material or property");
                        
                                &raySens->mode, 0.0, 0.0, 0, 0,
                                "Toggle collision on material or property");
                        
-                       if (raySens->mode & SENS_COLLISION_MATERIAL)
-                       {
+                       if (raySens->mode & SENS_COLLISION_MATERIAL) {
                                uiDefBut(block, TEX, 1, "Material:", xco + 10 + 0.20 * (width-20), yco-44, 0.8*(width-20), 19,
                                        &raySens->matname, 0, MAX_NAME, 0, 0,
                                        "Only look for Objects with this material");
                        }
                                uiDefBut(block, TEX, 1, "Material:", xco + 10 + 0.20 * (width-20), yco-44, 0.8*(width-20), 19,
                                        &raySens->matname, 0, MAX_NAME, 0, 0,
                                        "Only look for Objects with this material");
                        }
-                       else
-                       {
+                       else {
                                uiDefBut(block, TEX, 1, "Property:", xco + 10 + 0.20 * (width-20), yco-44, 0.8*(width-20), 19,
                                        &raySens->propname, 0, MAX_NAME, 0, 0,
                                        "Only look for Objects with this property");
                                uiDefBut(block, TEX, 1, "Property:", xco + 10 + 0.20 * (width-20), yco-44, 0.8*(width-20), 19,
                                        &raySens->propname, 0, MAX_NAME, 0, 0,
                                        "Only look for Objects with this property");
@@ -1878,12 +1877,10 @@ static short draw_actuatorbuttons(Main *bmain, Object *ob, bActuator *act, uiBlo
                        wval = (width-100)/3;
                        if (oa->type == ACT_OBJECT_NORMAL)
                        {
                        wval = (width-100)/3;
                        if (oa->type == ACT_OBJECT_NORMAL)
                        {
-                               if ( ob->gameflag & OB_DYNAMIC )
-                               {
+                               if (ob->gameflag & OB_DYNAMIC) {
                                        ysize= 175;
                                }
                                        ysize= 175;
                                }
-                               else
-                               {
+                               else {
                                        ysize= 72;
                                }
 
                                        ysize= 72;
                                }
 
@@ -2031,12 +2028,10 @@ static short draw_actuatorbuttons(Main *bmain, Object *ob, bActuator *act, uiBlo
                                         &aa->end_reset, 0.0, 0.0, 0, 0, "Restore last frame when switching on/off, otherwise play from the start each time");
                        
                        
                                         &aa->end_reset, 0.0, 0.0, 0, 0, "Restore last frame when switching on/off, otherwise play from the start each time");
                        
                        
-                       if(aa->type == ACT_ACTION_FROM_PROP)
-                       {
+                       if(aa->type == ACT_ACTION_FROM_PROP) {
                                uiDefBut(block, TEX, 0, "Prop: ",xco+10, yco-44, width-20, 19, aa->name, 0.0, MAX_NAME, 0, 0, "Use this property to define the Action position");
                        }
                                uiDefBut(block, TEX, 0, "Prop: ",xco+10, yco-44, width-20, 19, aa->name, 0.0, MAX_NAME, 0, 0, "Use this property to define the Action position");
                        }
-                       else
-                       {
+                       else {
                                uiDefButF(block, NUM, 0, "Sta: ",xco+10, yco-44, (width-20)/2, 19, &aa->sta, 1.0, MAXFRAMEF, 0, 0, "Start frame");
                                uiDefButF(block, NUM, 0, "End: ",xco+10+(width-20)/2, yco-44, (width-20)/2, 19, &aa->end, 1.0, MAXFRAMEF, 0, 0, "End frame");
                        }
                                uiDefButF(block, NUM, 0, "Sta: ",xco+10, yco-44, (width-20)/2, 19, &aa->sta, 1.0, MAXFRAMEF, 0, 0, "Start frame");
                                uiDefButF(block, NUM, 0, "End: ",xco+10+(width-20)/2, yco-44, (width-20)/2, 19, &aa->end, 1.0, MAXFRAMEF, 0, 0, "End frame");
                        }
@@ -2048,8 +2043,7 @@ static short draw_actuatorbuttons(Main *bmain, Object *ob, bActuator *act, uiBlo
 
                        
 #ifdef __NLA_ACTION_BY_MOTION_ACTUATOR
 
                        
 #ifdef __NLA_ACTION_BY_MOTION_ACTUATOR
-                       if(aa->type == ACT_ACTION_MOTION)
-                       {
+                       if (aa->type == ACT_ACTION_MOTION) {
                                uiDefButF(block, NUM, 0, "Cycle: ",xco+30, yco-84, (width-60)/2, 19, &aa->stridelength, 0.0, 2500.0, 0, 0, "Distance covered by a single cycle of the action");
                        }
 #endif
                                uiDefButF(block, NUM, 0, "Cycle: ",xco+30, yco-84, (width-60)/2, 19, &aa->stridelength, 0.0, 2500.0, 0, 0, "Distance covered by a single cycle of the action");
                        }
 #endif
@@ -2185,8 +2179,7 @@ static short draw_actuatorbuttons(Main *bmain, Object *ob, bActuator *act, uiBlo
                                                  12.0, 0, 0, "Sets the pitch of this sound");
                                        uiDefButS(block, TOG | BIT, 0, "3D Sound", xco+10, yco-88, width-20, 19,
                                                  &sa->flag, 0.0, 1.0, 0.0, 0.0, "Plays the sound positioned in 3D space");
                                                  12.0, 0, 0, "Sets the pitch of this sound");
                                        uiDefButS(block, TOG | BIT, 0, "3D Sound", xco+10, yco-88, width-20, 19,
                                                  &sa->flag, 0.0, 1.0, 0.0, 0.0, "Plays the sound positioned in 3D space");
-                                       if(sa->flag & ACT_SND_3D_SOUND)
-                                       {
+                                       if(sa->flag & ACT_SND_3D_SOUND) {
                                                uiDefButF(block, NUM, 0, "Minimum Gain: ", xco+10, yco-110, wval, 19,
                                                          &sa->sound3D.min_gain, 0.0, 1.0, 0.0, 0.0,
                                                          "The minimum gain of the sound, no matter how far it is away");
                                                uiDefButF(block, NUM, 0, "Minimum Gain: ", xco+10, yco-110, wval, 19,
                                                          &sa->sound3D.min_gain, 0.0, 1.0, 0.0, 0.0,
                                                          "The minimum gain of the sound, no matter how far it is away");
@@ -2395,14 +2388,12 @@ static short draw_actuatorbuttons(Main *bmain, Object *ob, bActuator *act, uiBlo
                                         &coa->flag, 0.0, 0.0, 0, 0, "Set object axis along (local axis) or parallel (global axis) to the normal at hit position");
                        uiDefButBitS(block, TOG, ACT_CONST_MATERIAL, B_REDR, "M/P", xco+10, yco-84, 40, 19,
                                         &coa->flag, 0.0, 0.0, 0, 0, "Detect material instead of property");
                                         &coa->flag, 0.0, 0.0, 0, 0, "Set object axis along (local axis) or parallel (global axis) to the normal at hit position");
                        uiDefButBitS(block, TOG, ACT_CONST_MATERIAL, B_REDR, "M/P", xco+10, yco-84, 40, 19,
                                         &coa->flag, 0.0, 0.0, 0, 0, "Detect material instead of property");
-                       if (coa->flag & ACT_CONST_MATERIAL)
-                       {
+                       if (coa->flag & ACT_CONST_MATERIAL) {
                                uiDefBut(block, TEX, 1, "Material:", xco + 50, yco-84, (width-60), 19,
                                        coa->matprop, 0, MAX_NAME, 0, 0,
                                        "Ray detects only Objects with this material");
                        }
                                uiDefBut(block, TEX, 1, "Material:", xco + 50, yco-84, (width-60), 19,
                                        coa->matprop, 0, MAX_NAME, 0, 0,
                                        "Ray detects only Objects with this material");
                        }
-                       else
-                       {
+                       else {
                                uiDefBut(block, TEX, 1, "Property:", xco + 50, yco-84, (width-60), 19,
                                        coa->matprop, 0, MAX_NAME, 0, 0,
                                        "Ray detect only Objects with this property");
                                uiDefBut(block, TEX, 1, "Property:", xco + 50, yco-84, (width-60), 19,
                                        coa->matprop, 0, MAX_NAME, 0, 0,
                                        "Ray detect only Objects with this property");
@@ -2454,14 +2445,12 @@ static short draw_actuatorbuttons(Main *bmain, Object *ob, bActuator *act, uiBlo
                                         &coa->flag, 0.0, 0.0, 0, 0, "Add a horizontal spring force on slopes");
                        uiDefButBitS(block, TOG, ACT_CONST_MATERIAL, B_REDR, "M/P", xco+10, yco-84, 40, 19,
                                         &coa->flag, 0.0, 0.0, 0, 0, "Detect material instead of property");
                                         &coa->flag, 0.0, 0.0, 0, 0, "Add a horizontal spring force on slopes");
                        uiDefButBitS(block, TOG, ACT_CONST_MATERIAL, B_REDR, "M/P", xco+10, yco-84, 40, 19,
                                         &coa->flag, 0.0, 0.0, 0, 0, "Detect material instead of property");
-                       if (coa->flag & ACT_CONST_MATERIAL)
-                       {
+                       if (coa->flag & ACT_CONST_MATERIAL) {
                                uiDefBut(block, TEX, 1, "Material:", xco + 50, yco-84, (width-60), 19,
                                        coa->matprop, 0, MAX_NAME, 0, 0,
                                        "Ray detects only Objects with this material");
                        }
                                uiDefBut(block, TEX, 1, "Material:", xco + 50, yco-84, (width-60), 19,
                                        coa->matprop, 0, MAX_NAME, 0, 0,
                                        "Ray detects only Objects with this material");
                        }
-                       else
-                       {
+                       else {
                                uiDefBut(block, TEX, 1, "Property:", xco + 50, yco-84, (width-60), 19,
                                        coa->matprop, 0, MAX_NAME, 0, 0,
                                        "Ray detect only Objects with this property");
                                uiDefBut(block, TEX, 1, "Property:", xco + 50, yco-84, (width-60), 19,
                                        coa->matprop, 0, MAX_NAME, 0, 0,
                                        "Ray detect only Objects with this property");
@@ -2548,9 +2537,8 @@ static short draw_actuatorbuttons(Main *bmain, Object *ob, bActuator *act, uiBlo
                  break; 
        case ACT_GAME:
                {
                  break; 
        case ACT_GAME:
                {
-                       gma = act->data; 
-                       if (gma->type == ACT_GAME_LOAD)
-                       {
+                       gma = act->data;
+                       if (gma->type == ACT_GAME_LOAD) {
                                //ysize = 68;
                                ysize = 48;
                                glRects(xco, yco-ysize, xco+width, yco); 
                                //ysize = 68;
                                ysize = 48;
                                glRects(xco, yco-ysize, xco+width, yco); 
@@ -2807,15 +2795,14 @@ static short draw_actuatorbuttons(Main *bmain, Object *ob, bActuator *act, uiBlo
                        &ma->bodyType, 0.0, 0.0, 0, 0,
                        "Toggle message type: either Text or a PropertyName");
 
                        &ma->bodyType, 0.0, 0.0, 0, 0,
                        "Toggle message type: either Text or a PropertyName");
 
-               if (ma->bodyType == ACT_MESG_MESG)
-               {
+               if (ma->bodyType == ACT_MESG_MESG) {
                        /* line 3: Message Body */
                        uiDefBut(block, TEX, 1, "Body: ",
                        (xco+10+(0.20*(width-20))),(yco-(myline++*24)),(0.8*(width-20)),19,
                        &ma->body, 0, MAX_NAME, 0, 0,
                        "Optional message body Text");
                        /* line 3: Message Body */
                        uiDefBut(block, TEX, 1, "Body: ",
                        (xco+10+(0.20*(width-20))),(yco-(myline++*24)),(0.8*(width-20)),19,
                        &ma->body, 0, MAX_NAME, 0, 0,
                        "Optional message body Text");
-               } else
-               {
+               }
+               else {
                        /* line 3: Property body (set by property) */
                        uiDefBut(block, TEX, 1, "Propname: ",
                        (xco+10+(0.20*(width-20))),(yco-(myline++*24)),(0.8*(width-20)),19,
                        /* line 3: Property body (set by property) */
                        uiDefBut(block, TEX, 1, "Propname: ",
                        (xco+10+(0.20*(width-20))),(yco-(myline++*24)),(0.8*(width-20)),19,
@@ -2829,8 +2816,7 @@ static short draw_actuatorbuttons(Main *bmain, Object *ob, bActuator *act, uiBlo
                tdfa = act->data;
 
                ysize = 50;
                tdfa = act->data;
 
                ysize = 50;
-               if(tdfa->type == ACT_2DFILTER_CUSTOMFILTER)
-               {
+               if (tdfa->type == ACT_2DFILTER_CUSTOMFILTER) {
                        ysize +=20;
                }
                glRects( xco, yco-ysize, xco+width, yco ); 
                        ysize +=20;
                }
                glRects( xco, yco-ysize, xco+width, yco ); 
@@ -2839,13 +2825,11 @@ static short draw_actuatorbuttons(Main *bmain, Object *ob, bActuator *act, uiBlo
                switch(tdfa->type)
                {
                        case ACT_2DFILTER_MOTIONBLUR:
                switch(tdfa->type)
                {
                        case ACT_2DFILTER_MOTIONBLUR:
-                               if(!tdfa->flag)
-                               {
+                               if (!tdfa->flag) {
                                        uiDefButS(block, TOG, B_REDR, "D",      xco+30,yco-44,19, 19, &tdfa->flag, 0.0, 0.0, 0.0, 0.0, "Disable Motion Blur");
                                        uiDefButF(block, NUM, B_REDR, "Value:", xco+52,yco-44,width-82,19,&tdfa->float_arg,0.0,1.0,0.0,0.0,"Set motion blur value");
                                }
                                        uiDefButS(block, TOG, B_REDR, "D",      xco+30,yco-44,19, 19, &tdfa->flag, 0.0, 0.0, 0.0, 0.0, "Disable Motion Blur");
                                        uiDefButF(block, NUM, B_REDR, "Value:", xco+52,yco-44,width-82,19,&tdfa->float_arg,0.0,1.0,0.0,0.0,"Set motion blur value");
                                }
-                               else
-                               {
+                               else {
                                        uiDefButS(block, TOG, B_REDR, "Disabled",       xco+30,yco-44,width-60, 19, &tdfa->flag, 0.0, 0.0, 0.0, 0.0, "Enable Motion Blur");
                                }
                                break;
                                        uiDefButS(block, TOG, B_REDR, "Disabled",       xco+30,yco-44,width-60, 19, &tdfa->flag, 0.0, 0.0, 0.0, 0.0, "Enable Motion Blur");
                                }
                                break;
@@ -4187,11 +4171,11 @@ static void draw_actuator_property(uiLayout *layout, PointerRNA *ptr)
                case ACT_PROP_COPY:
                        row = uiLayoutRow(layout, 0);
                        uiItemR(row, ptr, "object", 0, NULL, ICON_NONE);
                case ACT_PROP_COPY:
                        row = uiLayoutRow(layout, 0);
                        uiItemR(row, ptr, "object", 0, NULL, ICON_NONE);
-                       if(ob_from){
+                       if (ob_from) {
                                RNA_pointer_create((ID *)ob_from, &RNA_GameObjectSettings, ob_from, &obj_settings_ptr);
                                uiItemPointerR(row, ptr, "object_property", &obj_settings_ptr, "properties", NULL, ICON_NONE);
                                RNA_pointer_create((ID *)ob_from, &RNA_GameObjectSettings, ob_from, &obj_settings_ptr);
                                uiItemPointerR(row, ptr, "object_property", &obj_settings_ptr, "properties", NULL, ICON_NONE);
-                       }else
-                       {
+                       }
+                       else {
                                sub= uiLayoutRow(row, 0);
                                uiLayoutSetActive(sub, 0);
                                uiItemR(sub, ptr, "object_property", 0, NULL, ICON_NONE);
                                sub= uiLayoutRow(row, 0);
                                uiLayoutSetActive(sub, 0);
                                uiItemR(sub, ptr, "object_property", 0, NULL, ICON_NONE);
@@ -4325,8 +4309,7 @@ static void draw_actuator_sound(uiLayout *layout, PointerRNA *ptr, bContext *C)
        uiLayout *row, *col;
 
        uiTemplateID(layout, C, ptr, "sound", NULL, "SOUND_OT_open", NULL);
        uiLayout *row, *col;
 
        uiTemplateID(layout, C, ptr, "sound", NULL, "SOUND_OT_open", NULL);
-       if (!RNA_pointer_get(ptr, "sound").data)
-       {
+       if (!RNA_pointer_get(ptr, "sound").data) {
                uiItemL(layout, "Select a sound from the list or load a new one", ICON_NONE);
                return;
        }
                uiItemL(layout, "Select a sound from the list or load a new one", ICON_NONE);
                return;
        }
@@ -4402,21 +4385,18 @@ static void draw_actuator_steering(uiLayout *layout, PointerRNA *ptr)
        uiItemR(col, ptr, "facing", 0, NULL, 0);
        col = uiLayoutColumn(row, 0);
        uiItemR(col, ptr, "facing_axis", 0, NULL, 0);
        uiItemR(col, ptr, "facing", 0, NULL, 0);
        col = uiLayoutColumn(row, 0);
        uiItemR(col, ptr, "facing_axis", 0, NULL, 0);
-       if (!RNA_boolean_get(ptr, "facing"))
-       {
+       if (!RNA_boolean_get(ptr, "facing")) {
                uiLayoutSetActive(col, 0);
        }
        col = uiLayoutColumn(row, 0);
        uiItemR(col, ptr, "normal_up", 0, NULL, 0);
                uiLayoutSetActive(col, 0);
        }
        col = uiLayoutColumn(row, 0);
        uiItemR(col, ptr, "normal_up", 0, NULL, 0);
-       if (!RNA_pointer_get(ptr, "navmesh").data)
-       {
+       if (!RNA_pointer_get(ptr, "navmesh").data) {
                uiLayoutSetActive(col, 0);
        }
 
        row = uiLayoutRow(layout, 0);
        uiItemR(row, ptr, "self_terminated", 0, NULL, 0);
                uiLayoutSetActive(col, 0);
        }
 
        row = uiLayoutRow(layout, 0);
        uiItemR(row, ptr, "self_terminated", 0, NULL, 0);
-       if (RNA_enum_get(ptr, "mode")==ACT_STEERING_PATHFOLLOWING)
-       {
+       if (RNA_enum_get(ptr, "mode")==ACT_STEERING_PATHFOLLOWING) {
                uiItemR(row, ptr, "update_period", 0, NULL, 0); 
                row = uiLayoutRow(layout, 0);
        }
                uiItemR(row, ptr, "update_period", 0, NULL, 0); 
                row = uiLayoutRow(layout, 0);
        }
@@ -5040,8 +5020,7 @@ void logic_buttons(bContext *C, ARegion *ar)
                                        uiDefIconButBitS(block, ICONTOG, SENS_SHOW, B_REDR, ICON_RIGHTARROW, (short)(xco+width-22), yco, 22, UI_UNIT_Y, &sens->flag, 0, 0, 0, 0, "Sensor settings");
 
                                        ycoo= yco;
                                        uiDefIconButBitS(block, ICONTOG, SENS_SHOW, B_REDR, ICON_RIGHTARROW, (short)(xco+width-22), yco, 22, UI_UNIT_Y, &sens->flag, 0, 0, 0, 0, "Sensor settings");
 
                                        ycoo= yco;
-                                       if(sens->flag & SENS_SHOW)
-                                       {
+                                       if (sens->flag & SENS_SHOW) {
                                                uiDefButS(block, MENU, B_CHANGE_SENS, sensor_pup(),     (short)(xco+22), yco, 80, UI_UNIT_Y, &sens->type, 0, 0, 0, 0, "Sensor type");
                                                but= uiDefBut(block, TEX, 1, "", (short)(xco+102), yco, (short)(width-(pin?146:124)), UI_UNIT_Y, sens->name, 0, MAX_NAME, 0, 0, "Sensor name");
                                                uiButSetFunc(but, make_unique_prop_names_cb, sens->name, (void*) 0);
                                                uiDefButS(block, MENU, B_CHANGE_SENS, sensor_pup(),     (short)(xco+22), yco, 80, UI_UNIT_Y, &sens->type, 0, 0, 0, 0, "Sensor type");
                                                but= uiDefBut(block, TEX, 1, "", (short)(xco+102), yco, (short)(width-(pin?146:124)), UI_UNIT_Y, sens->name, 0, MAX_NAME, 0, 0, "Sensor name");
                                                uiButSetFunc(but, make_unique_prop_names_cb, sens->name, (void*) 0);
index 0253f04..f94918e 100644 (file)
@@ -692,8 +692,7 @@ static void draw_nla_channel_list_gl (bAnimContext *ac, ListBase *anim_data, Vie
                                                
                                        /* if this track is active and we're tweaking it, don't draw these toggles */
                                        // TODO: need a special macro for this...
                                                
                                        /* if this track is active and we're tweaking it, don't draw these toggles */
                                        // TODO: need a special macro for this...
-                                       if ( ((nlt->flag & NLATRACK_ACTIVE) && (nlt->flag & NLATRACK_DISABLED)) == 0 ) 
-                                       {
+                                       if (((nlt->flag & NLATRACK_ACTIVE) && (nlt->flag & NLATRACK_DISABLED)) == 0) {
                                                if (nlt->flag & NLATRACK_MUTED)
                                                        mute = ICON_MUTE_IPO_ON;
                                                else    
                                                if (nlt->flag & NLATRACK_MUTED)
                                                        mute = ICON_MUTE_IPO_ON;
                                                else    
index a142119..c0e9b7a 100644 (file)
@@ -1282,8 +1282,7 @@ static int nlaedit_swap_exec (bContext *C, wmOperator *op)
                if ((nlt->strips.first == nlt->strips.last) && (nlt->strips.first != NULL)) {
                        NlaStrip *mstrip = (NlaStrip *)nlt->strips.first;
                        
                if ((nlt->strips.first == nlt->strips.last) && (nlt->strips.first != NULL)) {
                        NlaStrip *mstrip = (NlaStrip *)nlt->strips.first;
                        
-                       if ((mstrip->flag & NLASTRIP_FLAG_TEMP_META) && (BLI_countlist(&mstrip->strips) == 2)) 
-                       {
+                       if ((mstrip->flag & NLASTRIP_FLAG_TEMP_META) && (BLI_countlist(&mstrip->strips) == 2)) {
                                /* remove this temp meta, so that we can see the strips inside */
                                BKE_nlastrips_clear_metas(&nlt->strips, 0, 1);
                        }
                                /* remove this temp meta, so that we can see the strips inside */
                                BKE_nlastrips_clear_metas(&nlt->strips, 0, 1);
                        }
index 1d8cbec..a423322 100644 (file)
@@ -3389,8 +3389,7 @@ static int node_add_file_exec(bContext *C, wmOperator *op)
        ntemp.type = -1;
 
        /* check input variables */
        ntemp.type = -1;
 
        /* check input variables */
-       if (RNA_struct_property_is_set(op->ptr, "filepath"))
-       {
+       if (RNA_struct_property_is_set(op->ptr, "filepath")) {
                char path[FILE_MAX];
                RNA_string_get(op->ptr, "filepath", path);
 
                char path[FILE_MAX];
                RNA_string_get(op->ptr, "filepath", path);
 
index f740a3c..e50d1ae 100644 (file)
@@ -171,8 +171,7 @@ static void drawseqwave(Scene *scene, Sequence *seq, float x1, float y1, float x
         * x2 the end x value, same for y1 and y2
         * stepsize is width of a pixel.
         */
         * x2 the end x value, same for y1 and y2
         * stepsize is width of a pixel.
         */
-       if(seq->flag & SEQ_AUDIO_DRAW_WAVEFORM)
-       {
+       if(seq->flag & SEQ_AUDIO_DRAW_WAVEFORM) {
                int i, j, pos;
                int length = floor((x2-x1)/stepsize)+1;
                float ymid = (y1+y2)/2;
                int i, j, pos;
                int length = floor((x2-x1)/stepsize)+1;
                float ymid = (y1+y2)/2;
index 1975e4c..9fed3db 100644 (file)
@@ -1132,8 +1132,8 @@ static int text_convert_whitespace_exec(bContext *C, wmOperator *op)
                tmp = tmp->next;
        }
        
                tmp = tmp->next;
        }
        
-       if(type == TO_TABS) // Converting to tabs
-       {       //start over from the beginning
+       if (type == TO_TABS) { // Converting to tabs
+               //start over from the beginning
                tmp = text->lines.first;
                
                while(tmp) {
                tmp = text->lines.first;
                
                while(tmp) {
index efe7446..88bd6b9 100644 (file)
@@ -355,9 +355,10 @@ static short UNUSED_FUNCTION(do_texttools)(SpaceText *st, char ascii, unsigned s
                }
        }
 
                }
        }
 
-       if(draw)
-               {}; // XXX redraw_alltext();
-       
+       if (draw) {
+               // XXX redraw_alltext();
+       }
+
        return swallow;
 }
 
        return swallow;
 }
 
@@ -540,8 +541,9 @@ static short UNUSED_FUNCTION(do_textmarkers)(SpaceText *st, char ascii, unsigned
                }
        }
        
                }
        }
        
-       if(draw)
-               {}; // XXX redraw_alltext();
+       if (draw) {
+               // XXX redraw_alltext();
+       }
        
        return swallow;
 }
        
        return swallow;
 }
index 2596ba3..0cc5d87 100644 (file)
@@ -4493,8 +4493,7 @@ static void draw_new_particle_system(Scene *scene, View3D *v3d, RegionView3D *rv
                                        drawn = 1;
                                }
                        }
                                        drawn = 1;
                                }
                        }
-                       else
-                       {
+                       else {
                                state.time=cfra;
                                if (psys_get_particle_state(&sim,a,&state,0)) {
                                        float pixsize;
                                state.time=cfra;
                                if (psys_get_particle_state(&sim,a,&state,0)) {
                                        float pixsize;
@@ -6769,12 +6768,10 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, int flag)
                SmokeModifierData *smd = (SmokeModifierData *)md;
 
                // draw collision objects
                SmokeModifierData *smd = (SmokeModifierData *)md;
 
                // draw collision objects
-               if ((smd->type & MOD_SMOKE_TYPE_COLL) && smd->coll)
-               {
+               if ((smd->type & MOD_SMOKE_TYPE_COLL) && smd->coll) {
 #if 0
                        SmokeCollSettings *scs = smd->coll;
 #if 0
                        SmokeCollSettings *scs = smd->coll;
-                       if (scs->points)
-                       {
+                       if (scs->points) {
                                size_t i;
 
                                glLoadMatrixf(rv3d->viewmat);
                                size_t i;
 
                                glLoadMatrixf(rv3d->viewmat);
@@ -6805,8 +6802,7 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, int flag)
                }
 
                // only draw domains
                }
 
                // only draw domains
-               if (smd->domain && smd->domain->fluid)
-               {
+               if (smd->domain && smd->domain->fluid) {
                        if (CFRA < smd->domain->point_cache[0]->startframe)
                                ; /* don't show smoke before simulation starts, this could be made an option in the future */
                        else if (!smd->domain->wt || !(smd->domain->viewsettings & MOD_SMOKE_VIEW_SHOWBIG))
                        if (CFRA < smd->domain->point_cache[0]->startframe)
                                ; /* don't show smoke before simulation starts, this could be made an option in the future */
                        else if (!smd->domain->wt || !(smd->domain->viewsettings & MOD_SMOKE_VIEW_SHOWBIG))
@@ -6842,8 +6838,7 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, int flag)
                                        float tmp[3];
                                        int index = smoke_get_index(x, smd->domain->res[0], y, smd->domain->res[1], z);
 
                                        float tmp[3];
                                        int index = smoke_get_index(x, smd->domain->res[0], y, smd->domain->res[1], z);
 
-                                       if (density[index] > FLT_EPSILON)
-                                       {
+                                       if (density[index] > FLT_EPSILON) {
                                                float color[3];
                                                copy_v3_v3(tmp, smd->domain->p0);
                                                tmp[0] += smd->domain->dx * x + smd->domain->dx * 0.5;
                                                float color[3];
                                                copy_v3_v3(tmp, smd->domain->p0);
                                                tmp[0] += smd->domain->dx * x + smd->domain->dx * 0.5;
@@ -6864,8 +6859,7 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, int flag)
                                if (col) cpack(col);
 #endif
                        }
                                if (col) cpack(col);
 #endif
                        }
-                       else if (smd->domain->wt && (smd->domain->viewsettings & MOD_SMOKE_VIEW_SHOWBIG))
-                       {
+                       else if (smd->domain->wt && (smd->domain->viewsettings & MOD_SMOKE_VIEW_SHOWBIG)) {
                                smd->domain->tex = NULL;
                                GPU_create_smoke(smd, 1);
                                draw_volume(ar, smd->domain->tex,
                                smd->domain->tex = NULL;
                                GPU_create_smoke(smd, 1);
                                draw_volume(ar, smd->domain->tex,
@@ -6878,12 +6872,10 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, int flag)
        }
 
        if ((v3d->flag2 & V3D_RENDER_OVERRIDE)==0) {
        }
 
        if ((v3d->flag2 & V3D_RENDER_OVERRIDE)==0) {
-
                bConstraint *con;
                bConstraint *con;
-               for (con=ob->constraints.first; con; con= con->next)
-               {
-                       if (con->type==CONSTRAINT_TYPE_RIGIDBODYJOINT)
-                       {
+
+               for (con=ob->constraints.first; con; con= con->next) {
+                       if (con->type==CONSTRAINT_TYPE_RIGIDBODYJOINT) {
                                bRigidBodyJointConstraint *data = (bRigidBodyJointConstraint*)con->data;
                                if (data->flag&CONSTRAINT_DRAW_PIVOT)
                                        drawRBpivot(data);
                                bRigidBodyJointConstraint *data = (bRigidBodyJointConstraint*)con->data;
                                if (data->flag&CONSTRAINT_DRAW_PIVOT)
                                        drawRBpivot(data);
@@ -6907,7 +6899,9 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, int flag)
                        if (dtx & OB_BOUNDBOX) {
                                draw_bounding_volume(scene, ob, ob->boundtype);
                        }
                        if (dtx & OB_BOUNDBOX) {
                                draw_bounding_volume(scene, ob, ob->boundtype);
                        }
-                       if (dtx & OB_TEXSPACE) drawtexspace(ob);
+                       if (dtx & OB_TEXSPACE) {
+                               drawtexspace(ob);
+                       }
                        if (dtx & OB_DRAWNAME) {
                                /* patch for several 3d cards (IBM mostly) that crash on glSelect with text drawing */
                                /* but, we also dont draw names for sets or duplicators */
                        if (dtx & OB_DRAWNAME) {
                                /* patch for several 3d cards (IBM mostly) that crash on glSelect with text drawing */
                                /* but, we also dont draw names for sets or duplicators */
@@ -6922,13 +6916,16 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, int flag)
                                }
                        }
                        /*if (dtx & OB_DRAWIMAGE) drawDispListwire(&ob->disp);*/
                                }
                        }
                        /*if (dtx & OB_DRAWIMAGE) drawDispListwire(&ob->disp);*/
-                       if ((dtx & OB_DRAWWIRE) && dt>=OB_SOLID) drawWireExtra(scene, rv3d, ob);
+                       if ((dtx & OB_DRAWWIRE) && dt>=OB_SOLID) {
+                               drawWireExtra(scene, rv3d, ob);
+                       }
                }
        }
 
        if (dt<=OB_SOLID && (v3d->flag2 & V3D_RENDER_OVERRIDE)==0) {
                if ((ob->gameflag & OB_DYNAMIC) ||
                }
        }
 
        if (dt<=OB_SOLID && (v3d->flag2 & V3D_RENDER_OVERRIDE)==0) {
                if ((ob->gameflag & OB_DYNAMIC) ||
-                       ((ob->gameflag & OB_BOUNDS) && (ob->boundtype == OB_BOUND_SPHERE))) {
+                   ((ob->gameflag & OB_BOUNDS) && (ob->boundtype == OB_BOUND_SPHERE)))
+               {
                        float imat[4][4], vec[3]= {0.0f, 0.0f, 0.0f};
 
                        invert_m4_m4(imat, rv3d->viewmatob);
                        float imat[4][4], vec[3]= {0.0f, 0.0f, 0.0f};
 
                        invert_m4_m4(imat, rv3d->viewmatob);
@@ -6945,11 +6942,16 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, int flag)
 
        glLoadMatrixf(rv3d->viewmat);
 
 
        glLoadMatrixf(rv3d->viewmat);
 
-       if (zbufoff) glDisable(GL_DEPTH_TEST);
+       if (zbufoff) {
+               glDisable(GL_DEPTH_TEST);
+       }
 
 
-       if (warning_recursive) return;
-       if (base->flag & OB_FROMDUPLI) return;
-       if (v3d->flag2 & V3D_RENDER_OVERRIDE) return;
+       if ((warning_recursive) ||
+           (base->flag & OB_FROMDUPLI) ||
+           (v3d->flag2 & V3D_RENDER_OVERRIDE))
+       {
+               return;
+       }
 
        /* object centers, need to be drawn in viewmat space for speed, but OK for picking select */
        if (!is_obact || !(ob->mode & (OB_MODE_VERTEX_PAINT|OB_MODE_WEIGHT_PAINT|OB_MODE_TEXTURE_PAINT))) {
 
        /* object centers, need to be drawn in viewmat space for speed, but OK for picking select */
        if (!is_obact || !(ob->mode & (OB_MODE_VERTEX_PAINT|OB_MODE_WEIGHT_PAINT|OB_MODE_TEXTURE_PAINT))) {
index b36ce66..52f432c 100644 (file)
@@ -339,8 +339,7 @@ void draw_volume(ARegion *ar, GPUTexture *tex, float *min, float *max, int res[3
        // printf("i: %d\n", i);
        // printf("point %f, %f, %f\n", cv[i][0], cv[i][1], cv[i][2]);
 
        // printf("i: %d\n", i);
        // printf("point %f, %f, %f\n", cv[i][0], cv[i][1], cv[i][2]);
 
-       if (GL_TRUE == glewIsSupported("GL_ARB_fragment_program"))
-       {
+       if (GL_TRUE == glewIsSupported("GL_ARB_fragment_program")) {
                glEnable(GL_FRAGMENT_PROGRAM_ARB);
                glGenProgramsARB(1, &prog);
 
                glEnable(GL_FRAGMENT_PROGRAM_ARB);
                glGenProgramsARB(1, &prog);
 
@@ -406,12 +405,9 @@ void draw_volume(ARegion *ar, GPUTexture *tex, float *min, float *max, int res[3
                        copy_v3_v3(p0, points);
 
                        // sort points to get a convex polygon
                        copy_v3_v3(p0, points);
 
                        // sort points to get a convex polygon
-                       for (i = 1; i < numpoints - 1; i++)
-                       {
-                               for (j = i + 1; j < numpoints; j++)
-                               {
-                                       if (!convex(p0, viewnormal, &points[j * 3], &points[i * 3]))
-                                       {
+                       for (i = 1; i < numpoints - 1; i++) {
+                               for (j = i + 1; j < numpoints; j++) {
+                                       if (!convex(p0, viewnormal, &points[j * 3], &points[i * 3])) {
                                                float tmp2[3];
                                                copy_v3_v3(tmp2, &points[j * 3]);
                                                copy_v3_v3(&points[j * 3], &points[i * 3]);
                                                float tmp2[3];
                                                copy_v3_v3(tmp2, &points[j * 3]);
                                                copy_v3_v3(&points[j * 3], &points[i * 3]);
@@ -441,8 +437,7 @@ void draw_volume(ARegion *ar, GPUTexture *tex, float *min, float *max, int res[3
                GPU_texture_unbind(tex_shadow);
        GPU_texture_unbind(tex);
 
                GPU_texture_unbind(tex_shadow);
        GPU_texture_unbind(tex);
 
-       if (GLEW_ARB_fragment_program)
-       {
+       if (GLEW_ARB_fragment_program) {
                glDisable(GL_FRAGMENT_PROGRAM_ARB);
                glDeleteProgramsARB(1, &prog);
        }
                glDisable(GL_FRAGMENT_PROGRAM_ARB);
                glDeleteProgramsARB(1, &prog);
        }
@@ -450,10 +445,11 @@ void draw_volume(ARegion *ar, GPUTexture *tex, float *min, float *max, int res[3
 
        MEM_freeN(points);
 
 
        MEM_freeN(points);
 
-       if (!gl_blend)
+       if (!gl_blend) {
                glDisable(GL_BLEND);
                glDisable(GL_BLEND);
-       if (gl_depth)
-       {
+       }
+
+       if (gl_depth) {
                glEnable(GL_DEPTH_TEST);
                glDepthMask(GL_TRUE);   
        }
                glEnable(GL_DEPTH_TEST);
                glDepthMask(GL_TRUE);   
        }
index 8c69026..979e382 100644 (file)
@@ -1827,8 +1827,7 @@ int transformEnd(bContext *C, TransInfo *t)
                        exit_code = OPERATOR_CANCELLED;
                        restoreTransObjects(t); // calls recalcData()
                }
                        exit_code = OPERATOR_CANCELLED;
                        restoreTransObjects(t); // calls recalcData()
                }
-               else
-               {
+               else {
                        exit_code = OPERATOR_FINISHED;
                }
 
                        exit_code = OPERATOR_FINISHED;
                }
 
@@ -2447,8 +2446,7 @@ int handleEventShear(TransInfo *t, wmEvent *event)
                        initMouseInputMode(t, &t->mouse, INPUT_VERTICAL_ABSOLUTE);
                        t->customData = (void*)1;
                }
                        initMouseInputMode(t, &t->mouse, INPUT_VERTICAL_ABSOLUTE);
                        t->customData = (void*)1;
                }
-               else
-               {
+               else {
                        initMouseInputMode(t, &t->mouse, INPUT_HORIZONTAL_ABSOLUTE);
                        t->customData = NULL;
                }
                        initMouseInputMode(t, &t->mouse, INPUT_HORIZONTAL_ABSOLUTE);
                        t->customData = NULL;
                }
@@ -2732,8 +2730,7 @@ int Resize(TransInfo *t, const int mval[2])
        {
                ratio = 1.0f - ((t->imval[0] - mval[0]) + (t->imval[1] - mval[1]))/100.0f;
        }
        {
                ratio = 1.0f - ((t->imval[0] - mval[0]) + (t->imval[1] - mval[1]))/100.0f;
        }
-       else
-       {
+       else {
                ratio = t->values[0];
        }
        
                ratio = t->values[0];
        }
        
@@ -3451,10 +3448,8 @@ static void applyTranslation(TransInfo *t, float vec[3])
                        continue;
                
                /* handle snapping rotation before doing the translation */
                        continue;
                
                /* handle snapping rotation before doing the translation */
-               if (usingSnappingNormal(t))
-               {
-                       if (validSnappingNormal(t))
-                       {
+               if (usingSnappingNormal(t)) {
+                       if (validSnappingNormal(t)) {
                                float *original_normal = td->axismtx[2];
                                float axis[3];
                                float quat[4];
                                float *original_normal = td->axismtx[2];
                                float axis[3];
                                float quat[4];
@@ -3470,8 +3465,7 @@ static void applyTranslation(TransInfo *t, float vec[3])
                                
                                ElementRotation(t, td, mat, V3D_LOCAL);
                        }
                                
                                ElementRotation(t, td, mat, V3D_LOCAL);
                        }
-                       else
-                       {
+                       else {
                                float mat[3][3];
                                
                                unit_m3(mat);
                                float mat[3][3];
                                
                                unit_m3(mat);
@@ -4174,12 +4168,10 @@ int BoneSize(TransInfo *t, const int mval[2])
        
        // TRANSFORM_FIX_ME MOVE TO MOUSE INPUT
        /* for manipulator, center handle, the scaling can't be done relative to center */
        
        // TRANSFORM_FIX_ME MOVE TO MOUSE INPUT
        /* for manipulator, center handle, the scaling can't be done relative to center */
-       if( (t->flag & T_USES_MANIPULATOR) && t->con.mode==0)
-       {
+       if ((t->flag & T_USES_MANIPULATOR) && t->con.mode==0) {
                ratio = 1.0f - ((t->imval[0] - mval[0]) + (t->imval[1] - mval[1]))/100.0f;
        }
                ratio = 1.0f - ((t->imval[0] - mval[0]) + (t->imval[1] - mval[1]))/100.0f;
        }
-       else
-       {
+       else {
                ratio = t->values[0];
        }
        
                ratio = t->values[0];
        }
        
@@ -5103,8 +5095,7 @@ int Mirror(TransInfo *t, const int UNUSED(mval[2]))
 
                ED_area_headerprint(t->sa, str);
        }
 
                ED_area_headerprint(t->sa, str);
        }
-       else
-       {
+       else {
                size[0] = size[1] = size[2] = 1;
 
                size_to_mat3( mat,size);
                size[0] = size[1] = size[2] = 1;
 
                size_to_mat3( mat,size);
index a0e4c58..1292a05 100644 (file)
@@ -721,8 +721,7 @@ void drawPropCircle(const struct bContext *C, TransInfo *t)
                        copy_m4_m4(tmat, rv3d->viewmat);
                        invert_m4_m4(imat, tmat);
                }
                        copy_m4_m4(tmat, rv3d->viewmat);
                        invert_m4_m4(imat, tmat);
                }
-               else
-               {
+               else {
                        unit_m4(tmat);
                        unit_m4(imat);
                }
                        unit_m4(tmat);
                        unit_m4(imat);
                }
index 4e51462..ed01de8 100644 (file)
@@ -721,8 +721,7 @@ static void bone_children_clear_transflag(int mode, short around, ListBase *lb)
                {
                        bone->flag |= BONE_TRANSFORM_CHILD;
                }
                {
                        bone->flag |= BONE_TRANSFORM_CHILD;
                }
-               else
-               {
+               else {
                        bone->flag &= ~BONE_TRANSFORM;
                }
 
                        bone->flag &= ~BONE_TRANSFORM;
                }
 
@@ -1132,8 +1131,7 @@ static void createTransArmatureVerts(TransInfo *t)
                                if (ebo->flag & BONE_SELECTED)
                                        t->total++;
                        }
                                if (ebo->flag & BONE_SELECTED)
                                        t->total++;
                        }
-                       else
-                       {
+                       else {
                                if (ebo->flag & BONE_TIPSEL)
                                        t->total++;
                                if (ebo->flag & BONE_ROOTSEL)
                                if (ebo->flag & BONE_TIPSEL)
                                        t->total++;
                                if (ebo->flag & BONE_ROOTSEL)
@@ -1201,8 +1199,7 @@ static void createTransArmatureVerts(TransInfo *t)
                                                td->val= &ebo->dist;
                                                td->ival= ebo->dist;
                                        }
                                                td->val= &ebo->dist;
                                                td->ival= ebo->dist;
                                        }
-                                       else
-                                       {
+                                       else {
                                                // abusive storage of scale in the loc pointer :)
                                                td->loc= &ebo->xwidth;
                                                copy_v3_v3(td->iloc, td->loc);
                                                // abusive storage of scale in the loc pointer :)
                                                td->loc= &ebo->xwidth;
                                                copy_v3_v3(td->iloc, td->loc);
@@ -1243,8 +1240,7 @@ static void createTransArmatureVerts(TransInfo *t)
                                        td++;
                                }
                        }
                                        td++;
                                }
                        }
-                       else
-                       {
+                       else {
                                if (ebo->flag & BONE_TIPSEL)
                                {
                                        copy_v3_v3(td->iloc, ebo->tail);
                                if (ebo->flag & BONE_TIPSEL)
                                {
                                        copy_v3_v3(td->iloc, ebo->tail);
index 47989f7..f3cede7 100644 (file)
@@ -797,8 +797,7 @@ static void recalcData_view3d(TransInfo *t)
                                                        rotation_between_vecs_to_quat(qrot, td->axismtx[1], vec);
                                                        mul_qt_v3(qrot, up_axis);
                                                }
                                                        rotation_between_vecs_to_quat(qrot, td->axismtx[1], vec);
                                                        mul_qt_v3(qrot, up_axis);
                                                }
-                                               else
-                                               {
+                                               else {
                                                        mul_m3_v3(t->mat, up_axis);
                                                }
                                                
                                                        mul_m3_v3(t->mat, up_axis);
                                                }
                                                
@@ -811,8 +810,7 @@ static void recalcData_view3d(TransInfo *t)
                                transform_armature_mirror_update(t->obedit);
                        
                }
                                transform_armature_mirror_update(t->obedit);
                        
                }
-               else
-               {
+               else {
                        if(t->state != TRANS_CANCEL) {
                                applyProject(t);
                        }
                        if(t->state != TRANS_CANCEL) {
                                applyProject(t);
                        }
@@ -993,8 +991,7 @@ int initTransInfo (bContext *C, TransInfo *t, wmOperator *op, wmEvent *event)
                copy_v2_v2_int(t->imval, event->mval);
                t->event_type = event->type;
        }
                copy_v2_v2_int(t->imval, event->mval);
                t->event_type = event->type;
        }
-       else
-       {
+       else {
                t->imval[0] = 0;
                t->imval[1] = 0;
        }
                t->imval[0] = 0;
                t->imval[1] = 0;
        }
@@ -1074,8 +1071,7 @@ int initTransInfo (bContext *C, TransInfo *t, wmOperator *op, wmEvent *event)
                                t->current_orientation = V3D_MANIP_GLOBAL;
                        }
                }
                                t->current_orientation = V3D_MANIP_GLOBAL;
                        }
                }
-               else
-               {
+               else {
                        t->current_orientation = v3d->twmode;
                }
 
                        t->current_orientation = v3d->twmode;
                }
 
@@ -1121,8 +1117,7 @@ int initTransInfo (bContext *C, TransInfo *t, wmOperator *op, wmEvent *event)
                t->view = &ar->v2d;
                t->around = sipo->around;
        }
                t->view = &ar->v2d;
                t->around = sipo->around;
        }
-       else
-       {
+       else {
                if(ar) {
                        // XXX for now, get View2D  from the active region
                        t->view = &ar->v2d;
                if(ar) {
                        // XXX for now, get View2D  from the active region
                        t->view = &ar->v2d;
@@ -1141,10 +1136,8 @@ int initTransInfo (bContext *C, TransInfo *t, wmOperator *op, wmEvent *event)
                        t->flag |= T_RELEASE_CONFIRM;
                }
        }
                        t->flag |= T_RELEASE_CONFIRM;
                }
        }
-       else
-       {
-               if (U.flag & USER_RELEASECONFIRM)
-               {
+       else {
+               if (U.flag & USER_RELEASECONFIRM) {
                        t->flag |= T_RELEASE_CONFIRM;
                }
        }
                        t->flag |= T_RELEASE_CONFIRM;
                }
        }
@@ -1181,22 +1174,18 @@ int initTransInfo (bContext *C, TransInfo *t, wmOperator *op, wmEvent *event)
                                break;
                        }
                }
                                break;
                        }
                }
-               else
-               {
+               else {
                        /* use settings from scene only if modal */
                        /* use settings from scene only if modal */
-                       if (t->flag & T_MODAL)
-                       {
-                               if ((t->options & CTX_NO_PET) == 0)
-                               {
-                                       if (t->obedit && ts->proportional != PROP_EDIT_OFF)
-                                       {
+                       if (t->flag & T_MODAL) {
+                               if ((t->options & CTX_NO_PET) == 0) {
+                                       if (t->obedit && ts->proportional != PROP_EDIT_OFF) {
                                                t->flag |= T_PROP_EDIT;
 
                                                t->flag |= T_PROP_EDIT;
 
-                                               if(ts->proportional == PROP_EDIT_CONNECTED)
+                                               if (ts->proportional == PROP_EDIT_CONNECTED) {
                                                        t->flag |= T_PROP_CONNECTED;
                                                        t->flag |= T_PROP_CONNECTED;
+                                               }
                                        }
                                        }
-                                       else if (t->obedit == NULL && ts->proportional_objects)
-                                       {
+                                       else if (t->obedit == NULL && ts->proportional_objects) {
                                                t->flag |= T_PROP_EDIT;
                                        }
                                }
                                                t->flag |= T_PROP_EDIT;
                                        }
                                }
@@ -1207,8 +1196,7 @@ int initTransInfo (bContext *C, TransInfo *t, wmOperator *op, wmEvent *event)
                {
                        t->prop_size = RNA_float_get(op->ptr, "proportional_size");