From 85de548e03fcaf657356382286a7ca6d6fbd30f3 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 16 Apr 2018 17:08:27 +0200 Subject: Cleanup: indentation --- source/blender/blenkernel/BKE_paint.h | 5 +- source/blender/blenkernel/intern/boids.c | 8 ++-- source/blender/blenkernel/intern/constraint.c | 2 +- source/blender/blenkernel/intern/data_transfer.c | 6 +-- source/blender/blenkernel/intern/effect.c | 34 +++++++------- source/blender/blenkernel/intern/particle_system.c | 52 +++++++++++---------- source/blender/blenkernel/intern/pointcache.c | 15 +++--- source/blender/blenkernel/intern/smoke.c | 20 ++++---- source/blender/blenkernel/intern/softbody.c | 54 +++++++++++----------- source/blender/blenloader/intern/versioning_260.c | 2 +- source/blender/bmesh/intern/bmesh_opdefines.c | 4 +- .../blender/bmesh/operators/bmo_offset_edgeloops.c | 1 + source/blender/collada/AnimationImporter.cpp | 18 ++++---- source/blender/collada/EffectExporter.cpp | 5 +- source/blender/collada/GeometryExporter.cpp | 5 +- source/blender/collada/InstanceWriter.cpp | 5 +- source/blender/collada/MaterialExporter.cpp | 5 +- source/blender/collada/MeshImporter.cpp | 5 +- source/blender/collada/collada_utils.cpp | 24 +++++----- .../operations/COM_CompositorOperation.cpp | 50 ++++++++++---------- .../editors/armature/editarmature_retarget.c | 1 + source/blender/editors/interface/resources.c | 4 +- source/blender/editors/mesh/editmesh_knife.c | 2 +- source/blender/editors/physics/particle_edit.c | 44 +++++++++--------- source/blender/editors/screen/screen_ops.c | 1 + source/blender/editors/space_file/space_file.c | 2 +- source/blender/editors/space_nla/nla_buttons.c | 2 +- .../editors/space_sequencer/sequencer_draw.c | 2 +- source/blender/editors/transform/transform.c | 2 +- .../blender/imbuf/intern/dds/DirectDrawSurface.cpp | 13 +++--- source/blender/makesrna/intern/rna_material.c | 2 +- source/blender/render/intern/source/shadeoutput.c | 24 +++++----- 32 files changed, 220 insertions(+), 199 deletions(-) (limited to 'source') diff --git a/source/blender/blenkernel/BKE_paint.h b/source/blender/blenkernel/BKE_paint.h index c7a4f6b2fb6..285b9b3f99f 100644 --- a/source/blender/blenkernel/BKE_paint.h +++ b/source/blender/blenkernel/BKE_paint.h @@ -234,9 +234,8 @@ typedef struct SculptSession { struct MDeformVert *dvert_prev; } wpaint; - //struct { - //ToDo: identify sculpt-only fields - //} sculpt; + /* TODO: identify sculpt-only fields */ + // struct { ... } sculpt; } mode; int mode_type; diff --git a/source/blender/blenkernel/intern/boids.c b/source/blender/blenkernel/intern/boids.c index a2a242e7519..024c0aeb23f 100644 --- a/source/blender/blenkernel/intern/boids.c +++ b/source/blender/blenkernel/intern/boids.c @@ -161,8 +161,10 @@ static int rule_goal_avoid(BoidRule *rule, BoidBrainData *bbd, BoidValues *val, copy_v3_v3(bbd->goal_nor, efd.nor); } } - else if (rule->type == eBoidRuleType_Avoid && bpa->data.mode == eBoidMode_Climbing && - priority > 2.0f * gabr->fear_factor) { + else if ((rule->type == eBoidRuleType_Avoid) && + (bpa->data.mode == eBoidMode_Climbing) && + (priority > 2.0f * gabr->fear_factor)) + { /* detach from surface and try to fly away from danger */ negate_v3_v3(efd.vec_to_point, bpa->gravity); } @@ -1106,7 +1108,7 @@ void boid_brain(BoidBrainData *bbd, int p, ParticleData *pa) /* jump to go faster */ if (jump == 0 && val.jump_speed > val.max_speed && bbd->wanted_speed > val.max_speed) { - + /* pass */ } if (jump) { diff --git a/source/blender/blenkernel/intern/constraint.c b/source/blender/blenkernel/intern/constraint.c index 06817133382..28e4af32a71 100644 --- a/source/blender/blenkernel/intern/constraint.c +++ b/source/blender/blenkernel/intern/constraint.c @@ -2641,7 +2641,7 @@ static void distlimit_evaluate(bConstraint *con, bConstraintOb *cob, ListBase *t /* if soft-distance is enabled, start fading once owner is dist+softdist from the target */ else if (data->flag & LIMITDIST_USESOFT) { if (dist <= (data->dist + data->soft)) { - + /* pass */ } } } diff --git a/source/blender/blenkernel/intern/data_transfer.c b/source/blender/blenkernel/intern/data_transfer.c index 3bc09c0173b..38340575e74 100644 --- a/source/blender/blenkernel/intern/data_transfer.c +++ b/source/blender/blenkernel/intern/data_transfer.c @@ -107,7 +107,7 @@ bool BKE_object_data_transfer_get_dttypes_capacity( } switch (dtdata_type) { - /* Vertex data */ + /* Vertex data */ case DT_TYPE_MDEFORMVERT: *r_advanced_mixing = true; *r_threshold = true; @@ -120,7 +120,7 @@ bool BKE_object_data_transfer_get_dttypes_capacity( case DT_TYPE_BWEIGHT_VERT: ret = true; break; - /* Edge data */ + /* Edge data */ case DT_TYPE_SHARP_EDGE: *r_threshold = true; ret = true; @@ -139,7 +139,7 @@ bool BKE_object_data_transfer_get_dttypes_capacity( *r_threshold = true; ret = true; break; - /* Loop/Poly data */ + /* Loop/Poly data */ case DT_TYPE_UV: ret = true; break; diff --git a/source/blender/blenkernel/intern/effect.c b/source/blender/blenkernel/intern/effect.c index 749c5897abb..e47af83e00e 100644 --- a/source/blender/blenkernel/intern/effect.c +++ b/source/blender/blenkernel/intern/effect.c @@ -504,28 +504,28 @@ float effector_falloff(EffectorCache *eff, EffectorData *efd, EffectedPoint *UNU falloff=0.0f; else { switch (eff->pd->falloff) { - case PFIELD_FALL_SPHERE: - falloff*= falloff_func_dist(eff->pd, efd->distance); - break; - - case PFIELD_FALL_TUBE: - falloff*= falloff_func_dist(eff->pd, ABS(fac)); - if (falloff == 0.0f) + case PFIELD_FALL_SPHERE: + falloff*= falloff_func_dist(eff->pd, efd->distance); break; - madd_v3_v3v3fl(temp, efd->vec_to_point2, efd->nor, -fac); - r_fac= len_v3(temp); - falloff*= falloff_func_rad(eff->pd, r_fac); - break; - case PFIELD_FALL_CONE: - falloff*= falloff_func_dist(eff->pd, ABS(fac)); - if (falloff == 0.0f) + case PFIELD_FALL_TUBE: + falloff*= falloff_func_dist(eff->pd, ABS(fac)); + if (falloff == 0.0f) + break; + + madd_v3_v3v3fl(temp, efd->vec_to_point2, efd->nor, -fac); + r_fac= len_v3(temp); + falloff*= falloff_func_rad(eff->pd, r_fac); break; + case PFIELD_FALL_CONE: + falloff*= falloff_func_dist(eff->pd, ABS(fac)); + if (falloff == 0.0f) + break; - r_fac= RAD2DEGF(saacos(fac/len_v3(efd->vec_to_point))); - falloff*= falloff_func_rad(eff->pd, r_fac); + r_fac= RAD2DEGF(saacos(fac/len_v3(efd->vec_to_point))); + falloff*= falloff_func_rad(eff->pd, r_fac); - break; + break; } } diff --git a/source/blender/blenkernel/intern/particle_system.c b/source/blender/blenkernel/intern/particle_system.c index 8aeeee5a1ad..94c1dd0c7c3 100644 --- a/source/blender/blenkernel/intern/particle_system.c +++ b/source/blender/blenkernel/intern/particle_system.c @@ -535,18 +535,20 @@ static void initialize_particle_texture(ParticleSimulationData *sim, ParticleDat psys_get_texture(sim, pa, &ptex, PAMAP_INIT, 0.f); switch (part->type) { - case PART_EMITTER: - if (ptex.exist < psys_frand(psys, p+125)) - pa->flag |= PARS_UNEXIST; - pa->time = part->sta + (part->end - part->sta)*ptex.time; - break; - case PART_HAIR: - if (ptex.exist < psys_frand(psys, p+125)) - pa->flag |= PARS_UNEXIST; - pa->time = 0.f; - break; - case PART_FLUID: - break; + case PART_EMITTER: + if (ptex.exist < psys_frand(psys, p + 125)) { + pa->flag |= PARS_UNEXIST; + } + pa->time = part->sta + (part->end - part->sta)*ptex.time; + break; + case PART_HAIR: + if (ptex.exist < psys_frand(psys, p + 125)) { + pa->flag |= PARS_UNEXIST; + } + pa->time = 0.f; + break; + case PART_FLUID: + break; } } @@ -1059,8 +1061,10 @@ void reset_particle(ParticleSimulationData *sim, ParticleData *pa, float dtime, pa->dietime = pa->time + pa->lifetime; - if (sim->psys->pointcache && sim->psys->pointcache->flag & PTCACHE_BAKED && - sim->psys->pointcache->mem_cache.first) { + if ((sim->psys->pointcache) && + (sim->psys->pointcache->flag & PTCACHE_BAKED) && + (sim->psys->pointcache->mem_cache.first)) + { float dietime = psys_get_dietime_from_cache(sim->psys->pointcache, p); pa->dietime = MIN2(pa->dietime, dietime); } @@ -3684,11 +3688,11 @@ static void dynamics_step(ParticleSimulationData *sim, float cfra) /* Note that we could avoid copying sphdata for each thread here (it's only read here), * but doubt this would gain us anything except confusion... */ { - ParallelRangeSettings settings; - BLI_parallel_range_settings_defaults(&settings); - settings.use_threading = (psys->totpart > 100); - settings.userdata_chunk = &sphdata; - settings.userdata_chunk_size = sizeof(sphdata); + ParallelRangeSettings settings; + BLI_parallel_range_settings_defaults(&settings); + settings.use_threading = (psys->totpart > 100); + settings.userdata_chunk = &sphdata; + settings.userdata_chunk_size = sizeof(sphdata); BLI_task_parallel_range( 0, psys->totpart, &task_data, @@ -3698,11 +3702,11 @@ static void dynamics_step(ParticleSimulationData *sim, float cfra) /* do global forces & effectors */ { - ParallelRangeSettings settings; - BLI_parallel_range_settings_defaults(&settings); - settings.use_threading = (psys->totpart > 100); - settings.userdata_chunk = &sphdata; - settings.userdata_chunk_size = sizeof(sphdata); + ParallelRangeSettings settings; + BLI_parallel_range_settings_defaults(&settings); + settings.use_threading = (psys->totpart > 100); + settings.userdata_chunk = &sphdata; + settings.userdata_chunk_size = sizeof(sphdata); BLI_task_parallel_range( 0, psys->totpart, &task_data, diff --git a/source/blender/blenkernel/intern/pointcache.c b/source/blender/blenkernel/intern/pointcache.c index 5b36b0f9f84..89885bdca26 100644 --- a/source/blender/blenkernel/intern/pointcache.c +++ b/source/blender/blenkernel/intern/pointcache.c @@ -440,9 +440,9 @@ static void ptcache_particle_extra_write(void *psys_v, PTCacheMem *pm, int UNUSE PTCacheExtra *extra = NULL; if (psys->part->phystype == PART_PHYS_FLUID && - psys->part->fluid && psys->part->fluid->flag & SPH_VISCOELASTIC_SPRINGS && - psys->tot_fluidsprings && psys->fluid_springs) { - + psys->part->fluid && psys->part->fluid->flag & SPH_VISCOELASTIC_SPRINGS && + psys->tot_fluidsprings && psys->fluid_springs) + { extra = MEM_callocN(sizeof(PTCacheExtra), "Point cache: fluid extra data"); extra->type = BPHYS_EXTRA_FLUID_SPRINGS; @@ -789,8 +789,9 @@ static int ptcache_smoke_read(PTCacheFile *pf, void *smoke_v) /* check if resolution has changed */ if (sds->res[0] != ch_res[0] || - sds->res[1] != ch_res[1] || - sds->res[2] != ch_res[2]) { + sds->res[1] != ch_res[1] || + sds->res[2] != ch_res[2]) + { if (sds->flags & MOD_SMOKE_ADAPTIVE_DOMAIN) reallocate = 1; else @@ -2197,8 +2198,8 @@ static void ptcache_data_copy(void *from[], void *to[]) { int i; for (i=0; i= em1.min[0] && x < em1.max[0] && - y >= em1.min[1] && y < em1.max[1] && - z >= em1.min[2] && z < em1.max[2]) { + y >= em1.min[1] && y < em1.max[1] && + z >= em1.min[2] && z < em1.max[2]) + { int index_in = smoke_get_index(x - em1.min[0], em1.res[0], y - em1.min[1], em1.res[1], z - em1.min[2]); /* values */ @@ -1118,8 +1119,9 @@ static void em_combineMaps(EmissionMap *output, EmissionMap *em2, int hires_mult /* apply second input if in range */ if (x >= em2->min[0] && x < em2->max[0] && - y >= em2->min[1] && y < em2->max[1] && - z >= em2->min[2] && z < em2->max[2]) { + y >= em2->min[1] && y < em2->max[1] && + z >= em2->min[2] && z < em2->max[2]) + { int index_in = smoke_get_index(x - em2->min[0], em2->res[0], y - em2->min[1], em2->res[1], z - em2->min[2]); /* values */ @@ -1149,8 +1151,9 @@ static void em_combineMaps(EmissionMap *output, EmissionMap *em2, int hires_mult /* initialize with first input if in range */ if (x >= em1.hmin[0] && x < em1.hmax[0] && - y >= em1.hmin[1] && y < em1.hmax[1] && - z >= em1.hmin[2] && z < em1.hmax[2]) { + y >= em1.hmin[1] && y < em1.hmax[1] && + z >= em1.hmin[2] && z < em1.hmax[2]) + { int index_in = smoke_get_index(x - em1.hmin[0], em1.hres[0], y - em1.hmin[1], em1.hres[1], z - em1.hmin[2]); /* values */ output->influence_high[index_out] = em1.influence_high[index_in]; @@ -1158,8 +1161,9 @@ static void em_combineMaps(EmissionMap *output, EmissionMap *em2, int hires_mult /* apply second input if in range */ if (x >= em2->hmin[0] && x < em2->hmax[0] && - y >= em2->hmin[1] && y < em2->hmax[1] && - z >= em2->hmin[2] && z < em2->hmax[2]) { + y >= em2->hmin[1] && y < em2->hmax[1] && + z >= em2->hmin[2] && z < em2->hmax[2]) + { int index_in = smoke_get_index(x - em2->hmin[0], em2->hres[0], y - em2->hmin[1], em2->hres[1], z - em2->hmin[2]); /* values */ diff --git a/source/blender/blenkernel/intern/softbody.c b/source/blender/blenkernel/intern/softbody.c index d798848e583..1b6fed70de3 100644 --- a/source/blender/blenkernel/intern/softbody.c +++ b/source/blender/blenkernel/intern/softbody.c @@ -676,11 +676,13 @@ static void add_2nd_order_roller(Object *ob, float UNUSED(stiffness), int *count notthis = bs->v2; } else { - if (v0 == bs->v2) { - bpo = sb->bpoint+bs->v1; - notthis = bs->v1; - } - else {printf("oops we should not get here - add_2nd_order_springs");} + if (v0 == bs->v2) { + bpo = sb->bpoint+bs->v1; + notthis = bs->v1; + } + else { + printf("oops we should not get here - add_2nd_order_springs"); + } } if (bpo) {/* so now we have a 2nd order humpdidump */ for (c=bpo->nofsprings;c>0;c--) { @@ -1977,12 +1979,12 @@ static int _softbody_calc_forces_slice_in_a_thread(Scene *scene, Object *ob, flo /* intitialize */ if (sb) { - /* check conditions for various options */ - /* +++ could be done on object level to squeeze out the last bits of it */ - do_selfcollision=((ob->softflag & OB_SB_EDGES) && (sb->bspring)&& (ob->softflag & OB_SB_SELF)); - do_springcollision=do_deflector && (ob->softflag & OB_SB_EDGES) &&(ob->softflag & OB_SB_EDGECOLL); - do_aero=((sb->aeroedge)&& (ob->softflag & OB_SB_EDGES)); - /* --- could be done on object level to squeeze out the last bits of it */ + /* check conditions for various options */ + /* +++ could be done on object level to squeeze out the last bits of it */ + do_selfcollision=((ob->softflag & OB_SB_EDGES) && (sb->bspring)&& (ob->softflag & OB_SB_SELF)); + do_springcollision=do_deflector && (ob->softflag & OB_SB_EDGES) &&(ob->softflag & OB_SB_EDGECOLL); + do_aero=((sb->aeroedge)&& (ob->softflag & OB_SB_EDGES)); + /* --- could be done on object level to squeeze out the last bits of it */ } else { printf("Error expected a SB here\n"); @@ -2777,7 +2779,7 @@ static void apply_spring_memory(Object *ob) l = len_v3v3(bp1->pos, bp2->pos); r = bs->len/l; if (( r > 1.05f) || (r < 0.95f)) { - bs->len = ((100.0f - b) * bs->len + b*l)/100.0f; + bs->len = ((100.0f - b) * bs->len + b*l)/100.0f; } } } @@ -2825,10 +2827,10 @@ static void springs_from_mesh(Object *ob) sb= ob->soft; if (me && sb) { - /* using bp->origS as a container for spring calcualtions here - * will be overwritten sbObjectStep() to receive - * actual modifier stack positions - */ + /* using bp->origS as a container for spring calcualtions here + * will be overwritten sbObjectStep() to receive + * actual modifier stack positions + */ if (me->totvert) { bp= ob->soft->bpoint; for (a=0; atotvert; a++, bp++) { @@ -3491,16 +3493,16 @@ static void softbody_reset(Object *ob, SoftBody *sb, float (*vertexCos)[3], int SB_estimate_transform(ob, NULL, NULL, NULL); } switch (ob->type) { - case OB_MESH: - if (ob->softflag & OB_SB_FACECOLL) mesh_faces_to_scratch(ob); - break; - case OB_LATTICE: - break; - case OB_CURVE: - case OB_SURF: - break; - default: - break; + case OB_MESH: + if (ob->softflag & OB_SB_FACECOLL) mesh_faces_to_scratch(ob); + break; + case OB_LATTICE: + break; + case OB_CURVE: + case OB_SURF: + break; + default: + break; } } diff --git a/source/blender/blenloader/intern/versioning_260.c b/source/blender/blenloader/intern/versioning_260.c index dad61868961..79dfd572dbb 100644 --- a/source/blender/blenloader/intern/versioning_260.c +++ b/source/blender/blenloader/intern/versioning_260.c @@ -944,7 +944,7 @@ void blo_do_versions_260(FileData *fd, Library *UNUSED(lib), Main *main) } } { - /* Warn the user if he is using ["Text"] properties for Font objects */ + /* Warn the user if he is using ["Text"] properties for Font objects */ Object *ob; bProperty *prop; diff --git a/source/blender/bmesh/intern/bmesh_opdefines.c b/source/blender/bmesh/intern/bmesh_opdefines.c index 4847ae4be42..a339a4d5734 100644 --- a/source/blender/bmesh/intern/bmesh_opdefines.c +++ b/source/blender/bmesh/intern/bmesh_opdefines.c @@ -839,7 +839,7 @@ static BMOpDefine bmo_bmesh_to_mesh_def = { "bmesh_to_mesh", /* slots_in */ { - /* pointer to a mesh structure to fill in */ + /* pointer to a mesh structure to fill in */ {"mesh", BMO_OP_SLOT_PTR, {(int)BMO_OP_SLOT_SUBTYPE_PTR_MESH}}, /* pointer to an object structure */ {"object", BMO_OP_SLOT_PTR, {(int)BMO_OP_SLOT_SUBTYPE_PTR_OBJECT}}, @@ -860,7 +860,7 @@ static BMOpDefine bmo_mesh_to_bmesh_def = { "mesh_to_bmesh", /* slots_in */ { - /* pointer to a Mesh structure */ + /* pointer to a Mesh structure */ {"mesh", BMO_OP_SLOT_PTR, {(int)BMO_OP_SLOT_SUBTYPE_PTR_MESH}}, /* pointer to an Object structure */ {"object", BMO_OP_SLOT_PTR, {(int)BMO_OP_SLOT_SUBTYPE_PTR_OBJECT}}, diff --git a/source/blender/bmesh/operators/bmo_offset_edgeloops.c b/source/blender/bmesh/operators/bmo_offset_edgeloops.c index 269f933f27f..d54efc27124 100644 --- a/source/blender/bmesh/operators/bmo_offset_edgeloops.c +++ b/source/blender/bmesh/operators/bmo_offset_edgeloops.c @@ -242,6 +242,7 @@ void bmo_offset_edgeloops_exec(BMesh *bm, BMOperator *op) #if 0 else if (BM_elem_index_get(l->prev->v) == -1) { if (BM_elem_index_get(l->next->next->v) == -1) { + /* pass */ } } #endif diff --git a/source/blender/collada/AnimationImporter.cpp b/source/blender/collada/AnimationImporter.cpp index 334dff20d52..0631ab42319 100644 --- a/source/blender/collada/AnimationImporter.cpp +++ b/source/blender/collada/AnimationImporter.cpp @@ -566,14 +566,16 @@ void AnimationImporter:: Assign_transform_animations(COLLADAFW::Transformation * } case COLLADAFW::Transformation::MATRIX: - /*{ - COLLADAFW::Matrix *mat = (COLLADAFW::Matrix*)transform; - COLLADABU::Math::Matrix4 mat4 = mat->getMatrix(); - switch (binding->animationClass) { - case COLLADAFW::AnimationList::TRANSFORM: - - } - }*/ +#if 0 + { + COLLADAFW::Matrix *mat = (COLLADAFW::Matrix*)transform; + COLLADABU::Math::Matrix4 mat4 = mat->getMatrix(); + switch (binding->animationClass) { + case COLLADAFW::AnimationList::TRANSFORM: + + } + } +#endif unused_fcurve(curves); break; case COLLADAFW::Transformation::SKEW: diff --git a/source/blender/collada/EffectExporter.cpp b/source/blender/collada/EffectExporter.cpp index 2bf0859b0f0..de92a7f2cc2 100644 --- a/source/blender/collada/EffectExporter.cpp +++ b/source/blender/collada/EffectExporter.cpp @@ -91,8 +91,9 @@ void EffectsExporter::exportEffects(Scene *sce) openLibrary(); std::set::iterator uv_images_iter; for (uv_images_iter = uv_images.begin(); - uv_images_iter != uv_images.end(); - uv_images_iter++) { + uv_images_iter != uv_images.end(); + uv_images_iter++) + { Image *ima = *uv_images_iter; std::string key(id_name(ima)); diff --git a/source/blender/collada/GeometryExporter.cpp b/source/blender/collada/GeometryExporter.cpp index bc0275001d3..8406426a366 100644 --- a/source/blender/collada/GeometryExporter.cpp +++ b/source/blender/collada/GeometryExporter.cpp @@ -490,8 +490,9 @@ void GeometryExporter::createPolylists(std::set uv_images, { std::set::iterator uv_images_iter; for (uv_images_iter = uv_images.begin(); - uv_images_iter != uv_images.end(); - uv_images_iter++) { + uv_images_iter != uv_images.end(); + uv_images_iter++) + { Image *ima = *uv_images_iter; std::string imageid(id_name(ima)); diff --git a/source/blender/collada/InstanceWriter.cpp b/source/blender/collada/InstanceWriter.cpp index de1a4075462..4d846693e50 100644 --- a/source/blender/collada/InstanceWriter.cpp +++ b/source/blender/collada/InstanceWriter.cpp @@ -51,8 +51,9 @@ void InstanceWriter::add_material_bindings(COLLADASW::BindMaterial& bind_materia std::set uv_images = bc_getUVImages(ob, all_uv_layers); std::set::iterator uv_images_iter; for (uv_images_iter = uv_images.begin(); - uv_images_iter != uv_images.end(); - uv_images_iter++) { + uv_images_iter != uv_images.end(); + uv_images_iter++) + { Image *ima = *uv_images_iter; std::string matid(id_name(ima)); matid = get_material_id_from_id(matid); diff --git a/source/blender/collada/MaterialExporter.cpp b/source/blender/collada/MaterialExporter.cpp index 6e6cc24be20..0c0395f2a21 100644 --- a/source/blender/collada/MaterialExporter.cpp +++ b/source/blender/collada/MaterialExporter.cpp @@ -56,8 +56,9 @@ void MaterialsExporter::exportMaterials(Scene *sce) openLibrary(); std::set::iterator uv_images_iter; for (uv_images_iter = uv_images.begin(); - uv_images_iter != uv_images.end(); - uv_images_iter++) { + uv_images_iter != uv_images.end(); + uv_images_iter++) + { Image *ima = *uv_images_iter; std::string matid(id_name(ima)); diff --git a/source/blender/collada/MeshImporter.cpp b/source/blender/collada/MeshImporter.cpp index 2e265125a43..f0dadf8cbc7 100644 --- a/source/blender/collada/MeshImporter.cpp +++ b/source/blender/collada/MeshImporter.cpp @@ -703,8 +703,9 @@ void MeshImporter::read_polys(COLLADAFW::Mesh *collada_mesh, Mesh *me) } if (collada_meshtype == COLLADAFW::MeshPrimitive::POLYLIST || - collada_meshtype == COLLADAFW::MeshPrimitive::POLYGONS || - collada_meshtype == COLLADAFW::MeshPrimitive::TRIANGLES) { + collada_meshtype == COLLADAFW::MeshPrimitive::POLYGONS || + collada_meshtype == COLLADAFW::MeshPrimitive::TRIANGLES) + { COLLADAFW::Polygons *mpvc = (COLLADAFW::Polygons *)mp; unsigned int start_index = 0; diff --git a/source/blender/collada/collada_utils.cpp b/source/blender/collada/collada_utils.cpp index fcd92e220c0..8c4ddd67d07 100644 --- a/source/blender/collada/collada_utils.cpp +++ b/source/blender/collada/collada_utils.cpp @@ -755,17 +755,17 @@ float bc_get_property(Bone *bone, std::string key, float def) IDProperty *property = bc_get_IDProperty(bone, key); if (property) { switch (property->type) { - case IDP_INT: - result = (float)(IDP_Int(property)); - break; - case IDP_FLOAT: - result = (float)(IDP_Float(property)); - break; - case IDP_DOUBLE: - result = (float)(IDP_Double(property)); - break; - default: - result = def; + case IDP_INT: + result = (float)(IDP_Int(property)); + break; + case IDP_FLOAT: + result = (float)(IDP_Float(property)); + break; + case IDP_DOUBLE: + result = (float)(IDP_Double(property)); + break; + default: + result = def; } } return result; @@ -1066,4 +1066,4 @@ std::set bc_getUVImages(Object *ob, bool all_uv_layers) } } return UVImages; -} \ No newline at end of file +} diff --git a/source/blender/compositor/operations/COM_CompositorOperation.cpp b/source/blender/compositor/operations/COM_CompositorOperation.cpp index fe13f3d60a2..241ae20ce33 100644 --- a/source/blender/compositor/operations/COM_CompositorOperation.cpp +++ b/source/blender/compositor/operations/COM_CompositorOperation.cpp @@ -152,31 +152,31 @@ void CompositorOperation::executeRegion(rcti *rect, unsigned int /*tileNumber*/) const RenderData *rd = this->m_rd; if (rd->mode & R_BORDER && rd->mode & R_CROP) { - /*! - When using cropped render result, need to re-position area of interest, - so it'll natch bounds of render border within frame. By default, canvas - will be centered between full frame and cropped frame, so we use such - scheme to map cropped coordinates to full-frame coordinates - - ^ Y - | Width - +------------------------------------------------+ - | | - | | - | Centered canvas, we map coordinate from it | - | +------------------+ | - | | | | H - | | | | e - | +------------------+ . Center | | i - | | | | | | g - | | | | | | h - | |....dx.... +------|-----------+ | t - | | . dy | | - | +------------------+ | - | Render border, we map coordinates to it | - | | X - +------------------------------------------------+----> - Full frame + /** + * When using cropped render result, need to re-position area of interest, + * so it'll natch bounds of render border within frame. By default, canvas + * will be centered between full frame and cropped frame, so we use such + * scheme to map cropped coordinates to full-frame coordinates + * + * ^ Y + * | Width + * +------------------------------------------------+ + * | | + * | | + * | Centered canvas, we map coordinate from it | + * | +------------------+ | + * | | | | H + * | | | | e + * | +------------------+ . Center | | i + * | | | | | | g + * | | | | | | h + * | |....dx.... +------|-----------+ | t + * | | . dy | | + * | +------------------+ | + * | Render border, we map coordinates to it | + * | | X + * +------------------------------------------------+----> + * Full frame */ int full_width = rd->xsch * rd->size / 100; diff --git a/source/blender/editors/armature/editarmature_retarget.c b/source/blender/editors/armature/editarmature_retarget.c index bf6126658af..6b2893780d7 100644 --- a/source/blender/editors/armature/editarmature_retarget.c +++ b/source/blender/editors/armature/editarmature_retarget.c @@ -911,6 +911,7 @@ static void RIG_reconnectControlBones(RigGraph *rg) /* if we haven't found one yet, look in control bones */ if (ctrl->tail_mode == TL_NONE) { + /* pass */ } } } diff --git a/source/blender/editors/interface/resources.c b/source/blender/editors/interface/resources.c index ac4892de042..33d0b2ae608 100644 --- a/source/blender/editors/interface/resources.c +++ b/source/blender/editors/interface/resources.c @@ -2775,11 +2775,9 @@ void init_userdef_do_versions(void) /** * Include next version bump. - * - * (keep this block even if it becomes empty). */ { - + /* (keep this block even if it becomes empty). */ } if (U.pixelsize == 0.0f) diff --git a/source/blender/editors/mesh/editmesh_knife.c b/source/blender/editors/mesh/editmesh_knife.c index 874225e96a7..053e932fe75 100644 --- a/source/blender/editors/mesh/editmesh_knife.c +++ b/source/blender/editors/mesh/editmesh_knife.c @@ -1945,7 +1945,7 @@ static KnifeEdge *knife_find_closest_edge(KnifeTool_OpData *kcd, float p[3], flo /* check if we're close enough and calculate 'lambda' */ if (kcd->is_angle_snapping) { - /* if snapping, check we're in bounds */ + /* if snapping, check we're in bounds */ float sco_snap[2]; isect_line_line_v2_point(kfe->v1->sco, kfe->v2->sco, kcd->prev.mval, kcd->curr.mval, sco_snap); lambda = line_point_factor_v2(sco_snap, kfe->v1->sco, kfe->v2->sco); diff --git a/source/blender/editors/physics/particle_edit.c b/source/blender/editors/physics/particle_edit.c index bdffaf31384..50e3e20223d 100644 --- a/source/blender/editors/physics/particle_edit.c +++ b/source/blender/editors/physics/particle_edit.c @@ -1347,28 +1347,28 @@ static void toggle_key_select(PEData *data, int point_index, int key_index) static void select_action_apply(PTCacheEditPoint *point, PTCacheEditKey *key, int action) { switch (action) { - case SEL_SELECT: - if ((key->flag & PEK_SELECT) == 0) { - key->flag |= PEK_SELECT; - point->flag |= PEP_EDIT_RECALC; - } - break; - case SEL_DESELECT: - if (key->flag & PEK_SELECT) { - key->flag &= ~PEK_SELECT; - point->flag |= PEP_EDIT_RECALC; - } - break; - case SEL_INVERT: - if ((key->flag & PEK_SELECT) == 0) { - key->flag |= PEK_SELECT; - point->flag |= PEP_EDIT_RECALC; - } - else { - key->flag &= ~PEK_SELECT; - point->flag |= PEP_EDIT_RECALC; - } - break; + case SEL_SELECT: + if ((key->flag & PEK_SELECT) == 0) { + key->flag |= PEK_SELECT; + point->flag |= PEP_EDIT_RECALC; + } + break; + case SEL_DESELECT: + if (key->flag & PEK_SELECT) { + key->flag &= ~PEK_SELECT; + point->flag |= PEP_EDIT_RECALC; + } + break; + case SEL_INVERT: + if ((key->flag & PEK_SELECT) == 0) { + key->flag |= PEK_SELECT; + point->flag |= PEP_EDIT_RECALC; + } + else { + key->flag &= ~PEK_SELECT; + point->flag |= PEP_EDIT_RECALC; + } + break; } } diff --git a/source/blender/editors/screen/screen_ops.c b/source/blender/editors/screen/screen_ops.c index 62113cafebb..cbdf05a1c82 100644 --- a/source/blender/editors/screen/screen_ops.c +++ b/source/blender/editors/screen/screen_ops.c @@ -1741,6 +1741,7 @@ static void area_split_cancel(bContext *C, wmOperator *op) sAreaSplitData *sd = (sAreaSplitData *)op->customdata; if (sd->previewmode) { + /* pass */ } else { if (screen_area_join(C, CTX_wm_screen(C), sd->sarea, sd->narea)) { diff --git a/source/blender/editors/space_file/space_file.c b/source/blender/editors/space_file/space_file.c index 3657e4d2a1f..1623712786c 100644 --- a/source/blender/editors/space_file/space_file.c +++ b/source/blender/editors/space_file/space_file.c @@ -606,7 +606,7 @@ static void file_tools_region_listener(bScreen *UNUSED(sc), ScrArea *UNUSED(sa), #if 0 /* context changes */ switch (wmn->category) { - + /* pass */ } #endif } diff --git a/source/blender/editors/space_nla/nla_buttons.c b/source/blender/editors/space_nla/nla_buttons.c index 3080ac2de84..9551a1cf362 100644 --- a/source/blender/editors/space_nla/nla_buttons.c +++ b/source/blender/editors/space_nla/nla_buttons.c @@ -72,7 +72,7 @@ static void do_nla_region_buttons(bContext *C, void *UNUSED(arg), int UNUSED(eve //Scene *scene = CTX_data_scene(C); #if 0 switch (event) { - + /* pass */ } #endif /* default for now */ diff --git a/source/blender/editors/space_sequencer/sequencer_draw.c b/source/blender/editors/space_sequencer/sequencer_draw.c index 14661e2f44f..c3a27dad538 100644 --- a/source/blender/editors/space_sequencer/sequencer_draw.c +++ b/source/blender/editors/space_sequencer/sequencer_draw.c @@ -1429,7 +1429,7 @@ void draw_image_seq(const bContext *C, Scene *scene, ARegion *ar, SpaceSeq *sseq /* NOTE: sequencer mask editing isnt finished, the draw code is working but editing not, * for now just disable drawing since the strip frame will likely be offset */ - //if (sc->mode == SC_MODE_MASKEDIT) { + // if (sc->mode == SC_MODE_MASKEDIT) if (0 && sseq->mainb == SEQ_DRAW_IMG_IMBUF) { Mask *mask = BKE_sequencer_mask_get(scene); diff --git a/source/blender/editors/transform/transform.c b/source/blender/editors/transform/transform.c index 90014667b43..4a8bd5287df 100644 --- a/source/blender/editors/transform/transform.c +++ b/source/blender/editors/transform/transform.c @@ -5552,7 +5552,7 @@ static void slide_origdata_interp_data_vert( project_plane_normalized_v3_v3v3(v_proj[1], sv->co_orig_3d, v_proj_axis); } - // BM_ITER_ELEM (l, &liter, sv->v, BM_LOOPS_OF_VERT) { + // BM_ITER_ELEM (l, &liter, sv->v, BM_LOOPS_OF_VERT) BM_iter_init(&liter, bm, BM_LOOPS_OF_VERT, sv->v); l_num = liter.count; loop_weights = do_loop_weight ? BLI_array_alloca(loop_weights, l_num) : NULL; diff --git a/source/blender/imbuf/intern/dds/DirectDrawSurface.cpp b/source/blender/imbuf/intern/dds/DirectDrawSurface.cpp index a4281514e39..7c11fca3c34 100644 --- a/source/blender/imbuf/intern/dds/DirectDrawSurface.cpp +++ b/source/blender/imbuf/intern/dds/DirectDrawSurface.cpp @@ -704,11 +704,12 @@ void DDSHeader::setPixelFormat(uint bitcount, uint rmask, uint gmask, uint bmask { // Make sure the masks are correct. if ((rmask & gmask) || - (rmask & bmask) || - (rmask & amask) || - (gmask & bmask) || - (gmask & amask) || - (bmask & amask)) { + (rmask & bmask) || + (rmask & amask) || + (gmask & bmask) || + (gmask & amask) || + (bmask & amask)) + { printf("DDS: bad RGBA masks, pixel format not set\n"); return; } @@ -1068,7 +1069,7 @@ bool DirectDrawSurface::isTexture3D() const } else { - return (header.caps.caps2 & DDSCAPS2_VOLUME) != 0; + return (header.caps.caps2 & DDSCAPS2_VOLUME) != 0; } } diff --git a/source/blender/makesrna/intern/rna_material.c b/source/blender/makesrna/intern/rna_material.c index 1965361b81b..1959a017e43 100644 --- a/source/blender/makesrna/intern/rna_material.c +++ b/source/blender/makesrna/intern/rna_material.c @@ -358,7 +358,7 @@ static const EnumPropertyItem *rna_Material_texture_coordinates_itemf(bContext * RNA_enum_items_add_value(&item, &totitem, prop_texture_coordinates_items, TEXCO_ORCO); if (ma->material_type == MA_TYPE_VOLUME) { - + /* pass */ } else if (ELEM(ma->material_type, MA_TYPE_SURFACE, MA_TYPE_HALO, MA_TYPE_WIRE)) { RNA_enum_items_add_value(&item, &totitem, prop_texture_coordinates_items, TEXCO_UV); diff --git a/source/blender/render/intern/source/shadeoutput.c b/source/blender/render/intern/source/shadeoutput.c index b10389538c2..83827067775 100644 --- a/source/blender/render/intern/source/shadeoutput.c +++ b/source/blender/render/intern/source/shadeoutput.c @@ -979,18 +979,18 @@ static void add_to_diffuse(float diff[3], const ShadeInput *shi, const float is, /* input */ switch (ma->rampin_col) { - case MA_RAMP_IN_ENERGY: - fac = IMB_colormanagement_get_luminance(rgb); - break; - case MA_RAMP_IN_SHADER: - fac = is; - break; - case MA_RAMP_IN_NOR: - fac = dot_v3v3(shi->view, shi->vn); - break; - default: - fac = 0.0f; - break; + case MA_RAMP_IN_ENERGY: + fac = IMB_colormanagement_get_luminance(rgb); + break; + case MA_RAMP_IN_SHADER: + fac = is; + break; + case MA_RAMP_IN_NOR: + fac = dot_v3v3(shi->view, shi->vn); + break; + default: + fac = 0.0f; + break; } BKE_colorband_evaluate(ma->ramp_col, fac, col); -- cgit v1.2.3 From 95eb9f22e69622c5817707fa9534521613e7d7cc Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 16 Apr 2018 17:16:29 +0200 Subject: Cleanup: indentation --- source/blender/blenlib/BLI_utildefines_stack.h | 4 ++-- source/blender/blenloader/intern/readfile.c | 4 ++-- source/blender/bmesh/intern/bmesh_mesh.h | 4 ++-- source/blender/bmesh/intern/bmesh_opdefines.c | 6 +++--- source/blender/freestyle/intern/stroke/CurveAdvancedIterators.h | 2 +- source/blender/freestyle/intern/view_map/ViewMapAdvancedIterators.h | 6 +++--- source/blender/freestyle/intern/winged_edge/WingedEdgeBuilder.h | 2 +- source/blender/imbuf/intern/jp2.c | 2 +- source/blender/makesrna/intern/rna_mesh_utils.h | 2 +- 9 files changed, 16 insertions(+), 16 deletions(-) (limited to 'source') diff --git a/source/blender/blenlib/BLI_utildefines_stack.h b/source/blender/blenlib/BLI_utildefines_stack.h index 15b0029e727..224add91504 100644 --- a/source/blender/blenlib/BLI_utildefines_stack.h +++ b/source/blender/blenlib/BLI_utildefines_stack.h @@ -77,13 +77,13 @@ SWAP(typeof(stack_a), stack_a, stack_b); \ SWAP(unsigned int, _##stack_a##_index, _##stack_b##_index); \ _STACK_SWAP_TOTALLOC(stack_a, stack_b); \ - } ((void)0) +} ((void)0) #else #define STACK_SWAP(stack_a, stack_b) { \ SWAP(void *, stack_a, stack_b); \ SWAP(unsigned int, _##stack_a##_index, _##stack_b##_index); \ _STACK_SWAP_TOTALLOC(stack_a, stack_b); \ - } ((void)0) +} ((void)0) #endif #endif /* __BLI_UTILDEFINES_STACK_H__ */ diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index a4739240cb4..1586a03b25d 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -3720,8 +3720,8 @@ static void direct_link_text(FileData *fd, Text *text) #if 0 if (text->flags & TXT_ISEXT) { BKE_text_reload(text); - } - /* else { */ + } + /* else { */ #endif link_list(fd, &text->lines); diff --git a/source/blender/bmesh/intern/bmesh_mesh.h b/source/blender/bmesh/intern/bmesh_mesh.h index 10f024423aa..d449aac04f5 100644 --- a/source/blender/bmesh/intern/bmesh_mesh.h +++ b/source/blender/bmesh/intern/bmesh_mesh.h @@ -119,7 +119,7 @@ extern const BMAllocTemplate bm_mesh_chunksize_default; (dm)->getNumEdges(dm), \ (dm)->getNumLoops(dm), \ (dm)->getNumPolys(dm), \ - } +} #define _VA_BMALLOC_TEMPLATE_FROM_DM_2(dm_a, dm_b) { \ (CHECK_TYPE_INLINE(dm_a, DerivedMesh *), \ CHECK_TYPE_INLINE(dm_b, DerivedMesh *), \ @@ -127,7 +127,7 @@ extern const BMAllocTemplate bm_mesh_chunksize_default; (dm_a)->getNumEdges(dm_a) + (dm_b)->getNumEdges(dm_b), \ (dm_a)->getNumLoops(dm_a) + (dm_b)->getNumLoops(dm_b), \ (dm_a)->getNumPolys(dm_a) + (dm_b)->getNumPolys(dm_b), \ - } +} #define BMALLOC_TEMPLATE_FROM_DM(...) VA_NARGS_CALL_OVERLOAD(_VA_BMALLOC_TEMPLATE_FROM_DM_, __VA_ARGS__) diff --git a/source/blender/bmesh/intern/bmesh_opdefines.c b/source/blender/bmesh/intern/bmesh_opdefines.c index a339a4d5734..b5e6fe168e5 100644 --- a/source/blender/bmesh/intern/bmesh_opdefines.c +++ b/source/blender/bmesh/intern/bmesh_opdefines.c @@ -112,7 +112,7 @@ static BMOpDefine bmo_smooth_vert_def = { {"use_axis_x", BMO_OP_SLOT_BOOL}, /* smooth vertices along X axis */ {"use_axis_y", BMO_OP_SLOT_BOOL}, /* smooth vertices along Y axis */ {"use_axis_z", BMO_OP_SLOT_BOOL}, /* smooth vertices along Z axis */ - {{'\0'}}, + {{'\0'}}, }, {{{'\0'}}}, /* no output */ bmo_smooth_vert_exec, @@ -135,7 +135,7 @@ static BMOpDefine bmo_smooth_laplacian_vert_def = { {"use_y", BMO_OP_SLOT_BOOL}, /* Smooth object along Y axis */ {"use_z", BMO_OP_SLOT_BOOL}, /* Smooth object along Z axis */ {"preserve_volume", BMO_OP_SLOT_BOOL}, /* Apply volume preservation after smooth */ - {{'\0'}}, + {{'\0'}}, }, {{{'\0'}}}, /* no output */ bmo_smooth_laplacian_vert_exec, @@ -1337,7 +1337,7 @@ static BMOpDefine bmo_duplicate_def = { {"face_map.out", BMO_OP_SLOT_MAPPING, {(int)BMO_OP_SLOT_SUBTYPE_MAP_ELEM}}, {"boundary_map.out", BMO_OP_SLOT_MAPPING, {(int)BMO_OP_SLOT_SUBTYPE_MAP_ELEM}}, {"isovert_map.out", BMO_OP_SLOT_MAPPING, {(int)BMO_OP_SLOT_SUBTYPE_MAP_ELEM}}, - {{'\0'}}, + {{'\0'}}, }, bmo_duplicate_exec, (BMO_OPTYPE_FLAG_NORMALS_CALC | diff --git a/source/blender/freestyle/intern/stroke/CurveAdvancedIterators.h b/source/blender/freestyle/intern/stroke/CurveAdvancedIterators.h index 956842580c5..4142117c361 100644 --- a/source/blender/freestyle/intern/stroke/CurveAdvancedIterators.h +++ b/source/blender/freestyle/intern/stroke/CurveAdvancedIterators.h @@ -275,7 +275,7 @@ protected: { if (_Point != 0) { delete _Point; - _Point = 0; + _Point = 0; } if ((_currentn == _n - 1) && (_t == 1.0f)) { // we're setting the iterator to end diff --git a/source/blender/freestyle/intern/view_map/ViewMapAdvancedIterators.h b/source/blender/freestyle/intern/view_map/ViewMapAdvancedIterators.h index 8e98cabd75b..a3a0b5cbaeb 100644 --- a/source/blender/freestyle/intern/view_map/ViewMapAdvancedIterators.h +++ b/source/blender/freestyle/intern/view_map/ViewMapAdvancedIterators.h @@ -555,9 +555,9 @@ public: // operators // operator corresponding to ++i. inline Self& operator++() - { - increment(); - return *this; + { + increment(); + return *this; } // operator corresponding to i++, i.e. which returns the value *and then* increments it. diff --git a/source/blender/freestyle/intern/winged_edge/WingedEdgeBuilder.h b/source/blender/freestyle/intern/winged_edge/WingedEdgeBuilder.h index 5683b39fd28..601c208b137 100644 --- a/source/blender/freestyle/intern/winged_edge/WingedEdgeBuilder.h +++ b/source/blender/freestyle/intern/winged_edge/WingedEdgeBuilder.h @@ -113,7 +113,7 @@ public: #endif inline void setRenderMonitor(RenderMonitor *iRenderMonitor) { - _pRenderMonitor = iRenderMonitor; + _pRenderMonitor = iRenderMonitor; } protected: diff --git a/source/blender/imbuf/intern/jp2.c b/source/blender/imbuf/intern/jp2.c index 388c2734fe9..30a0fdf4e55 100644 --- a/source/blender/imbuf/intern/jp2.c +++ b/source/blender/imbuf/intern/jp2.c @@ -119,7 +119,7 @@ static void info_callback(const char *msg, void *client_data) # define PIXEL_LOOPER_END \ } \ - } (void)0 \ +} (void)0 \ struct ImBuf *imb_jp2_decode(const unsigned char *mem, size_t size, int flags, char colorspace[IM_MAX_SPACE]) { diff --git a/source/blender/makesrna/intern/rna_mesh_utils.h b/source/blender/makesrna/intern/rna_mesh_utils.h index 0f42596ff13..93b3fd6579e 100644 --- a/source/blender/makesrna/intern/rna_mesh_utils.h +++ b/source/blender/makesrna/intern/rna_mesh_utils.h @@ -85,7 +85,7 @@ } \ else { \ layer = NULL; \ - } \ + } \ return rna_pointer_inherit_refine(ptr, &RNA_##layer_rna_type, layer); \ } \ \ -- cgit v1.2.3