style cleanup: brace placement/newlines
authorCampbell Barton <ideasman42@gmail.com>
Thu, 24 May 2012 16:35:45 +0000 (16:35 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Thu, 24 May 2012 16:35:45 +0000 (16:35 +0000)
16 files changed:
release/plugins/sequence/dnr.c
source/blender/blenkernel/intern/particle_system.c
source/blender/blenkernel/intern/pointcache.c
source/blender/blenkernel/intern/softbody.c
source/blender/blenloader/intern/versioning_250.c
source/blender/editors/physics/particle_edit.c
source/blender/editors/space_clip/tracking_ops.c
source/blender/editors/space_node/node_templates.c
source/blender/editors/transform/transform_snap.c
source/blender/gpu/intern/gpu_codegen.c
source/blender/gpu/intern/gpu_draw.c
source/blender/gpu/intern/gpu_extensions.c
source/blender/imbuf/intern/cineon/logImageLib.c
source/blender/modifiers/intern/MOD_skin.c
source/blender/render/intern/source/convertblender.c
source/blender/render/intern/source/rendercore.c

index 9c42098c248ef38144bda4e1087b164a2fe6346f..d374c40633c0446bfdd6695ffacb3063e2e71c08 100644 (file)
@@ -132,8 +132,9 @@ void plugin_seq_doit(Cast *cast, float facf0, float facf1, int width,
                d->last_level = cast->level;
        }
 
-       if (width != d->last_width || height != d->last_height
-           || cfra != d->last_cfra + 1) {
+       if (width != d->last_width || height != d->last_height ||
+           cfra != d->last_cfra + 1)
+       {
                free(d->last_frame);
                d->last_frame = (unsigned char*) calloc(width * height, 4);
                
index 9497a81d3864925a03255acba786e60b4534dff6..fa47600deb21bd465d44dd1af2753e4016b82467 100644 (file)
@@ -4444,7 +4444,8 @@ static void psys_prepare_physics(ParticleSimulationData *sim)
 static int hair_needs_recalc(ParticleSystem *psys)
 {
        if (!(psys->flag & PSYS_EDITED) && (!psys->edit || !psys->edit->edited) &&
-               ((psys->flag & PSYS_HAIR_DONE)==0 || psys->recalc & PSYS_RECALC_RESET || (psys->part->flag & PART_HAIR_REGROW && !psys->edit))) {
+           ((psys->flag & PSYS_HAIR_DONE)==0 || psys->recalc & PSYS_RECALC_RESET || (psys->part->flag & PART_HAIR_REGROW && !psys->edit)))
+       {
                return 1;
        }
 
index f676cfb2fb845c451fb9774bfc18cdf86122091a..90d17e533492c6d08a7cd1372c638eb034b97c51 100644 (file)
@@ -2190,8 +2190,9 @@ void BKE_ptcache_id_clear(PTCacheID *pid, int mode, unsigned int cfra)
                                                                BLI_strncpy(num, de->d_name + (strlen(de->d_name) - 15), sizeof(num));
                                                                frame = atoi(num);
                                                                
-                                                               if ((mode==PTCACHE_CLEAR_BEFORE && frame < cfra)        || 
-                                                               (mode==PTCACHE_CLEAR_AFTER && frame > cfra)     ) {
+                                                               if ((mode == PTCACHE_CLEAR_BEFORE && frame < cfra) ||
+                                                                   (mode == PTCACHE_CLEAR_AFTER && frame > cfra))
+                                                               {
                                                                        
                                                                        BLI_join_dirfile(path_full, sizeof(path_full), path, de->d_name);
                                                                        BLI_delete(path_full, 0, 0);
@@ -2226,8 +2227,9 @@ void BKE_ptcache_id_clear(PTCacheID *pid, int mode, unsigned int cfra)
                        }
                        else {
                                while (pm) {
-                                       if ((mode==PTCACHE_CLEAR_BEFORE && pm->frame < cfra)    || 
-                                       (mode==PTCACHE_CLEAR_AFTER && pm->frame > cfra) ) {
+                                       if ((mode == PTCACHE_CLEAR_BEFORE && pm->frame < cfra) ||
+                                           (mode == PTCACHE_CLEAR_AFTER && pm->frame > cfra))
+                                       {
                                                link = pm;
                                                if (pid->cache->cached_frames && pm->frame >=sta && pm->frame <= end)
                                                        pid->cache->cached_frames[pm->frame-sta] = 0;
index 85027efa246178cbe0e36633346ee08cf3f5bd1f..5abc4bc38303387680714445312aebb09be45054 100644 (file)
@@ -1054,11 +1054,12 @@ static int sb_detect_aabb_collisionCached(float UNUSED(force[3]), unsigned int U
                                        a = ccdm->totface;
 #endif
                                        if ((aabbmax[0] < ccdm->bbmin[0]) ||
-                                               (aabbmax[1] < ccdm->bbmin[1]) ||
-                                               (aabbmax[2] < ccdm->bbmin[2]) ||
-                                               (aabbmin[0] > ccdm->bbmax[0]) ||
-                                               (aabbmin[1] > ccdm->bbmax[1]) ||
-                                               (aabbmin[2] > ccdm->bbmax[2]) ) {
+                                           (aabbmax[1] < ccdm->bbmin[1]) ||
+                                           (aabbmax[2] < ccdm->bbmin[2]) ||
+                                           (aabbmin[0] > ccdm->bbmax[0]) ||
+                                           (aabbmin[1] > ccdm->bbmax[1]) ||
+                                           (aabbmin[2] > ccdm->bbmax[2]) )
+                                       {
                                                /* boxes don't intersect */
                                                BLI_ghashIterator_step(ihash);
                                                continue;
@@ -1125,11 +1126,12 @@ static int sb_detect_face_pointCached(float face_v1[3], float face_v2[3], float
                                        mprevvert= ccdm->mprevvert;
                                        outerfacethickness = ob->pd->pdef_sboft;
                                        if ((aabbmax[0] < ccdm->bbmin[0]) ||
-                                               (aabbmax[1] < ccdm->bbmin[1]) ||
-                                               (aabbmax[2] < ccdm->bbmin[2]) ||
-                                               (aabbmin[0] > ccdm->bbmax[0]) ||
-                                               (aabbmin[1] > ccdm->bbmax[1]) ||
-                                               (aabbmin[2] > ccdm->bbmax[2]) ) {
+                                           (aabbmax[1] < ccdm->bbmin[1]) ||
+                                           (aabbmax[2] < ccdm->bbmin[2]) ||
+                                           (aabbmin[0] > ccdm->bbmax[0]) ||
+                                           (aabbmin[1] > ccdm->bbmax[1]) ||
+                                           (aabbmin[2] > ccdm->bbmax[2]) )
+                                       {
                                                /* boxes don't intersect */
                                                BLI_ghashIterator_step(ihash);
                                                continue;
@@ -1220,11 +1222,12 @@ static int sb_detect_face_collisionCached(float face_v1[3], float face_v2[3], fl
                                        a = ccdm->totface;
 
                                        if ((aabbmax[0] < ccdm->bbmin[0]) ||
-                                               (aabbmax[1] < ccdm->bbmin[1]) ||
-                                               (aabbmax[2] < ccdm->bbmin[2]) ||
-                                               (aabbmin[0] > ccdm->bbmax[0]) ||
-                                               (aabbmin[1] > ccdm->bbmax[1]) ||
-                                               (aabbmin[2] > ccdm->bbmax[2]) ) {
+                                           (aabbmax[1] < ccdm->bbmin[1]) ||
+                                           (aabbmax[2] < ccdm->bbmin[2]) ||
+                                           (aabbmin[0] > ccdm->bbmax[0]) ||
+                                           (aabbmin[1] > ccdm->bbmax[1]) ||
+                                           (aabbmin[2] > ccdm->bbmax[2]) )
+                                       {
                                                /* boxes don't intersect */
                                                BLI_ghashIterator_step(ihash);
                                                continue;
@@ -1447,11 +1450,12 @@ static int sb_detect_edge_collisionCached(float edge_v1[3], float edge_v2[3], fl
                                        a = ccdm->totface;
 
                                        if ((aabbmax[0] < ccdm->bbmin[0]) ||
-                                               (aabbmax[1] < ccdm->bbmin[1]) ||
-                                               (aabbmax[2] < ccdm->bbmin[2]) ||
-                                               (aabbmin[0] > ccdm->bbmax[0]) ||
-                                               (aabbmin[1] > ccdm->bbmax[1]) ||
-                                               (aabbmin[2] > ccdm->bbmax[2]) ) {
+                                           (aabbmax[1] < ccdm->bbmin[1]) ||
+                                           (aabbmax[2] < ccdm->bbmin[2]) ||
+                                           (aabbmin[0] > ccdm->bbmax[0]) ||
+                                           (aabbmin[1] > ccdm->bbmax[1]) ||
+                                           (aabbmin[2] > ccdm->bbmax[2]) )
+                                       {
                                                /* boxes don't intersect */
                                                BLI_ghashIterator_step(ihash);
                                                continue;
@@ -1785,14 +1789,15 @@ static int sb_detect_vertex_collisionCached(float opco[3], float facenormal[3],
                                        maxz = ccdm->bbmax[2];
 
                                        if ((opco[0] < minx) ||
-                                               (opco[1] < miny) ||
-                                               (opco[2] < minz) ||
-                                               (opco[0] > maxx) ||
-                                               (opco[1] > maxy) ||
-                                               (opco[2] > maxz) ) {
-                                                       /* outside the padded boundbox --> collision object is too far away */
-                                                                                               BLI_ghashIterator_step(ihash);
-                                                       continue;
+                                           (opco[1] < miny) ||
+                                           (opco[2] < minz) ||
+                                           (opco[0] > maxx) ||
+                                           (opco[1] > maxy) ||
+                                           (opco[2] > maxz) )
+                                       {
+                                               /* outside the padded boundbox --> collision object is too far away */
+                                               BLI_ghashIterator_step(ihash);
+                                               continue;
                                        }
                                }
                                else {
index c028c374cce547809c76a38b03d1f9e223ae3aac..4a69c37ae1b79246af7cddf926b3d1a846cdf053 100644 (file)
@@ -623,7 +623,7 @@ static void do_version_constraints_radians_degrees_250(ListBase *lb)
 {
        bConstraint *con;
 
-       for     (con = lb->first; con; con = con->next) {
+       for (con = lb->first; con; con = con->next) {
                if (con->type == CONSTRAINT_TYPE_RIGIDBODYJOINT) {
                        bRigidBodyJointConstraint *data = con->data;
                        data->axX *= (float)(M_PI / 180.0);
index 9f5e700616e709e129240c5fd4c7901b3f6583c6..adb5cdede2aa19713e585b43f9fb46b5b1f1a0b2 100644 (file)
@@ -3494,7 +3494,8 @@ static void brush_edit_apply(bContext *C, wmOperator *op, PointerRNA *itemptr)
                pset->flag &= ~PE_LOCK_FIRST;
 
        if (((pset->brushtype == PE_BRUSH_ADD) ?
-               (sqrt(dx * dx + dy * dy) > pset->brush[PE_BRUSH_ADD].step) : (dx != 0 || dy != 0)) || bedit->first) {
+            (sqrt(dx * dx + dy * dy) > pset->brush[PE_BRUSH_ADD].step) : (dx != 0 || dy != 0)) || bedit->first)
+       {
                PEData data= bedit->data;
 
                view3d_operator_needs_opengl(C);
index 3d1ff26d58694029471b27801bb5ab15f2a52eca..8fafcd9d6754298481579424927c37e1669b4384 100644 (file)
@@ -712,8 +712,8 @@ static float dist_to_rect(float co[2], float pos[2], float min[2], float max[2])
 {
        float d1, d2, d3, d4;
        float p[2] = {co[0] - pos[0], co[1] - pos[1]};
-       float v1[2] = {min[0], min[1]}, v2[2] = {max[0], min[1]},
-             v3[2] = {max[0], max[1]}, v4[2] = {min[0], max[1]};
+       float v1[2] = {min[0], min[1]}, v2[2] = {max[0], min[1]};
+       float v3[2] = {max[0], max[1]}, v4[2] = {min[0], max[1]};
 
        d1 = dist_to_line_segment_v2(p, v1, v2);
        d2 = dist_to_line_segment_v2(p, v2, v3);
index bd79b9dde006a37bf34c9e33e184d978a17712cb..ee3827428bc7663e35307010a571121db4e5a965 100644 (file)
@@ -175,7 +175,8 @@ static void node_socket_add_replace(Main *bmain, bNodeTree *ntree, bNode *node_t
                        node_from = NULL;
 
        if (node_prev && node_prev->type == ntemp->type &&
-               (ntemp->type != NODE_GROUP || node_prev->id == &ntemp->ngroup->id)) {
+           (ntemp->type != NODE_GROUP || node_prev->id == &ntemp->ngroup->id))
+       {
                /* keep the previous node if it's the same type */
                node_from = node_prev;
        }
index 137d0838587ccd14f6525ff232ddac2ef7d79871..a04ce1ca213625013bb85510bdfa783da4b6e373 100644 (file)
@@ -380,8 +380,9 @@ static void initSnappingMode(TransInfo *t)
 
        t->tsnap.mode = ts->snap_mode;
 
-       if ((t->spacetype == SPACE_VIEW3D || t->spacetype == SPACE_IMAGE) && // Only 3D view or UV
-                       (t->flag & T_CAMERA) == 0) { // Not with camera selected in camera view
+       if ((t->spacetype == SPACE_VIEW3D || t->spacetype == SPACE_IMAGE) &&  /* Only 3D view or UV */
+           (t->flag & T_CAMERA) == 0)  /* Not with camera selected in camera view */
+       {
                setSnappingCallback(t);
 
                /* Edit mode */
index 6a2c3eee7a501d2dc70673c7462fa1b665b8674b..a88a075383d4d28768ca9d8e1298ad41ad3121bb 100644 (file)
@@ -387,7 +387,8 @@ static void codegen_set_unique_ids(ListBase *nodes)
 
                        /* set texid used for settings texture slot with multitexture */
                        if (codegen_input_has_texture(input) &&
-                               ((input->source == GPU_SOURCE_TEX) || (input->source == GPU_SOURCE_TEX_PIXEL))) {
+                           ((input->source == GPU_SOURCE_TEX) || (input->source == GPU_SOURCE_TEX_PIXEL)))
+                       {
                                if (input->link) {
                                        /* input is texture from buffer, assign only one texid per
                                         * buffer to avoid sampling the same texture twice */
index 6538da2eb61030d586e04f4733535a4d38c9eb1a..604e8f8d50e0025a521bbae62e79376da04b5f76 100644 (file)
@@ -766,8 +766,9 @@ void GPU_paint_update_image(Image *ima, int x, int y, int w, int h, int mipmap)
        ibuf = BKE_image_get_ibuf(ima, NULL);
        
        if (ima->repbind || (gpu_get_mipmap() && mipmap) || !ima->bindcode || !ibuf ||
-               (!is_power_of_2_i(ibuf->x) || !is_power_of_2_i(ibuf->y)) ||
-               (w == 0) || (h == 0)) {
+           (!is_power_of_2_i(ibuf->x) || !is_power_of_2_i(ibuf->y)) ||
+           (w == 0) || (h == 0))
+       {
                /* these cases require full reload still */
                GPU_free_image(ima);
        }
index f4d5812ffb76c0612471958c9481a5f762f7f1dc..4974d57d64cd32545d3506c9267d90ea858fab8a 100644 (file)
@@ -1074,8 +1074,9 @@ GPUShader *GPU_shader_create(const char *vertexcode, const char *fragcode, /*GPU
        shader->object = glCreateProgramObjectARB();
 
        if (!shader->object ||
-               (vertexcode && !shader->vertex) ||
-               (fragcode && !shader->fragment)) {
+           (vertexcode && !shader->vertex) ||
+           (fragcode && !shader->fragment))
+       {
                fprintf(stderr, "GPUShader, object creation failed.\n");
                GPU_shader_free(shader);
                return NULL;
index f479220d82c886885e2660277e0f372819b9492a..ccc6045e6e578e5a6c753718807a9a7b81e34aab 100644 (file)
@@ -121,10 +121,11 @@ int
 logImageSetByteConversion(LogImageFile* logImage, const LogImageByteConversionParameters* params)
 {
        if ((params->gamma >= MIN_GAMMA) &&
-                       (params->gamma <= MAX_GAMMA) &&
-                       (params->blackPoint >= 0) &&
-                       (params->blackPoint < params->whitePoint) &&
-                       (params->whitePoint <= 1023)) {
+           (params->gamma <= MAX_GAMMA) &&
+           (params->blackPoint >= 0) &&
+           (params->blackPoint < params->whitePoint) &&
+           (params->whitePoint <= 1023))
+       {
                logImage->params.gamma = params->gamma;
                logImage->params.blackPoint = params->blackPoint;
                logImage->params.whitePoint = params->whitePoint;
index 9d2ce657bde14e5fb19d106f5ff6528c0e41a39a..a13bc3563c50616eb6c6ba77b902911ebd5b11ab 100644 (file)
@@ -716,7 +716,8 @@ static int calc_edge_subdivisions(const MVert *mvert, const MVertSkin *nodes,
        /* If either end is a branch node marked 'loose', don't subdivide
         * the edge (or subdivide just twice if both are branches) */
        if ((v1_branch && (evs[0]->flag & MVERT_SKIN_LOOSE)) ||
-           (v2_branch && (evs[1]->flag & MVERT_SKIN_LOOSE))) {
+           (v2_branch && (evs[1]->flag & MVERT_SKIN_LOOSE)))
+       {
                if (v1_branch && v2_branch)
                        return 2;
                else
index 150bfae47311fb177ab89b75297a0f3bb25d6398..bda8baa5e3010ddd423d82bd21b0aae9f733e1ef 100644 (file)
@@ -3790,7 +3790,8 @@ static GroupObject *add_render_lamp(Render *re, Object *ob)
                lar->area_sizey= lar->area_size;
 
                if ((la->sun_effect_type & LA_SUN_EFFECT_SKY) ||
-                               (la->sun_effect_type & LA_SUN_EFFECT_AP)) {
+                   (la->sun_effect_type & LA_SUN_EFFECT_AP))
+               {
                        lar->sunsky = (struct SunSky*)MEM_callocN(sizeof(struct SunSky), "sunskyren");
                        lar->sunsky->effect_type = la->sun_effect_type;
                
index 2fd8e49d34e002927c80cb34d264861a4d08f160..7addc1e66799beabae8f11266922212450b03332 100644 (file)
@@ -2169,7 +2169,7 @@ static void bake_shade(void *handle, Object *ob, ShadeInput *shi, int UNUSED(qua
        else {
                unsigned char *col= (unsigned char *)(bs->rect + bs->rectx*y + x);
 
-               if (ELEM(bs->type, RE_BAKE_ALL, RE_BAKE_TEXTURE) &&     (R.r.color_mgt_flag & R_COLOR_MANAGEMENT)) {
+               if (ELEM(bs->type, RE_BAKE_ALL, RE_BAKE_TEXTURE) && (R.r.color_mgt_flag & R_COLOR_MANAGEMENT)) {
                        linearrgb_to_srgb_uchar3(col, shr.combined);
                }
                else {