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>2018-12-10 17:09:46 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2018-12-10 17:11:57 +0300
commitc2b0d8b6d6c771da70b8fd9da5ac9cc53d04184d (patch)
treef8d0db99e875b9f56c067e894b6c5f130f50b816 /source/blender/blenkernel/intern/particle_system.c
parentfc52d51d73844397b4410ced48448b496403953e (diff)
Fix T57633: Particle texture update problem
Textures are now hooked up to the RESET operation of particle settings, which ensures particles being re-distributed when texture is changed. This is limited to a direct user modifications, which matches old behavior in 2.79.
Diffstat (limited to 'source/blender/blenkernel/intern/particle_system.c')
-rw-r--r--source/blender/blenkernel/intern/particle_system.c19
1 files changed, 14 insertions, 5 deletions
diff --git a/source/blender/blenkernel/intern/particle_system.c b/source/blender/blenkernel/intern/particle_system.c
index 2cb9dd0e6f7..8d09215c564 100644
--- a/source/blender/blenkernel/intern/particle_system.c
+++ b/source/blender/blenkernel/intern/particle_system.c
@@ -4427,16 +4427,25 @@ void BKE_particlesystem_id_loop(ParticleSystem *psys, ParticleSystemIDFunc func,
/* **** Depsgraph evaluation **** */
+void BKE_particle_settings_eval_reset(
+ struct Depsgraph *depsgraph,
+ ParticleSettings *particle_settings)
+{
+ DEG_debug_print_eval(depsgraph,
+ __func__,
+ particle_settings->id.name,
+ particle_settings);
+ particle_settings->id.recalc |= ID_RECALC_PSYS_RESET;
+}
+
void BKE_particle_system_eval_init(struct Depsgraph *depsgraph,
- Scene *scene,
- Object *ob)
+ Object *object)
{
- DEG_debug_print_eval(depsgraph, __func__, ob->id.name, ob);
- for (ParticleSystem *psys = ob->particlesystem.first;
+ DEG_debug_print_eval(depsgraph, __func__, object->id.name, object);
+ for (ParticleSystem *psys = object->particlesystem.first;
psys != NULL;
psys = psys->next)
{
psys->recalc |= (psys->part->id.recalc & ID_RECALC_PSYS_ALL);
}
- BKE_ptcache_object_reset(scene, ob, PTCACHE_RESET_DEPSGRAPH);
}