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>2011-07-26 07:00:55 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-07-26 07:00:55 +0400
commit794f3291fed5f85f8057a49683acdcb80edb0a02 (patch)
tree90dcffc20aef49385116f25651d2edec9a04d308 /source/blender/blenkernel/intern/particle_system.c
parente59ef5e419b52e16f831bfc31c5773419c546ae1 (diff)
parent9fb2e5dde70bd971dabfdf3b1099d92241dc96ed (diff)
svn merge -r38200:38300 https://svn.blender.org/svnroot/bf-blender/trunk/blender, source/blender/gpu/intern/gpu_buffers.c updated from trunk and re-made edits to use getTessFace* functions.
Diffstat (limited to 'source/blender/blenkernel/intern/particle_system.c')
-rw-r--r--source/blender/blenkernel/intern/particle_system.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/source/blender/blenkernel/intern/particle_system.c b/source/blender/blenkernel/intern/particle_system.c
index 2cdb5ecd5d3..399273ab99e 100644
--- a/source/blender/blenkernel/intern/particle_system.c
+++ b/source/blender/blenkernel/intern/particle_system.c
@@ -3510,13 +3510,15 @@ static void do_hair_dynamics(ParticleSimulationData *sim)
static void hair_step(ParticleSimulationData *sim, float cfra)
{
ParticleSystem *psys = sim->psys;
-/* ParticleSettings *part = psys->part; */
+ ParticleSettings *part = psys->part;
PARTICLE_P;
float disp = (float)psys_get_current_display_percentage(psys)/100.0f;
- BLI_srandom(psys->seed);
-
LOOP_PARTICLES {
+ pa->size = part->size;
+ if(part->randsize > 0.0f)
+ pa->size *= 1.0f - part->randsize * PSYS_FRAND(p + 1);
+
if(PSYS_FRAND(p) > disp)
pa->flag |= PARS_NO_DISP;
else
@@ -3801,8 +3803,6 @@ static void cached_step(ParticleSimulationData *sim, float cfra)
PARTICLE_P;
float disp, dietime;
- BLI_srandom(psys->seed);
-
psys_update_effectors(sim);
disp= (float)psys_get_current_display_percentage(psys)/100.0f;
@@ -4054,7 +4054,6 @@ static void system_step(ParticleSimulationData *sim, float cfra)
/* set particles to be not calculated TODO: can't work with pointcache */
disp= (float)psys_get_current_display_percentage(psys)/100.0f;
- BLI_srandom(psys->seed);
LOOP_PARTICLES {
if(PSYS_FRAND(p) > disp)
pa->flag |= PARS_NO_DISP;