diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2014-02-05 21:37:19 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2014-02-05 21:46:01 +0400 |
commit | 78c491e62a573eac647085a0520cb35526d6fcc3 (patch) | |
tree | a1addde2d05532f58ea590dfcaf69b1e9a96569f /source/blender/blenkernel/BKE_particle.h | |
parent | 9800ed5f6d0a31dd075363ac2e0ba80842e20443 (diff) |
Fix T35247: Particle texture behaves incorrectly after changing the number of particles
Root of the issue goes to the order of particle initialization which does
texture evaluation (which does depend on particle coordinate) and particle
birth coordinate calculation. So basically what happened is:
* Changing number of particles re-allocated all the particles,
which sets their coordinate to (0,0,0)
* Texture evaluation used this non-initialized coordinate
* Coordinates were calculated for particles
Reshuffled code a bit so now texture evaluation happens after particles.
coordinate calculation. Basically moved texture evaluation to particle
reset function. Reset happens after initialization anyway and it does
know particle coordinates. Also, if reset is being called without init
then it's also kind of logical to re-evaluate texture because particle
coordinates might change.
Diffstat (limited to 'source/blender/blenkernel/BKE_particle.h')
-rw-r--r-- | source/blender/blenkernel/BKE_particle.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/blenkernel/BKE_particle.h b/source/blender/blenkernel/BKE_particle.h index 59274347e1f..b6be72fadd3 100644 --- a/source/blender/blenkernel/BKE_particle.h +++ b/source/blender/blenkernel/BKE_particle.h @@ -376,7 +376,7 @@ void psys_particle_on_dm(struct DerivedMesh *dm, int from, int index, int index_ float orco[3], float ornor[3]); /* particle_system.c */ -void initialize_particle(struct ParticleSimulationData *sim, struct ParticleData *pa, int p); +void initialize_particle(struct ParticleData *pa); void psys_calc_dmcache(struct Object *ob, struct DerivedMesh *dm, struct ParticleSystem *psys); int psys_particle_dm_face_lookup(struct Object *ob, struct DerivedMesh *dm, int index, const float fw[4], struct LinkNode *node); |