Page MenuHome
Paste P1076

T69000 part 1
ActivePublic

Authored by Philipp Oeser (lichtwerk) on Aug 21 2019, 8:08 PM.
diff --git a/source/blender/makesrna/intern/rna_particle.c b/source/blender/makesrna/intern/rna_particle.c
index cadd66d564a..d28f5105186 100644
--- a/source/blender/makesrna/intern/rna_particle.c
+++ b/source/blender/makesrna/intern/rna_particle.c
@@ -615,7 +615,7 @@ static void rna_ParticleSystem_mcol_on_emitter(ParticleSystem *particlesystem,
}
}
-static void particle_recalc(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr, short flag)
+static void particle_recalc(Main *bmain, Scene *UNUSED(scene), PointerRNA *ptr, short flag)
{
if (ptr->type == &RNA_ParticleSystem) {
Object *ob = ptr->id.data;
@@ -626,6 +626,17 @@ static void particle_recalc(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRN
DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY);
}
else {
+ /* This seems to be additionally needed for particle edit mode. */
+ ParticleSettings *part = ptr->data;
+ for (Object *ob = bmain->objects.first; ob; ob = ob->id.next) {
+ for (ParticleSystem *psys = ob->particlesystem.first; psys; psys = psys->next) {
+ if (psys->part == part) {
+ BKE_particle_batch_cache_dirty_tag(psys, BKE_PARTICLE_BATCH_DIRTY_ALL);
+ }
+ }
+ }
+
+ /* this is enough for object mode */
DEG_id_tag_update(ptr->id.data, ID_RECALC_GEOMETRY | flag);
}