diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-08-14 03:14:05 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-08-14 03:14:05 +0300 |
commit | c29c426925311eeb79e3988609e914e72b61013b (patch) | |
tree | 3af461685471f986b97bb9faa72c51ef48b522f4 | |
parent | 98f4a8eedf218c240adbac586fed02cfe51e01a9 (diff) |
Cleanup: use braces w/ particle loop macros
-rw-r--r-- | source/blender/blenkernel/intern/particle_system.c | 12 | ||||
-rw-r--r-- | source/blender/editors/physics/particle_edit.c | 26 |
2 files changed, 24 insertions, 14 deletions
diff --git a/source/blender/blenkernel/intern/particle_system.c b/source/blender/blenkernel/intern/particle_system.c index fd63285ea85..353c75d63c6 100644 --- a/source/blender/blenkernel/intern/particle_system.c +++ b/source/blender/blenkernel/intern/particle_system.c @@ -169,8 +169,9 @@ void psys_reset(ParticleSystem *psys, int mode) } else if (mode == PSYS_RESET_CACHE_MISS) { /* set all particles to be skipped */ - LOOP_PARTICLES + LOOP_PARTICLES { pa->flag |= PARS_NO_DISP; + } } /* reset children */ @@ -273,8 +274,9 @@ static void realloc_particles(ParticleSimulationData *sim, int new_totpart) psys->totpart=totpart; if (newboids) { - LOOP_PARTICLES + LOOP_PARTICLES { pa->boid = newboids++; + } } } @@ -4129,14 +4131,16 @@ void psys_check_boid_data(ParticleSystem *psys) if (!pa->boid) { bpa = MEM_callocN(psys->totpart * sizeof(BoidParticle), "Boid Data"); - LOOP_PARTICLES + LOOP_PARTICLES { pa->boid = bpa++; + } } } else if (pa->boid) { MEM_freeN(pa->boid); - LOOP_PARTICLES + LOOP_PARTICLES { pa->boid = NULL; + } } } diff --git a/source/blender/editors/physics/particle_edit.c b/source/blender/editors/physics/particle_edit.c index 5699c1f59f8..ad4c377879d 100644 --- a/source/blender/editors/physics/particle_edit.c +++ b/source/blender/editors/physics/particle_edit.c @@ -1141,25 +1141,29 @@ static void PE_update_selection(Main *bmain, Scene *scene, Object *ob, int usefl /* flag all particles to be updated if not using flag */ if (!useflag) - LOOP_POINTS - point->flag |= PEP_EDIT_RECALC; + LOOP_POINTS { + point->flag |= PEP_EDIT_RECALC; + } /* flush edit key flag to hair key flag to preserve selection * on save */ - if (edit->psys) LOOP_POINTS { + if (edit->psys) { + LOOP_POINTS { hkey = edit->psys->particles[p].hair; LOOP_KEYS { hkey->editflag = key->flag; hkey++; } } + } - psys_cache_edit_paths(scene, ob, edit, CFRA, G.is_rendering); + psys_cache_edit_paths(scene, ob, edit, CFRA, G.is_rendering); /* disable update flag */ - LOOP_POINTS - point->flag &= ~PEP_EDIT_RECALC; + LOOP_POINTS { + point->flag &= ~PEP_EDIT_RECALC; + } } void update_world_cos(Object *ob, PTCacheEdit *edit) @@ -1894,8 +1898,9 @@ static int hide_exec(bContext *C, wmOperator *op) point->flag |= PEP_HIDE; point->flag |= PEP_EDIT_RECALC; - LOOP_KEYS - key->flag &= ~PEK_SELECT; + LOOP_KEYS { + key->flag &= ~PEK_SELECT; + } } } else { @@ -1903,8 +1908,9 @@ static int hide_exec(bContext *C, wmOperator *op) point->flag |= PEP_HIDE; point->flag |= PEP_EDIT_RECALC; - LOOP_KEYS - key->flag &= ~PEK_SELECT; + LOOP_KEYS { + key->flag &= ~PEK_SELECT; + } } } |