diff options
author | Campbell Barton <campbell@blender.org> | 2022-03-25 04:04:21 +0300 |
---|---|---|
committer | Campbell Barton <campbell@blender.org> | 2022-03-25 04:10:21 +0300 |
commit | 7d1d9e601503fb7e921c935524fec1469363c121 (patch) | |
tree | d19dcbbcf9ada051ff3ec629c397ddca23eb2b55 /source/blender/blenkernel/intern/particle_distribute.c | |
parent | 4d46fac65d9946382c4be5b3842660e77468f00b (diff) |
Cleanup: rename ParticleSettings.child_nbr => child_percent
child_nbr was used as a percentage as well as the final
number of particles. Rename to avoid confusion.
Diffstat (limited to 'source/blender/blenkernel/intern/particle_distribute.c')
-rw-r--r-- | source/blender/blenkernel/intern/particle_distribute.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/blenkernel/intern/particle_distribute.c b/source/blender/blenkernel/intern/particle_distribute.c index 83fb52ce1ef..d2c3776d4ea 100644 --- a/source/blender/blenkernel/intern/particle_distribute.c +++ b/source/blender/blenkernel/intern/particle_distribute.c @@ -64,14 +64,14 @@ static void distribute_simple_children(Scene *scene, { ChildParticle *cpa = NULL; int i, p; - int child_nbr = psys_get_child_number(scene, psys, use_render_params); - int totpart = psys_get_tot_child(scene, psys, use_render_params); + const int child_num = psys_get_child_number(scene, psys, use_render_params); + const int totpart = psys_get_tot_child(scene, psys, use_render_params); RNG *rng = BLI_rng_new_srandom(31415926 + psys->seed + psys->child_seed); alloc_child_particles(psys, totpart); cpa = psys->child; - for (i = 0; i < child_nbr; i++) { + for (i = 0; i < child_num; i++) { for (p = 0; p < psys->totpart; p++, cpa++) { float length = 2.0; cpa->parent = p; |