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 <ideasman42@gmail.com>2013-01-31 01:17:38 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-01-31 01:17:38 +0400
commit4e7b18876c3e995f030f865072cdad0e0ca6ea94 (patch)
treef50066a35a7b826feec11fb751753fa2c93fb283 /source/blender/makesrna/intern/rna_particle.c
parent00025c74b49bb32b1803858b2d7731751a074514 (diff)
style cleanup
Diffstat (limited to 'source/blender/makesrna/intern/rna_particle.c')
-rw-r--r--source/blender/makesrna/intern/rna_particle.c27
1 files changed, 16 insertions, 11 deletions
diff --git a/source/blender/makesrna/intern/rna_particle.c b/source/blender/makesrna/intern/rna_particle.c
index a872ace6ae3..0107cd8b51e 100644
--- a/source/blender/makesrna/intern/rna_particle.c
+++ b/source/blender/makesrna/intern/rna_particle.c
@@ -289,8 +289,8 @@ static void rna_Particle_uv_on_emitter(ParticleData *particle, ParticleSystemMod
}
}
-static void rna_ParticleSystem_co_hair(ParticleSystem *particlesystem, Object *object, ParticleSystemModifierData *modifier, int particle_no, int step,
- float n_co[3])
+static void rna_ParticleSystem_co_hair(ParticleSystem *particlesystem, Object *object, ParticleSystemModifierData *modifier,
+ int particle_no, int step, float n_co[3])
{
ParticleSettings *part = 0;
ParticleData *pars = 0;
@@ -307,7 +307,7 @@ static void rna_ParticleSystem_co_hair(ParticleSystem *particlesystem, Object *o
part = particlesystem->part;
pars = particlesystem->particles;
- if(particlesystem->renderdata) {
+ if (particlesystem->renderdata) {
step_nbr = part->ren_step;
totchild = particlesystem->totchild;
}
@@ -381,10 +381,12 @@ static void rna_ParticleSystem_uv_on_emitter(ParticleSystem *particlesystem, Par
part = particlesystem->part;
- if(particlesystem->renderdata)
+ if (particlesystem->renderdata) {
totchild = particlesystem->totchild;
- else
+ }
+ else {
totchild = (int)((float)particlesystem->totchild * (float)(part->disp) / 100.0f);
+ }
/* can happen for disconnected/global hair */
if (part->type == PART_HAIR && !particlesystem->childcache)
@@ -466,10 +468,11 @@ static void rna_ParticleSystem_uv_on_emitter(ParticleSystem *particlesystem, Par
}
}
-static void rna_ParticleSystem_mcol_on_emitter(ParticleSystem *particlesystem, ParticleSystemModifierData *modifier, ParticleData *particle, int particle_no, int vcol_no,
- float n_mcol[3])
+static void rna_ParticleSystem_mcol_on_emitter(ParticleSystem *particlesystem, ParticleSystemModifierData *modifier,
+ ParticleData *particle, int particle_no, int vcol_no,
+ float n_mcol[3])
{
- ParticleSettings *part = 0;
+ ParticleSettings *part;
int totpart;
int totchild = 0;
int num;
@@ -481,10 +484,12 @@ static void rna_ParticleSystem_mcol_on_emitter(ParticleSystem *particlesystem, P
part = particlesystem->part;
- if(particlesystem->renderdata)
+ if (particlesystem->renderdata) {
totchild = particlesystem->totchild;
- else
+ }
+ else {
totchild = (int)((float)particlesystem->totchild * (float)(part->disp) / 100.0f);
+ }
/* can happen for disconnected/global hair */
if (part->type == PART_HAIR && !particlesystem->childcache)
@@ -495,7 +500,7 @@ static void rna_ParticleSystem_mcol_on_emitter(ParticleSystem *particlesystem, P
if (particle_no >= totpart + totchild)
return;
-/* 3. start creating renderable things */
+ /* 3. start creating renderable things */
/* setup per particle individual stuff */
if (particle_no < totpart) {