diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-04-16 18:08:27 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-04-16 18:08:27 +0300 |
commit | 85de548e03fcaf657356382286a7ca6d6fbd30f3 (patch) | |
tree | c80b051a63446fcbe49df02ffc6af00c2405a48b /source/blender/blenkernel/intern/particle_system.c | |
parent | 141f0f4c4717a8f6090515779de10e205455644b (diff) |
Cleanup: indentation
Diffstat (limited to 'source/blender/blenkernel/intern/particle_system.c')
-rw-r--r-- | source/blender/blenkernel/intern/particle_system.c | 52 |
1 files changed, 28 insertions, 24 deletions
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, |