Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2012-04-21 19:11:03 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-04-21 19:11:03 +0400
commitb56aabf815dd60827da81574501ea1d12ce3a38b (patch)
treec8e49d9265437377584cb28705a2dc466a7faa1e /source
parent8765dfccf725770007e3b4e6b24199fe8377df71 (diff)
style cleanup: multi-line if statements.
Diffstat (limited to 'source')
-rw-r--r--source/blender/blenkernel/intern/cdderivedmesh.c16
-rw-r--r--source/blender/blenkernel/intern/cloth.c10
-rw-r--r--source/blender/blenkernel/intern/collision.c4
-rw-r--r--source/blender/blenkernel/intern/customdata.c20
-rw-r--r--source/blender/blenkernel/intern/dynamicpaint.c6
-rw-r--r--source/blender/blenkernel/intern/image.c5
-rw-r--r--source/blender/blenkernel/intern/implicit.c4
-rw-r--r--source/blender/blenkernel/intern/modifier.c2
-rw-r--r--source/blender/blenkernel/intern/object.c12
-rw-r--r--source/blender/blenkernel/intern/particle.c18
-rw-r--r--source/blender/blenkernel/intern/particle_system.c26
-rw-r--r--source/blender/blenkernel/intern/pointcache.c9
-rw-r--r--source/blender/blenkernel/intern/seqeffects.c5
-rw-r--r--source/blender/blenkernel/intern/sequencer.c8
-rw-r--r--source/blender/blenkernel/intern/shrinkwrap.c4
-rw-r--r--source/blender/blenkernel/intern/writeframeserver.c3
-rw-r--r--source/blender/blenlib/intern/BLI_kdopbvh.c10
-rw-r--r--source/blender/blenlib/intern/rand.c2
-rw-r--r--source/blender/blenloader/intern/readfile.c6
-rw-r--r--source/blender/editors/curve/editcurve.c9
-rw-r--r--source/blender/editors/interface/interface_templates.c4
-rw-r--r--source/blender/editors/physics/particle_edit.c3
-rw-r--r--source/blender/editors/render/render_opengl.c2
-rw-r--r--source/blender/editors/sculpt_paint/paint_image.c4
-rw-r--r--source/blender/editors/sculpt_paint/sculpt_uv.c5
-rw-r--r--source/blender/editors/space_file/file_draw.c3
-rw-r--r--source/blender/editors/space_file/filelist.c28
-rw-r--r--source/blender/editors/space_logic/logic_window.c12
-rw-r--r--source/blender/editors/space_node/node_edit.c17
-rw-r--r--source/blender/editors/space_sequencer/sequencer_select.c8
-rw-r--r--source/blender/editors/space_view3d/drawobject.c4
-rw-r--r--source/blender/editors/space_view3d/view3d_header.c5
-rw-r--r--source/blender/editors/transform/transform_conversions.c3
-rw-r--r--source/blender/editors/transform/transform_generics.c3
-rw-r--r--source/blender/imbuf/intern/anim_movie.c14
-rw-r--r--source/blender/imbuf/intern/util.c28
-rw-r--r--source/blender/makesdna/intern/makesdna.c5
-rw-r--r--source/blender/modifiers/intern/MOD_array.c3
-rw-r--r--source/blender/modifiers/intern/MOD_explode.c8
-rw-r--r--source/blender/modifiers/intern/MOD_shrinkwrap.c8
-rw-r--r--source/blender/modifiers/intern/MOD_weightvg_util.c8
-rw-r--r--source/blender/render/intern/source/shadeinput.c6
-rw-r--r--source/blender/render/intern/source/shadeoutput.c5
-rw-r--r--source/blender/render/intern/source/strand.c12
-rw-r--r--source/blender/render/intern/source/volume_precache.c4
45 files changed, 213 insertions, 168 deletions
diff --git a/source/blender/blenkernel/intern/cdderivedmesh.c b/source/blender/blenkernel/intern/cdderivedmesh.c
index 2dc95effdd7..4a852bb0233 100644
--- a/source/blender/blenkernel/intern/cdderivedmesh.c
+++ b/source/blender/blenkernel/intern/cdderivedmesh.c
@@ -424,17 +424,18 @@ static void cdDM_drawEdges(DerivedMesh *dm, int drawLooseEdges, int drawAllEdges
else { /* use OpenGL VBOs or Vertex Arrays instead for better, faster rendering */
int prevstart = 0;
int prevdraw = 1;
- int draw = 1;
+ int draw = TRUE;
GPU_edge_setup(dm);
- if ( !GPU_buffer_legacy(dm) ) {
+ if (!GPU_buffer_legacy(dm)) {
for (i = 0; i < dm->numEdgeData; i++, medge++) {
- if ((drawAllEdges || (medge->flag&ME_EDGEDRAW))
- && (drawLooseEdges || !(medge->flag&ME_LOOSEEDGE))) {
- draw = 1;
+ if ((drawAllEdges || (medge->flag & ME_EDGEDRAW)) &&
+ (drawLooseEdges || !(medge->flag & ME_LOOSEEDGE)))
+ {
+ draw = TRUE;
}
else {
- draw = 0;
+ draw = FALSE;
}
if ( prevdraw != draw ) {
if ( prevdraw > 0 && (i-prevstart) > 0 ) {
@@ -539,8 +540,7 @@ static void cdDM_drawFacesSolid(DerivedMesh *dm,
new_matnr = mface->mat_nr + 1;
new_shademodel = (mface->flag & ME_SMOOTH)?GL_SMOOTH:GL_FLAT;
- if (new_glmode != glmode || new_matnr != matnr
- || new_shademodel != shademodel) {
+ if (new_glmode != glmode || new_matnr != matnr || new_shademodel != shademodel) {
glEnd();
drawCurrentMat = setMaterial(matnr = new_matnr, NULL);
diff --git a/source/blender/blenkernel/intern/cloth.c b/source/blender/blenkernel/intern/cloth.c
index 7dedd71b2e0..a0c273cf962 100644
--- a/source/blender/blenkernel/intern/cloth.c
+++ b/source/blender/blenkernel/intern/cloth.c
@@ -446,9 +446,9 @@ void clothModifier_do(ClothModifierData *clmd, Scene *scene, Object *ob, Derived
BKE_ptcache_id_time(&pid, scene, framenr, &startframe, &endframe, &timescale);
clmd->sim_parms->timescale= timescale;
- if (clmd->sim_parms->reset
- || (framenr == (startframe - clmd->sim_parms->preroll) && clmd->sim_parms->preroll != 0)
- || (clmd->clothObject && dm->getNumVerts(dm) != clmd->clothObject->numverts))
+ if (clmd->sim_parms->reset ||
+ (framenr == (startframe - clmd->sim_parms->preroll) && clmd->sim_parms->preroll != 0) ||
+ (clmd->clothObject && dm->getNumVerts(dm) != clmd->clothObject->numverts))
{
clmd->sim_parms->reset = 0;
cache->flag |= PTCACHE_OUTDATED;
@@ -1176,8 +1176,8 @@ static int cloth_build_springs ( ClothModifierData *clmd, DerivedMesh *dm )
// check for existing spring
// check also if startpoint is equal to endpoint
- if ( !BLI_edgehash_haskey ( edgehash, MIN2(tspring2->ij, index2), MAX2(tspring2->ij, index2) )
- && ( index2!=tspring2->ij ) )
+ if (!BLI_edgehash_haskey(edgehash, MIN2(tspring2->ij, index2), MAX2(tspring2->ij, index2)) &&
+ (index2 != tspring2->ij))
{
spring = ( ClothSpring * ) MEM_callocN ( sizeof ( ClothSpring ), "cloth spring" );
diff --git a/source/blender/blenkernel/intern/collision.c b/source/blender/blenkernel/intern/collision.c
index f6a6ef068d6..7195fb9c425 100644
--- a/source/blender/blenkernel/intern/collision.c
+++ b/source/blender/blenkernel/intern/collision.c
@@ -2502,8 +2502,8 @@ int cloth_bvh_objcollision (Object *ob, ClothModifierData * clmd, float step, fl
if ( clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_GOAL )
{
- if ( ( cloth->verts [i].flags & CLOTH_VERT_FLAG_PINNED )
- && ( cloth->verts [j].flags & CLOTH_VERT_FLAG_PINNED ) )
+ if ( ( cloth->verts [i].flags & CLOTH_VERT_FLAG_PINNED ) &&
+ ( cloth->verts [j].flags & CLOTH_VERT_FLAG_PINNED ) )
{
continue;
}
diff --git a/source/blender/blenkernel/intern/customdata.c b/source/blender/blenkernel/intern/customdata.c
index 29eea3bb576..7cc7a82df66 100644
--- a/source/blender/blenkernel/intern/customdata.c
+++ b/source/blender/blenkernel/intern/customdata.c
@@ -1810,9 +1810,9 @@ void CustomData_copy_data(const CustomData *source, CustomData *dest,
/* find the first dest layer with type >= the source type
* (this should work because layers are ordered by type)
*/
- while (dest_i < dest->totlayer
- && dest->layers[dest_i].type < source->layers[src_i].type)
+ while (dest_i < dest->totlayer && dest->layers[dest_i].type < source->layers[src_i].type) {
++dest_i;
+ }
/* if there are no more dest layers, we're done */
if (dest_i >= dest->totlayer) return;
@@ -1901,9 +1901,9 @@ void CustomData_interp(const CustomData *source, CustomData *dest,
/* find the first dest layer with type >= the source type
* (this should work because layers are ordered by type)
*/
- while (dest_i < dest->totlayer
- && dest->layers[dest_i].type < source->layers[src_i].type)
+ while (dest_i < dest->totlayer && dest->layers[dest_i].type < source->layers[src_i].type) {
++dest_i;
+ }
/* if there are no more dest layers, we're done */
if (dest_i >= dest->totlayer) return;
@@ -2272,9 +2272,9 @@ void CustomData_bmesh_copy_data(const CustomData *source, CustomData *dest,
/* find the first dest layer with type >= the source type
* (this should work because layers are ordered by type)
*/
- while (dest_i < dest->totlayer
- && dest->layers[dest_i].type < source->layers[src_i].type)
+ while (dest_i < dest->totlayer && dest->layers[dest_i].type < source->layers[src_i].type) {
++dest_i;
+ }
/* if there are no more dest layers, we're done */
if (dest_i >= dest->totlayer) return;
@@ -2504,9 +2504,9 @@ void CustomData_to_bmesh_block(const CustomData *source, CustomData *dest,
/* find the first dest layer with type >= the source type
* (this should work because layers are ordered by type)
*/
- while (dest_i < dest->totlayer
- && dest->layers[dest_i].type < source->layers[src_i].type)
+ while (dest_i < dest->totlayer && dest->layers[dest_i].type < source->layers[src_i].type) {
++dest_i;
+ }
/* if there are no more dest layers, we're done */
if (dest_i >= dest->totlayer) return;
@@ -2547,9 +2547,9 @@ void CustomData_from_bmesh_block(const CustomData *source, CustomData *dest,
/* find the first dest layer with type >= the source type
* (this should work because layers are ordered by type)
*/
- while (dest_i < dest->totlayer
- && dest->layers[dest_i].type < source->layers[src_i].type)
+ while (dest_i < dest->totlayer && dest->layers[dest_i].type < source->layers[src_i].type) {
++dest_i;
+ }
/* if there are no more dest layers, we're done */
if (dest_i >= dest->totlayer) return;
diff --git a/source/blender/blenkernel/intern/dynamicpaint.c b/source/blender/blenkernel/intern/dynamicpaint.c
index 6aad98d293e..943c8a20990 100644
--- a/source/blender/blenkernel/intern/dynamicpaint.c
+++ b/source/blender/blenkernel/intern/dynamicpaint.c
@@ -1844,8 +1844,7 @@ static void dynamicPaint_frameUpdate(DynamicPaintModifierData *pmd, Scene *scene
BKE_ptcache_id_time(&pid, scene, (float)scene->r.cfra, NULL, NULL, NULL);
/* reset non-baked cache at first frame */
- if ((int)scene->r.cfra == surface->start_frame && !(cache->flag & PTCACHE_BAKED))
- {
+ if ((int)scene->r.cfra == surface->start_frame && !(cache->flag & PTCACHE_BAKED)) {
cache->flag |= PTCACHE_REDO_NEEDED;
BKE_ptcache_id_reset(scene, &pid, PTCACHE_RESET_OUTDATED);
cache->flag &= ~PTCACHE_REDO_NEEDED;
@@ -1856,8 +1855,7 @@ static void dynamicPaint_frameUpdate(DynamicPaintModifierData *pmd, Scene *scene
BKE_ptcache_validate(cache, (int)scene->r.cfra);
}
/* if read failed and we're on surface range do recalculate */
- else if ((int)scene->r.cfra == current_frame
- && !(cache->flag & PTCACHE_BAKED)) {
+ else if ((int)scene->r.cfra == current_frame && !(cache->flag & PTCACHE_BAKED)) {
/* calculate surface frame */
canvas->flags |= MOD_DPAINT_BAKING;
dynamicPaint_calculateFrame(surface, scene, ob, current_frame);
diff --git a/source/blender/blenkernel/intern/image.c b/source/blender/blenkernel/intern/image.c
index 3b91afbc126..27779ef8107 100644
--- a/source/blender/blenkernel/intern/image.c
+++ b/source/blender/blenkernel/intern/image.c
@@ -1148,8 +1148,9 @@ int BKE_add_image_extension(char *string, const char imtype)
if (extension) {
/* prefer this in many cases to avoid .png.tga, but in certain cases it breaks */
/* remove any other known image extension */
- if (BLI_testextensie_array(string, imb_ext_image)
- || (G.have_quicktime && BLI_testextensie_array(string, imb_ext_image_qt))) {
+ if (BLI_testextensie_array(string, imb_ext_image) ||
+ (G.have_quicktime && BLI_testextensie_array(string, imb_ext_image_qt)))
+ {
return BLI_replace_extension(string, FILE_MAX, extension);
}
else {
diff --git a/source/blender/blenkernel/intern/implicit.c b/source/blender/blenkernel/intern/implicit.c
index 23aa03b0331..0bb9426730e 100644
--- a/source/blender/blenkernel/intern/implicit.c
+++ b/source/blender/blenkernel/intern/implicit.c
@@ -1260,8 +1260,8 @@ DO_INLINE void cloth_calc_spring_force(ClothModifierData *clmd, ClothSpring *s,
/*
if (length>L)
{
- if ((clmd->sim_parms->flags & CSIMSETT_FLAG_TEARING_ENABLED)
- && ((((length-L)*100.0f/L) > clmd->sim_parms->maxspringlen))) // cut spring!
+ if ((clmd->sim_parms->flags & CSIMSETT_FLAG_TEARING_ENABLED) &&
+ ((((length-L)*100.0f/L) > clmd->sim_parms->maxspringlen))) // cut spring!
{
s->flags |= CSPRING_FLAG_DEACTIVATE;
return;
diff --git a/source/blender/blenkernel/intern/modifier.c b/source/blender/blenkernel/intern/modifier.c
index 6c855b8f242..12aa6232cb0 100644
--- a/source/blender/blenkernel/intern/modifier.c
+++ b/source/blender/blenkernel/intern/modifier.c
@@ -76,7 +76,7 @@ ModifierTypeInfo *modifierType_getInfo(ModifierType type)
types_init= 0;
}
- /* type unsigned, no need to chech < 0 */
+ /* type unsigned, no need to check < 0 */
if (type < NUM_MODIFIER_TYPES && types[type]->name[0] != '\0') {
return types[type];
}
diff --git a/source/blender/blenkernel/intern/object.c b/source/blender/blenkernel/intern/object.c
index 3271a623584..bc9411b7e02 100644
--- a/source/blender/blenkernel/intern/object.c
+++ b/source/blender/blenkernel/intern/object.c
@@ -2631,9 +2631,11 @@ void object_handle_update(Scene *scene, Object *ob)
if (psys_check_enabled(ob, psys)) {
/* check use of dupli objects here */
if (psys->part && (psys->part->draw_as == PART_DRAW_REND || G.rendering) &&
- ((psys->part->ren_as == PART_DRAW_OB && psys->part->dup_ob)
- || (psys->part->ren_as == PART_DRAW_GR && psys->part->dup_group)))
+ ((psys->part->ren_as == PART_DRAW_OB && psys->part->dup_ob) ||
+ (psys->part->ren_as == PART_DRAW_GR && psys->part->dup_group)))
+ {
ob->transflag |= OB_DUPLIPARTS;
+ }
particle_system_update(scene, ob, psys);
psys= psys->next;
@@ -2664,9 +2666,11 @@ void object_handle_update(Scene *scene, Object *ob)
BKE_ptcache_ids_from_object(&pidlist, ob, scene, MAX_DUPLI_RECUR);
for (pid=pidlist.first; pid; pid=pid->next) {
- if ((pid->cache->flag & PTCACHE_BAKED)
- || (pid->cache->flag & PTCACHE_QUICK_CACHE)==0)
+ if ((pid->cache->flag & PTCACHE_BAKED) ||
+ (pid->cache->flag & PTCACHE_QUICK_CACHE) == 0)
+ {
continue;
+ }
if (pid->cache->flag & PTCACHE_OUTDATED || (pid->cache->flag & PTCACHE_SIMULATION_VALID)==0) {
scene->physics_settings.quick_cache_step =
diff --git a/source/blender/blenkernel/intern/particle.c b/source/blender/blenkernel/intern/particle.c
index 2eff664bc1a..414677bfc6e 100644
--- a/source/blender/blenkernel/intern/particle.c
+++ b/source/blender/blenkernel/intern/particle.c
@@ -4276,10 +4276,13 @@ int psys_get_particle_state(ParticleSimulationData *sim, int p, ParticleKey *sta
state->time = psys_get_child_time(psys, cpa, cfra, NULL, NULL);
- if (!always)
- if ((state->time < 0.0f && !(part->flag & PART_UNBORN))
- || (state->time > 1.0f && !(part->flag & PART_DIED)))
+ if (!always) {
+ if ((state->time < 0.0f && !(part->flag & PART_UNBORN)) ||
+ (state->time > 1.0f && !(part->flag & PART_DIED)))
+ {
return 0;
+ }
+ }
state->time= (cfra - (part->sta + (part->end - part->sta) * PSYS_FRAND(p + 23))) / (part->lifetime * PSYS_FRAND(p + 24));
@@ -4296,10 +4299,13 @@ int psys_get_particle_state(ParticleSimulationData *sim, int p, ParticleKey *sta
}
if (pa) {
- if (!always)
- if ((cfra < pa->time && (part->flag & PART_UNBORN)==0)
- || (cfra > pa->dietime && (part->flag & PART_DIED)==0))
+ if (!always) {
+ if ((cfra < pa->time && (part->flag & PART_UNBORN) == 0) ||
+ (cfra > pa->dietime && (part->flag & PART_DIED) == 0))
+ {
return 0;
+ }
+ }
cfra = MIN2(cfra, pa->dietime);
}
diff --git a/source/blender/blenkernel/intern/particle_system.c b/source/blender/blenkernel/intern/particle_system.c
index ee19b38e02b..4ce24953c89 100644
--- a/source/blender/blenkernel/intern/particle_system.c
+++ b/source/blender/blenkernel/intern/particle_system.c
@@ -126,10 +126,12 @@ static int psys_get_current_display_percentage(ParticleSystem *psys)
{
ParticleSettings *part=psys->part;
- if ((psys->renderdata && !particles_are_dynamic(psys)) /* non-dynamic particles can be rendered fully */
- || (part->child_nbr && part->childtype) /* display percentage applies to children */
- || (psys->pointcache->flag & PTCACHE_BAKING)) /* baking is always done with full amount */
+ if ((psys->renderdata && !particles_are_dynamic(psys)) || /* non-dynamic particles can be rendered fully */
+ (part->child_nbr && part->childtype) || /* display percentage applies to children */
+ (psys->pointcache->flag & PTCACHE_BAKING)) /* baking is always done with full amount */
+ {
return 100;
+ }
return psys->part->disp;
}
@@ -1862,9 +1864,11 @@ void reset_particle(ParticleSimulationData *sim, ParticleData *pa, float dtime,
/* and gravity in r_ve */
bpa->gravity[0] = bpa->gravity[1] = 0.0f;
bpa->gravity[2] = -1.0f;
- if ((sim->scene->physics_settings.flag & PHYS_GLOBAL_GRAVITY)
- && sim->scene->physics_settings.gravity[2]!=0.0f)
+ if ((sim->scene->physics_settings.flag & PHYS_GLOBAL_GRAVITY) &&
+ (sim->scene->physics_settings.gravity[2] != 0.0f))
+ {
bpa->gravity[2] = sim->scene->physics_settings.gravity[2];
+ }
bpa->data.health = part->boids->health;
bpa->data.mode = eBoidMode_InAir;
@@ -2683,9 +2687,10 @@ static void basic_integrate(ParticleSimulationData *sim, int p, float dfra, floa
efdata.sim = sim;
/* add global acceleration (gravitation) */
- if (psys_uses_gravity(sim)
+ if (psys_uses_gravity(sim) &&
/* normal gravity is too strong for hair so it's disabled by default */
- && (part->type != PART_HAIR || part->effector_weights->flag & EFF_WEIGHT_DO_HAIR)) {
+ (part->type != PART_HAIR || part->effector_weights->flag & EFF_WEIGHT_DO_HAIR))
+ {
zero_v3(gr);
madd_v3_v3fl(gr, sim->scene->physics_settings.gravity, part->effector_weights->global_gravity * efdata.ptex.gravity);
gravity = gr;
@@ -3892,11 +3897,12 @@ static void dynamics_step(ParticleSimulationData *sim, float cfra)
}
/* only reset unborn particles if they're shown or if the particle is born soon*/
- if (pa->alive==PARS_UNBORN
- && (part->flag & PART_UNBORN || cfra + psys->pointcache->step > pa->time))
+ if (pa->alive==PARS_UNBORN && (part->flag & PART_UNBORN || (cfra + psys->pointcache->step > pa->time))) {
reset_particle(sim, pa, dtime, cfra);
- else if (part->phystype == PART_PHYS_NO)
+ }
+ else if (part->phystype == PART_PHYS_NO) {
reset_particle(sim, pa, dtime, cfra);
+ }
if (ELEM(pa->alive, PARS_ALIVE, PARS_DYING)==0 || (pa->flag & (PARS_UNEXIST|PARS_NO_DISP)))
pa->state.time = -1.f;
diff --git a/source/blender/blenkernel/intern/pointcache.c b/source/blender/blenkernel/intern/pointcache.c
index 100bd485c36..dbcef9ad4c8 100644
--- a/source/blender/blenkernel/intern/pointcache.c
+++ b/source/blender/blenkernel/intern/pointcache.c
@@ -821,9 +821,12 @@ void BKE_ptcache_id_from_particles(PTCacheID *pid, Object *ob, ParticleSystem *p
if (psys->part->flag & PART_ROTATIONS) {
pid->data_types|= (1<<BPHYS_DATA_ROTATION);
- if (psys->part->rotmode!=PART_ROT_VEL
- || psys->part->avemode==PART_AVE_RAND || psys->part->avefac!=0.0f)
- pid->data_types|= (1<<BPHYS_DATA_AVELOCITY);
+ if (psys->part->rotmode != PART_ROT_VEL ||
+ psys->part->avemode == PART_AVE_RAND ||
+ psys->part->avefac != 0.0f)
+ {
+ pid->data_types |= (1 << BPHYS_DATA_AVELOCITY);
+ }
}
pid->info_types= (1<<BPHYS_DATA_TIMES);
diff --git a/source/blender/blenkernel/intern/seqeffects.c b/source/blender/blenkernel/intern/seqeffects.c
index 3aadfa309c5..52f59fb8b80 100644
--- a/source/blender/blenkernel/intern/seqeffects.c
+++ b/source/blender/blenkernel/intern/seqeffects.c
@@ -3076,8 +3076,9 @@ void sequence_effect_speed_rebuild_map(Scene *scene, Sequence * seq, int force)
fallback_fac = 1.0;
if (seq->flag & SEQ_USE_EFFECT_DEFAULT_FADE) {
- if (seq->seq1->enddisp != seq->seq1->start
- && seq->seq1->len != 0) {
+ if ((seq->seq1->enddisp != seq->seq1->start) &&
+ (seq->seq1->len != 0))
+ {
fallback_fac = (float) seq->seq1->len /
(float) (seq->seq1->enddisp - seq->seq1->start);
flags = SEQ_SPEED_INTEGRATE;
diff --git a/source/blender/blenkernel/intern/sequencer.c b/source/blender/blenkernel/intern/sequencer.c
index e27ff4ddeda..97edba7d9ef 100644
--- a/source/blender/blenkernel/intern/sequencer.c
+++ b/source/blender/blenkernel/intern/sequencer.c
@@ -3067,10 +3067,10 @@ void seq_tx_set_final_right(Sequence *seq, int val)
* since they work a bit differently to normal image seq's (during transform) */
int seq_single_check(Sequence *seq)
{
- return (seq->len == 1 && (
- seq->type == SEQ_IMAGE
- || ((seq->type & SEQ_EFFECT) &&
- get_sequence_effect_num_inputs(seq->type) == 0)));
+ return ((seq->len == 1) &&
+ (seq->type == SEQ_IMAGE ||
+ ((seq->type & SEQ_EFFECT) &&
+ get_sequence_effect_num_inputs(seq->type) == 0)));
}
/* check if the selected seq's reference unselected seq's */
diff --git a/source/blender/blenkernel/intern/shrinkwrap.c b/source/blender/blenkernel/intern/shrinkwrap.c
index 6513399c962..4006837efd6 100644
--- a/source/blender/blenkernel/intern/shrinkwrap.c
+++ b/source/blender/blenkernel/intern/shrinkwrap.c
@@ -325,8 +325,8 @@ static void shrinkwrap_calc_normal_projection(ShrinkwrapCalcData *calc)
}
//After sucessufuly build the trees, start projection vertexs
- if ( bvhtree_from_mesh_faces(&treeData, calc->target, 0.0, 4, 6)
- && (auxMesh == NULL || bvhtree_from_mesh_faces(&auxData, auxMesh, 0.0, 4, 6)))
+ if (bvhtree_from_mesh_faces(&treeData, calc->target, 0.0, 4, 6) &&
+ (auxMesh == NULL || bvhtree_from_mesh_faces(&auxData, auxMesh, 0.0, 4, 6)))
{
#ifndef __APPLE__
diff --git a/source/blender/blenkernel/intern/writeframeserver.c b/source/blender/blenkernel/intern/writeframeserver.c
index 4bb9c497980..62e921f3311 100644
--- a/source/blender/blenkernel/intern/writeframeserver.c
+++ b/source/blender/blenkernel/intern/writeframeserver.c
@@ -206,8 +206,7 @@ static int handle_request(RenderData *rd, char * req)
*p = 0;
- if (strcmp(path, "/index.html") == 0
- || strcmp(path, "/") == 0) {
+ if (strcmp(path, "/index.html") == 0 || strcmp(path, "/") == 0) {
safe_puts(index_page);
return -1;
}
diff --git a/source/blender/blenlib/intern/BLI_kdopbvh.c b/source/blender/blenlib/intern/BLI_kdopbvh.c
index d43f8ae735b..2cc67b3f0aa 100644
--- a/source/blender/blenlib/intern/BLI_kdopbvh.c
+++ b/source/blender/blenlib/intern/BLI_kdopbvh.c
@@ -1328,8 +1328,8 @@ static void bfs_find_nearest(BVHNearestData *data, BVHNode *node)
else
{
//adjust heap size
- if (heap_size >= max_heap_size
- && ADJUST_MEMORY(default_heap, (void**)&heap, heap_size+1, &max_heap_size, sizeof(heap[0])) == FALSE)
+ if ((heap_size >= max_heap_size) &&
+ ADJUST_MEMORY(default_heap, (void**)&heap, heap_size+1, &max_heap_size, sizeof(heap[0])) == FALSE)
{
printf("WARNING: bvh_find_nearest got out of memory\n");
@@ -1429,9 +1429,11 @@ static float ray_nearest_hit(BVHRayCastData *data, float *bv)
if (data->ray_dot_axis[i] == 0.0f)
{
//axis aligned ray
- if (data->ray.origin[i] < bv[0] - data->ray.radius
- || data->ray.origin[i] > bv[1] + data->ray.radius)
+ if (data->ray.origin[i] < bv[0] - data->ray.radius ||
+ data->ray.origin[i] > bv[1] + data->ray.radius)
+ {
return FLT_MAX;
+ }
}
else
{
diff --git a/source/blender/blenlib/intern/rand.c b/source/blender/blenlib/intern/rand.c
index 2e722c2a135..b2e6cabec57 100644
--- a/source/blender/blenlib/intern/rand.c
+++ b/source/blender/blenlib/intern/rand.c
@@ -119,7 +119,7 @@ void rng_shuffleArray(RNG *rng, void *data, int elemSize, int numElems)
temp = malloc(elemSize);
- /* XXX Shouldn’t it rather be "while (i--) {" ?
+ /* XXX Shouldn't it rather be "while (i--) {" ?
* Else we have no guaranty first (0) element has a chance to be shuffled... --mont29 */
while (--i) {
int j = rng_getInt(rng)%numElems;
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index a49aca3c8dc..74988546a42 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -11231,9 +11231,9 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
/* Add default gravity to scenes */
for (sce= main->scene.first; sce; sce= sce->id.next) {
- if ((sce->physics_settings.flag & PHYS_GLOBAL_GRAVITY) == 0
- && len_v3(sce->physics_settings.gravity) == 0.0f) {
-
+ if ((sce->physics_settings.flag & PHYS_GLOBAL_GRAVITY) == 0 &&
+ len_v3(sce->physics_settings.gravity) == 0.0f)
+ {
sce->physics_settings.gravity[0] = sce->physics_settings.gravity[1] = 0.0f;
sce->physics_settings.gravity[2] = -9.81f;
sce->physics_settings.flag = PHYS_GLOBAL_GRAVITY;
diff --git a/source/blender/editors/curve/editcurve.c b/source/blender/editors/curve/editcurve.c
index 4262b3d67d4..c19041b817e 100644
--- a/source/blender/editors/curve/editcurve.c
+++ b/source/blender/editors/curve/editcurve.c
@@ -2580,9 +2580,12 @@ static short nurb_has_selected_cps(ListBase *editnurb)
bezt= nu->bezt;
while (a--) {
if (bezt->hide==0) {
- if ((bezt->f1 & SELECT)
- || (bezt->f2 & SELECT)
- || (bezt->f3 & SELECT)) return 1;
+ if ((bezt->f1 & SELECT) ||
+ (bezt->f2 & SELECT) ||
+ (bezt->f3 & SELECT))
+ {
+ return 1;
+ }
}
bezt++;
}
diff --git a/source/blender/editors/interface/interface_templates.c b/source/blender/editors/interface/interface_templates.c
index 9a02b858731..d0f760d16fb 100644
--- a/source/blender/editors/interface/interface_templates.c
+++ b/source/blender/editors/interface/interface_templates.c
@@ -763,8 +763,8 @@ static uiLayout *draw_modifier(uiLayout *layout, Scene *scene, Object *ob,
/* mode enabling buttons */
uiBlockBeginAlign(block);
/* Softbody not allowed in this situation, enforce! */
- if ( ((md->type != eModifierType_Softbody && md->type != eModifierType_Collision) || !(ob->pd && ob->pd->deflect))
- && (md->type != eModifierType_Surface) )
+ if (((md->type != eModifierType_Softbody && md->type != eModifierType_Collision) || !(ob->pd && ob->pd->deflect)) &&
+ (md->type != eModifierType_Surface) )
{
uiItemR(row, &ptr, "show_render", 0, "", ICON_NONE);
uiItemR(row, &ptr, "show_viewport", 0, "", ICON_NONE);
diff --git a/source/blender/editors/physics/particle_edit.c b/source/blender/editors/physics/particle_edit.c
index 15b7294440a..5f22165176b 100644
--- a/source/blender/editors/physics/particle_edit.c
+++ b/source/blender/editors/physics/particle_edit.c
@@ -3471,8 +3471,7 @@ 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);
diff --git a/source/blender/editors/render/render_opengl.c b/source/blender/editors/render/render_opengl.c
index 2467d4327ed..f9737b02a01 100644
--- a/source/blender/editors/render/render_opengl.c
+++ b/source/blender/editors/render/render_opengl.c
@@ -471,7 +471,7 @@ static int screen_opengl_render_anim_step(bContext *C, wmOperator *op)
Object *camera = NULL;
/* update animated image textures for gpu, etc,
- * call before scene_update_for_newframe so modifiers with textuers don't lag 1 frame */
+ * call before scene_update_for_newframe so modifiers with textures don't lag 1 frame */
ED_image_update_frame(bmain, scene->r.cfra);
/* go to next frame */
diff --git a/source/blender/editors/sculpt_paint/paint_image.c b/source/blender/editors/sculpt_paint/paint_image.c
index 9f7cc7a75b1..d381aa5b536 100644
--- a/source/blender/editors/sculpt_paint/paint_image.c
+++ b/source/blender/editors/sculpt_paint/paint_image.c
@@ -5217,8 +5217,8 @@ static void brush_drawcursor(bContext *C, int x, int y, void *UNUSED(customdata)
float alpha = 0.5f;
ts = scene->toolsettings;
- use_zoom = get_imapaint_zoom(C, &zoomx, &zoomy)
- && !(ts->use_uv_sculpt && (scene->basact->object->mode == OB_MODE_EDIT));
+ use_zoom = get_imapaint_zoom(C, &zoomx, &zoomy) &&
+ !(ts->use_uv_sculpt && (scene->basact->object->mode == OB_MODE_EDIT));
if (use_zoom) {
pixel_size = MAX2(size * zoomx, size * zoomy);
diff --git a/source/blender/editors/sculpt_paint/sculpt_uv.c b/source/blender/editors/sculpt_paint/sculpt_uv.c
index b4f8f689a6a..fd1c6984346 100644
--- a/source/blender/editors/sculpt_paint/sculpt_uv.c
+++ b/source/blender/editors/sculpt_paint/sculpt_uv.c
@@ -537,8 +537,9 @@ static UvSculptData *uv_sculpt_stroke_init(bContext *C, wmOperator *op, wmEvent
/* Count 'unique' uvs */
for (i = 0; i < data->elementMap->totalUVs; i++) {
- if (data->elementMap->buf[i].separate
- && (!do_island_optimization || data->elementMap->buf[i].island == island_index)) {
+ if (data->elementMap->buf[i].separate &&
+ (!do_island_optimization || data->elementMap->buf[i].island == island_index))
+ {
counter++;
}
}
diff --git a/source/blender/editors/space_file/file_draw.c b/source/blender/editors/space_file/file_draw.c
index 87f32fe4eb8..193fa2d2c65 100644
--- a/source/blender/editors/space_file/file_draw.c
+++ b/source/blender/editors/space_file/file_draw.c
@@ -155,8 +155,7 @@ void file_draw_buttons(const bContext *C, ARegion *ar)
btn_margin + UI_GetStringWidth(params->title));
}
- if (available_w <= loadbutton + separator + input_minw
- || params->title[0] == 0) {
+ if (available_w <= loadbutton + separator + input_minw || params->title[0] == 0) {
loadbutton = 0;
}
else {
diff --git a/source/blender/editors/space_file/filelist.c b/source/blender/editors/space_file/filelist.c
index d7c4056431f..45a271cc7e9 100644
--- a/source/blender/editors/space_file/filelist.c
+++ b/source/blender/editors/space_file/filelist.c
@@ -767,16 +767,18 @@ static int file_extension_type(const char *relname)
else if (BLI_testextensie(relname, ".py")) {
return PYSCRIPTFILE;
}
- else if (BLI_testextensie(relname, ".txt")
- || BLI_testextensie(relname, ".glsl")
- || BLI_testextensie(relname, ".data")) {
+ else if (BLI_testextensie(relname, ".txt") ||
+ BLI_testextensie(relname, ".glsl") ||
+ BLI_testextensie(relname, ".data"))
+ {
return TEXTFILE;
}
- else if ( BLI_testextensie(relname, ".ttf")
- || BLI_testextensie(relname, ".ttc")
- || BLI_testextensie(relname, ".pfb")
- || BLI_testextensie(relname, ".otf")
- || BLI_testextensie(relname, ".otc")) {
+ else if (BLI_testextensie(relname, ".ttf") ||
+ BLI_testextensie(relname, ".ttc") ||
+ BLI_testextensie(relname, ".pfb") ||
+ BLI_testextensie(relname, ".otf") ||
+ BLI_testextensie(relname, ".otc"))
+ {
return FTFONTFILE;
}
else if (BLI_testextensie(relname, ".btx")) {
@@ -785,8 +787,9 @@ static int file_extension_type(const char *relname)
else if (BLI_testextensie(relname, ".dae")) {
return COLLADAFILE;
}
- else if (BLI_testextensie_array(relname, imb_ext_image)
- || (G.have_quicktime && BLI_testextensie_array(relname, imb_ext_image_qt))) {
+ else if (BLI_testextensie_array(relname, imb_ext_image) ||
+ (G.have_quicktime && BLI_testextensie_array(relname, imb_ext_image_qt)))
+ {
return IMAGEFILE;
}
else if (BLI_testextensie_array(relname, imb_ext_movie)) {
@@ -838,8 +841,9 @@ static void filelist_setfiletypes(struct FileList* filelist)
}
file->flags = file_extension_type(file->relname);
- if (filelist->filter_glob
- && BLI_testextensie_glob(file->relname, filelist->filter_glob)) {
+ if (filelist->filter_glob &&
+ BLI_testextensie_glob(file->relname, filelist->filter_glob))
+ {
file->flags= OPERATORFILE;
}
diff --git a/source/blender/editors/space_logic/logic_window.c b/source/blender/editors/space_logic/logic_window.c
index 0467579d0f2..f7c69c80067 100644
--- a/source/blender/editors/space_logic/logic_window.c
+++ b/source/blender/editors/space_logic/logic_window.c
@@ -3228,8 +3228,8 @@ static void draw_sensor_header(uiLayout *layout, PointerRNA *ptr, PointerRNA *lo
}
sub= uiLayoutRow(row, 0);
- uiLayoutSetActive(sub, ((RNA_boolean_get(logic_ptr, "show_sensors_active_states")
- && RNA_boolean_get(ptr, "show_expanded")) || RNA_boolean_get(ptr, "pin")));
+ uiLayoutSetActive(sub, ((RNA_boolean_get(logic_ptr, "show_sensors_active_states") &&
+ RNA_boolean_get(ptr, "show_expanded")) || RNA_boolean_get(ptr, "pin")));
uiItemR(sub, ptr, "pin", UI_ITEM_R_NO_BG, "", ICON_NONE);
if (RNA_boolean_get(ptr, "show_expanded")==0) {
@@ -3253,8 +3253,8 @@ static void draw_sensor_internal_header(uiLayout *layout, PointerRNA *ptr)
uiItemR(row, ptr, "use_pulse_false_level", 0, "", ICON_DOTSDOWN);
sub=uiLayoutRow(row, 0);
- uiLayoutSetActive(sub, (RNA_boolean_get(ptr, "use_pulse_true_level")
- || RNA_boolean_get(ptr, "use_pulse_false_level")));
+ uiLayoutSetActive(sub, (RNA_boolean_get(ptr, "use_pulse_true_level") ||
+ RNA_boolean_get(ptr, "use_pulse_false_level")));
uiItemR(sub, ptr, "frequency", 0, "Freq", ICON_NONE);
row= uiLayoutRow(split, 1);
@@ -3677,8 +3677,8 @@ static void draw_actuator_header(uiLayout *layout, PointerRNA *ptr, PointerRNA *
}
sub= uiLayoutRow(row, 0);
- uiLayoutSetActive(sub, ((RNA_boolean_get(logic_ptr, "show_actuators_active_states")
- && RNA_boolean_get(ptr, "show_expanded")) || RNA_boolean_get(ptr, "pin")));
+ uiLayoutSetActive(sub, ((RNA_boolean_get(logic_ptr, "show_actuators_active_states") &&
+ RNA_boolean_get(ptr, "show_expanded")) || RNA_boolean_get(ptr, "pin")));
uiItemR(sub, ptr, "pin", UI_ITEM_R_NO_BG, "", ICON_NONE);
if (RNA_boolean_get(ptr, "show_expanded")==0) {
diff --git a/source/blender/editors/space_node/node_edit.c b/source/blender/editors/space_node/node_edit.c
index c41cb2b6211..dda06267237 100644
--- a/source/blender/editors/space_node/node_edit.c
+++ b/source/blender/editors/space_node/node_edit.c
@@ -695,8 +695,10 @@ void ED_node_set_active(Main *bmain, bNodeTree *ntree, bNode *node)
static int inside_rctf(rctf *bounds, rctf *rect)
{
- return (bounds->xmin <= rect->xmin && bounds->xmax >= rect->xmax
- && bounds->ymin <= rect->ymin && bounds->ymax >= rect->ymax);
+ return (bounds->xmin <= rect->xmin &&
+ bounds->xmax >= rect->xmax &&
+ bounds->ymin <= rect->ymin &&
+ bounds->ymax >= rect->ymax);
}
static void node_frame_attach_nodes(bNodeTree *UNUSED(ntree), bNode *frame)
@@ -1893,8 +1895,10 @@ static int outside_group_rect(SpaceNode *snode)
{
bNode *gnode= node_tree_get_editgroup(snode->nodetree);
if (gnode) {
- return (snode->mx < gnode->totr.xmin || snode->mx >= gnode->totr.xmax
- || snode->my < gnode->totr.ymin || snode->my >= gnode->totr.ymax);
+ return (snode->mx < gnode->totr.xmin ||
+ snode->mx >= gnode->totr.xmax ||
+ snode->my < gnode->totr.ymin ||
+ snode->my >= gnode->totr.ymax);
}
return 0;
}
@@ -2192,8 +2196,9 @@ static int node_duplicate_exec(bContext *C, wmOperator *op)
/* This creates new links between copied nodes.
* If keep_inputs is set, also copies input links from unselected (when fromnode==NULL)!
*/
- if (link->tonode && (link->tonode->flag & NODE_SELECT)
- && (keep_inputs || (link->fromnode && (link->fromnode->flag & NODE_SELECT)))) {
+ if (link->tonode && (link->tonode->flag & NODE_SELECT) &&
+ (keep_inputs || (link->fromnode && (link->fromnode->flag & NODE_SELECT))))
+ {
newlink = MEM_callocN(sizeof(bNodeLink), "bNodeLink");
newlink->flag = link->flag;
newlink->tonode = link->tonode->new_node;
diff --git a/source/blender/editors/space_sequencer/sequencer_select.c b/source/blender/editors/space_sequencer/sequencer_select.c
index b8fc66cd3c3..2447ca6cfbe 100644
--- a/source/blender/editors/space_sequencer/sequencer_select.c
+++ b/source/blender/editors/space_sequencer/sequencer_select.c
@@ -1096,10 +1096,12 @@ static short select_grouped_effect_link(Editing *ed, Sequence *actseq)
/* Ignore all seqs already selected! */
/* Ignore all seqs not sharing some time with active one. */
/* Ignore all seqs of incompatible types (audio vs video). */
- if ((seq->flag & SELECT) || (seq->startdisp >= enddisp) || (seq->enddisp < startdisp)
- || (!is_audio && SEQ_IS_SOUND(seq))
- || (is_audio && !((seq->type == SEQ_META) || SEQ_IS_SOUND(seq))))
+ if ((seq->flag & SELECT) || (seq->startdisp >= enddisp) || (seq->enddisp < startdisp) ||
+ (!is_audio && SEQ_IS_SOUND(seq)) ||
+ (is_audio && !((seq->type == SEQ_META) || SEQ_IS_SOUND(seq))))
+ {
continue;
+ }
/* If the seq is an effect one, we need extra cheking! */
if (SEQ_IS_EFFECT(seq) && ((seq->seq1 && seq->seq1->tmp) ||
diff --git a/source/blender/editors/space_view3d/drawobject.c b/source/blender/editors/space_view3d/drawobject.c
index 7ccf4b6c81a..c6172492025 100644
--- a/source/blender/editors/space_view3d/drawobject.c
+++ b/source/blender/editors/space_view3d/drawobject.c
@@ -4341,8 +4341,8 @@ static void draw_new_particle_system(Scene *scene, View3D *v3d, RegionView3D *rv
normalize_v3(imat[1]);
}
- if (ELEM3(draw_as, PART_DRAW_DOT, PART_DRAW_CROSS, PART_DRAW_LINE)
- && part->draw_col > PART_DRAW_COL_MAT)
+ if (ELEM3(draw_as, PART_DRAW_DOT, PART_DRAW_CROSS, PART_DRAW_LINE) &&
+ (part->draw_col > PART_DRAW_COL_MAT))
{
create_cdata = 1;
}
diff --git a/source/blender/editors/space_view3d/view3d_header.c b/source/blender/editors/space_view3d/view3d_header.c
index a3031bc3cfa..ab4eca2e303 100644
--- a/source/blender/editors/space_view3d/view3d_header.c
+++ b/source/blender/editors/space_view3d/view3d_header.c
@@ -294,10 +294,7 @@ static char *view3d_modeselect_pup(Scene *scene)
if (!((ID *)ob->data)->lib) {
/* if active object is editable */
- if ( ((ob->type == OB_MESH)
- || (ob->type == OB_CURVE) || (ob->type == OB_SURF) || (ob->type == OB_FONT)
- || (ob->type == OB_MBALL) || (ob->type == OB_LATTICE))) {
-
+ if (ELEM6(ob->type, OB_MESH, OB_CURVE, OB_SURF, OB_FONT, OB_MBALL, OB_LATTICE)) {
str += modeselect_addmode(str, N_("Edit Mode"), OB_MODE_EDIT, ICON_EDITMODE_HLT);
}
else if (ob->type == OB_ARMATURE) {
diff --git a/source/blender/editors/transform/transform_conversions.c b/source/blender/editors/transform/transform_conversions.c
index 77573dbee4c..fecd32c06a0 100644
--- a/source/blender/editors/transform/transform_conversions.c
+++ b/source/blender/editors/transform/transform_conversions.c
@@ -6005,8 +6005,7 @@ void createTransData(bContext *C, TransInfo *t)
}
}
- else if (ob && (ob->mode & OB_MODE_PARTICLE_EDIT)
- && PE_start_edit(PE_get_current(scene, ob))) {
+ else if (ob && (ob->mode & OB_MODE_PARTICLE_EDIT) && PE_start_edit(PE_get_current(scene, ob))) {
createTransParticleVerts(C, t);
t->flag |= T_POINTS;
diff --git a/source/blender/editors/transform/transform_generics.c b/source/blender/editors/transform/transform_generics.c
index bf6a47ed06c..0af4830e3c6 100644
--- a/source/blender/editors/transform/transform_generics.c
+++ b/source/blender/editors/transform/transform_generics.c
@@ -1629,7 +1629,8 @@ void calculatePropRatio(TransInfo *t)
(td->flag & TD_NOTCONNECTED || td->dist > t->prop_size))
||
(connected == 0 &&
- td->rdist > t->prop_size)) {
+ td->rdist > t->prop_size))
+ {
/*
* The elements are sorted according to their dist member in the array,
* that means we can stop when it finds one element outside of the propsize.
diff --git a/source/blender/imbuf/intern/anim_movie.c b/source/blender/imbuf/intern/anim_movie.c
index 01a9a0a7303..0c8f932db6a 100644
--- a/source/blender/imbuf/intern/anim_movie.c
+++ b/source/blender/imbuf/intern/anim_movie.c
@@ -636,8 +636,9 @@ static void ffmpeg_postprocess(struct anim * anim)
/* This means the data wasnt read properly,
* this check stops crashing */
- if (input->data[0]==0 && input->data[1]==0
- && input->data[2]==0 && input->data[3]==0) {
+ if (input->data[0]==0 && input->data[1]==0 &&
+ input->data[2]==0 && input->data[3]==0)
+ {
fprintf(stderr, "ffmpeg_fetchibuf: "
"data not read properly...\n");
return;
@@ -945,10 +946,11 @@ static ImBuf * ffmpeg_fetchibuf(struct anim * anim, int position,
return anim->last_frame;
}
- if (position > anim->curposition + 1
- && anim->preseek
- && !tc_index
- && position - (anim->curposition + 1) < anim->preseek) {
+ if (position > anim->curposition + 1 &&
+ anim->preseek &&
+ !tc_index &&
+ position - (anim->curposition + 1) < anim->preseek)
+ {
av_log(anim->pFormatCtx, AV_LOG_DEBUG,
"FETCH: within preseek interval (no index)\n");
diff --git a/source/blender/imbuf/intern/util.c b/source/blender/imbuf/intern/util.c
index 1d629876727..85a2fd3dd91 100644
--- a/source/blender/imbuf/intern/util.c
+++ b/source/blender/imbuf/intern/util.c
@@ -372,24 +372,26 @@ int IMB_isanim(const char *filename)
if (U.uiflag & USER_FILTERFILEEXTS) {
if (G.have_quicktime) {
- if ( BLI_testextensie(filename, ".avi")
- || BLI_testextensie(filename, ".flc")
- || BLI_testextensie(filename, ".dv")
- || BLI_testextensie(filename, ".r3d")
- || BLI_testextensie(filename, ".mov")
- || BLI_testextensie(filename, ".movie")
- || BLI_testextensie(filename, ".mv")) {
+ if (BLI_testextensie(filename, ".avi") ||
+ BLI_testextensie(filename, ".flc") ||
+ BLI_testextensie(filename, ".dv") ||
+ BLI_testextensie(filename, ".r3d") ||
+ BLI_testextensie(filename, ".mov") ||
+ BLI_testextensie(filename, ".movie") ||
+ BLI_testextensie(filename, ".mv"))
+ {
type = imb_get_anim_type(filename);
}
else {
return(FALSE);
}
}
- else { // no quicktime
- if ( BLI_testextensie(filename, ".avi")
- || BLI_testextensie(filename, ".dv")
- || BLI_testextensie(filename, ".r3d")
- || BLI_testextensie(filename, ".mv")) {
+ else { /* no quicktime */
+ if (BLI_testextensie(filename, ".avi") ||
+ BLI_testextensie(filename, ".dv") ||
+ BLI_testextensie(filename, ".r3d") ||
+ BLI_testextensie(filename, ".mv"))
+ {
type = imb_get_anim_type(filename);
}
else {
@@ -397,7 +399,7 @@ int IMB_isanim(const char *filename)
}
}
}
- else { // no FILTERFILEEXTS
+ else { /* no FILTERFILEEXTS */
type = imb_get_anim_type(filename);
}
diff --git a/source/blender/makesdna/intern/makesdna.c b/source/blender/makesdna/intern/makesdna.c
index 5a38bcbef04..f67fff460f1 100644
--- a/source/blender/makesdna/intern/makesdna.c
+++ b/source/blender/makesdna/intern/makesdna.c
@@ -360,8 +360,9 @@ static int add_name(const char *str)
* */
buf[i] = 0;
if (debugSDNA > 3) printf("Name before chomping: %s\n", buf);
- if ( (strncmp(buf,"(*headdraw", 10) == 0)
- || (strncmp(buf,"(*windraw", 9) == 0) ) {
+ if ((strncmp(buf,"(*headdraw", 10) == 0) ||
+ (strncmp(buf,"(*windraw", 9) == 0) )
+ {
buf[i] = ')';
buf[i+1] = '(';
buf[i+2] = 'v';
diff --git a/source/blender/modifiers/intern/MOD_array.c b/source/blender/modifiers/intern/MOD_array.c
index c271292c601..b2a25086af9 100644
--- a/source/blender/modifiers/intern/MOD_array.c
+++ b/source/blender/modifiers/intern/MOD_array.c
@@ -370,8 +370,7 @@ static DerivedMesh *arrayModifier_doArray(ArrayModifierData *amd,
/* calculate the maximum number of copies which will fit within the
* prescribed length */
- if (amd->fit_type == MOD_ARR_FITLENGTH
- || amd->fit_type == MOD_ARR_FITCURVE) {
+ if (amd->fit_type == MOD_ARR_FITLENGTH || amd->fit_type == MOD_ARR_FITCURVE) {
float dist = sqrt(dot_v3v3(offset[3], offset[3]));
if (dist > 1e-6f)
diff --git a/source/blender/modifiers/intern/MOD_explode.c b/source/blender/modifiers/intern/MOD_explode.c
index 32d88fe28bc..a1dc69918c2 100644
--- a/source/blender/modifiers/intern/MOD_explode.c
+++ b/source/blender/modifiers/intern/MOD_explode.c
@@ -1007,10 +1007,10 @@ static DerivedMesh * applyModifier(ModifierData *md, Object *ob,
if (psmd->dm==NULL) return derivedData;
/* 1. find faces to be exploded if needed */
- if (emd->facepa == NULL
- || psmd->flag&eParticleSystemFlag_Pars
- || emd->flag&eExplodeFlag_CalcFaces
- || MEM_allocN_len(emd->facepa)/sizeof(int) != dm->getNumTessFaces(dm))
+ if (emd->facepa == NULL ||
+ psmd->flag&eParticleSystemFlag_Pars ||
+ emd->flag&eExplodeFlag_CalcFaces ||
+ MEM_allocN_len(emd->facepa) / sizeof(int) != dm->getNumTessFaces(dm))
{
if (psmd->flag & eParticleSystemFlag_Pars)
psmd->flag &= ~eParticleSystemFlag_Pars;
diff --git a/source/blender/modifiers/intern/MOD_shrinkwrap.c b/source/blender/modifiers/intern/MOD_shrinkwrap.c
index 33736b7e426..ae8ca267b86 100644
--- a/source/blender/modifiers/intern/MOD_shrinkwrap.c
+++ b/source/blender/modifiers/intern/MOD_shrinkwrap.c
@@ -86,10 +86,12 @@ static CustomDataMask requiredDataMask(Object *UNUSED(ob), ModifierData *md)
if (smd->vgroup_name[0])
dataMask |= CD_MASK_MDEFORMVERT;
- if (smd->shrinkType == MOD_SHRINKWRAP_PROJECT
- && smd->projAxis == MOD_SHRINKWRAP_PROJECT_OVER_NORMAL)
+ if ((smd->shrinkType == MOD_SHRINKWRAP_PROJECT) &&
+ (smd->projAxis == MOD_SHRINKWRAP_PROJECT_OVER_NORMAL))
+ {
dataMask |= CD_MASK_MVERT;
-
+ }
+
return dataMask;
}
diff --git a/source/blender/modifiers/intern/MOD_weightvg_util.c b/source/blender/modifiers/intern/MOD_weightvg_util.c
index fad83286d8e..5ce435a7ca5 100644
--- a/source/blender/modifiers/intern/MOD_weightvg_util.c
+++ b/source/blender/modifiers/intern/MOD_weightvg_util.c
@@ -65,10 +65,10 @@ void weightvg_do_map(int num, float *new_w, short falloff_type, CurveMapping *cm
/* Return immediately, if we have nothing to do! */
/* Also security checks... */
- if (((falloff_type == MOD_WVG_MAPPING_CURVE) && (cmap == NULL))
- || !ELEM7(falloff_type, MOD_WVG_MAPPING_CURVE, MOD_WVG_MAPPING_SHARP, MOD_WVG_MAPPING_SMOOTH,
- MOD_WVG_MAPPING_ROOT, MOD_WVG_MAPPING_SPHERE, MOD_WVG_MAPPING_RANDOM,
- MOD_WVG_MAPPING_STEP))
+ if (((falloff_type == MOD_WVG_MAPPING_CURVE) && (cmap == NULL)) ||
+ !ELEM7(falloff_type, MOD_WVG_MAPPING_CURVE, MOD_WVG_MAPPING_SHARP, MOD_WVG_MAPPING_SMOOTH,
+ MOD_WVG_MAPPING_ROOT, MOD_WVG_MAPPING_SPHERE, MOD_WVG_MAPPING_RANDOM,
+ MOD_WVG_MAPPING_STEP))
return;
/* Map each weight (vertex) to its new value, accordingly to the chosen mode. */
diff --git a/source/blender/render/intern/source/shadeinput.c b/source/blender/render/intern/source/shadeinput.c
index 611c21cf0f2..038394b47dc 100644
--- a/source/blender/render/intern/source/shadeinput.c
+++ b/source/blender/render/intern/source/shadeinput.c
@@ -1376,11 +1376,13 @@ void shade_samples_do_AO(ShadeSample *ssamp)
ShadeInput *shi= &ssamp->shi[0];
int sample;
- if (((shi->passflag & SCE_PASS_COMBINED) && (shi->combinedflag & (SCE_PASS_AO|SCE_PASS_ENVIRONMENT|SCE_PASS_INDIRECT)))
- || (shi->passflag & (SCE_PASS_AO|SCE_PASS_ENVIRONMENT|SCE_PASS_INDIRECT)))
+ if (((shi->passflag & SCE_PASS_COMBINED) && (shi->combinedflag & (SCE_PASS_AO|SCE_PASS_ENVIRONMENT|SCE_PASS_INDIRECT))) ||
+ (shi->passflag & (SCE_PASS_AO|SCE_PASS_ENVIRONMENT|SCE_PASS_INDIRECT)))
+ {
for (sample=0; sample<ssamp->tot; shi++, sample++)
if (!(shi->mode & MA_SHLESS))
ambient_occlusion(shi); /* stores in shi->ao[] */
+ }
}
}
diff --git a/source/blender/render/intern/source/shadeoutput.c b/source/blender/render/intern/source/shadeoutput.c
index dcc3bee7730..cf688982eda 100644
--- a/source/blender/render/intern/source/shadeoutput.c
+++ b/source/blender/render/intern/source/shadeoutput.c
@@ -1731,8 +1731,9 @@ void shade_lamp_loop(ShadeInput *shi, ShadeResult *shr)
/* AO pass */
if (R.wrld.mode & (WO_AMB_OCC|WO_ENV_LIGHT|WO_INDIRECT_LIGHT)) {
- if (((passflag & SCE_PASS_COMBINED) && (shi->combinedflag & (SCE_PASS_AO|SCE_PASS_ENVIRONMENT|SCE_PASS_INDIRECT)))
- || (passflag & (SCE_PASS_AO|SCE_PASS_ENVIRONMENT|SCE_PASS_INDIRECT))) {
+ if (((passflag & SCE_PASS_COMBINED) && (shi->combinedflag & (SCE_PASS_AO|SCE_PASS_ENVIRONMENT|SCE_PASS_INDIRECT))) ||
+ (passflag & (SCE_PASS_AO|SCE_PASS_ENVIRONMENT|SCE_PASS_INDIRECT)))
+ {
if (R.r.mode & R_SHADOW) {
/* AO was calculated for scanline already */
if (shi->depth || shi->volume_depth)
diff --git a/source/blender/render/intern/source/strand.c b/source/blender/render/intern/source/strand.c
index e29623aee22..ea6b099996d 100644
--- a/source/blender/render/intern/source/strand.c
+++ b/source/blender/render/intern/source/strand.c
@@ -976,10 +976,16 @@ StrandSurface *cache_strand_surface(Render *re, ObjectRen *obr, DerivedMesh *dm,
totvert= dm->getNumVerts(dm);
totface= dm->getNumTessFaces(dm);
- for (mesh=re->strandsurface.first; mesh; mesh=mesh->next)
- if (mesh->obr.ob == obr->ob && mesh->obr.par == obr->par
- && mesh->obr.index == obr->index && mesh->totvert==totvert && mesh->totface==totface)
+ for (mesh = re->strandsurface.first; mesh; mesh = mesh->next) {
+ if ((mesh->obr.ob == obr->ob) &&
+ (mesh->obr.par == obr->par) &&
+ (mesh->obr.index == obr->index) &&
+ (mesh->totvert == totvert) &&
+ (mesh->totface == totface))
+ {
break;
+ }
+ }
if (!mesh) {
mesh= MEM_callocN(sizeof(StrandSurface), "StrandSurface");
diff --git a/source/blender/render/intern/source/volume_precache.c b/source/blender/render/intern/source/volume_precache.c
index 759bc622bc2..8b059d4a564 100644
--- a/source/blender/render/intern/source/volume_precache.c
+++ b/source/blender/render/intern/source/volume_precache.c
@@ -783,8 +783,8 @@ static void vol_precache_objectinstance_threads(Render *re, ObjectInstanceRen *o
static int using_lightcache(Material *ma)
{
- return (((ma->vol.shadeflag & MA_VOL_PRECACHESHADING) && (ma->vol.shade_type == MA_VOL_SHADE_SHADED))
- || (ELEM(ma->vol.shade_type, MA_VOL_SHADE_MULTIPLE, MA_VOL_SHADE_SHADEDPLUSMULTIPLE)));
+ return (((ma->vol.shadeflag & MA_VOL_PRECACHESHADING) && (ma->vol.shade_type == MA_VOL_SHADE_SHADED)) ||
+ (ELEM(ma->vol.shade_type, MA_VOL_SHADE_MULTIPLE, MA_VOL_SHADE_SHADEDPLUSMULTIPLE)));
}
/* loop through all objects (and their associated materials)