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
diff options
context:
space:
mode:
authorCampbell Barton <campbell@blender.org>2022-03-25 04:04:21 +0300
committerCampbell Barton <campbell@blender.org>2022-03-25 04:10:21 +0300
commit7d1d9e601503fb7e921c935524fec1469363c121 (patch)
treed19dcbbcf9ada051ff3ec629c397ddca23eb2b55 /source/blender/blenkernel/intern/particle_system.c
parent4d46fac65d9946382c4be5b3842660e77468f00b (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_system.c')
-rw-r--r--source/blender/blenkernel/intern/particle_system.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/blenkernel/intern/particle_system.c b/source/blender/blenkernel/intern/particle_system.c
index 1a74008c405..7fdc60a265b 100644
--- a/source/blender/blenkernel/intern/particle_system.c
+++ b/source/blender/blenkernel/intern/particle_system.c
@@ -98,9 +98,9 @@ float psys_get_current_display_percentage(ParticleSystem *psys, const bool use_r
ParticleSettings *part = psys->part;
if ((use_render_params &&
- !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 */
+ !particles_are_dynamic(psys)) || /* non-dynamic particles can be rendered fully */
+ (part->child_percent && part->childtype) || /* display percentage applies to children */
+ (psys->pointcache->flag & PTCACHE_BAKING)) /* baking is always done with full amount */
{
return 1.0f;
}
@@ -287,10 +287,10 @@ int psys_get_child_number(Scene *scene, ParticleSystem *psys, const bool use_ren
}
if (use_render_params) {
- child_num = psys->part->ren_child_nbr;
+ child_num = psys->part->child_render_percent;
}
else {
- child_num = psys->part->child_nbr;
+ child_num = psys->part->child_percent;
}
return get_render_child_particle_number(&scene->r, child_num, use_render_params);