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:
authorSergey Sharybin <sergey.vfx@gmail.com>2014-02-05 21:37:19 +0400
committerSergey Sharybin <sergey.vfx@gmail.com>2014-02-05 21:46:01 +0400
commit78c491e62a573eac647085a0520cb35526d6fcc3 (patch)
treea1addde2d05532f58ea590dfcaf69b1e9a96569f /source/blender/editors/physics/particle_edit.c
parent9800ed5f6d0a31dd075363ac2e0ba80842e20443 (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/editors/physics/particle_edit.c')
-rw-r--r--source/blender/editors/physics/particle_edit.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/editors/physics/particle_edit.c b/source/blender/editors/physics/particle_edit.c
index 5288589b6f4..253a420b88a 100644
--- a/source/blender/editors/physics/particle_edit.c
+++ b/source/blender/editors/physics/particle_edit.c
@@ -3458,7 +3458,7 @@ static int brush_add(PEData *data, short number)
}
pa->size= 1.0f;
- initialize_particle(&sim, pa, i);
+ initialize_particle(pa);
reset_particle(&sim, pa, 0.0, 1.0);
point->flag |= PEP_EDIT_RECALC;
if (pe_x_mirror(ob))