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.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.c')
-rw-r--r--source/blender/blenkernel/intern/particle.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/blenkernel/intern/particle.c b/source/blender/blenkernel/intern/particle.c
index c47b22dcd34..9ea1336a95a 100644
--- a/source/blender/blenkernel/intern/particle.c
+++ b/source/blender/blenkernel/intern/particle.c
@@ -2661,8 +2661,8 @@ void psys_find_parents(ParticleSimulationData *sim, const bool use_render_params
int from = PART_FROM_FACE;
totparent = (int)(totchild * part->parents * 0.3f);
- if (use_render_params && part->child_nbr && part->ren_child_nbr) {
- totparent *= (float)part->child_nbr / (float)part->ren_child_nbr;
+ if (use_render_params && part->child_percent && part->child_render_percent) {
+ totparent *= (float)part->child_percent / (float)part->child_render_percent;
}
/* hard limit, workaround for it being ignored above */
@@ -2736,8 +2736,8 @@ static bool psys_thread_context_init_path(ParticleThreadContext *ctx,
if (totchild && part->childtype == PART_CHILD_FACES) {
totparent = (int)(totchild * part->parents * 0.3f);
- if (use_render_params && part->child_nbr && part->ren_child_nbr) {
- totparent *= (float)part->child_nbr / (float)part->ren_child_nbr;
+ if (use_render_params && part->child_percent && part->child_render_percent) {
+ totparent *= (float)part->child_percent / (float)part->child_render_percent;
}
/* part->parents could still be 0 so we can't test with totparent */