[Bf-blender-cvs] [c4a783bdf78] blender2.8: Fix lack of particles updates and disappearing particles

Mai Lavelle noreply at git.blender.org
Thu Feb 15 09:37:49 CET 2018


Commit: c4a783bdf78dc9af9a622f9bcbbccc1410c246a7
Author: Mai Lavelle
Date:   Sat Feb 10 02:40:41 2018 -0500
Branches: blender2.8
https://developer.blender.org/rBc4a783bdf78dc9af9a622f9bcbbccc1410c246a7

Fix lack of particles updates and disappearing particles

The conditionals in particle code are... some sort of madness... I'm not
even sure what the correct behavior should be from looking at it.

In this case the path cache generation was being skipped in edit mode.

===================================================================

M	source/blender/blenkernel/intern/particle.c
M	source/blender/blenkernel/intern/particle_system.c

===================================================================

diff --git a/source/blender/blenkernel/intern/particle.c b/source/blender/blenkernel/intern/particle.c
index daab16959d1..0bc5135c960 100644
--- a/source/blender/blenkernel/intern/particle.c
+++ b/source/blender/blenkernel/intern/particle.c
@@ -2590,9 +2590,11 @@ void psys_cache_paths(ParticleSimulationData *sim, float cfra, const bool use_re
 	if ((psys->flag & PSYS_HAIR_DONE || psys->flag & PSYS_KEYED || psys->pointcache) == 0)
 		return;
 
+#if 0 /* TODO(mai): something is very wrong with these conditionals, they dont make sense and the cache isnt updating */
 	if (psys_in_edit_mode(sim->eval_ctx, sim->eval_ctx->view_layer, psys))
 		if (psys->renderdata == 0 && (psys->edit == NULL || pset->flag & PE_DRAW_PART) == 0)
 			return;
+#endif
 
 	keyed = psys->flag & PSYS_KEYED;
 	baked = psys->pointcache->mem_cache.first && psys->part->type != PART_HAIR;
diff --git a/source/blender/blenkernel/intern/particle_system.c b/source/blender/blenkernel/intern/particle_system.c
index d187a009a2d..0fcc918a069 100644
--- a/source/blender/blenkernel/intern/particle_system.c
+++ b/source/blender/blenkernel/intern/particle_system.c
@@ -2936,12 +2936,15 @@ static void psys_update_path_cache(ParticleSimulationData *sim, float cfra, cons
 			skip = 1; /* draw visualization */
 		else if (psys->pointcache->flag & PTCACHE_BAKING)
 			skip = 1; /* no need to cache paths while baking dynamics */
+
+#if 0 /* TODO(mai): something is very wrong with these conditionals, they dont make sense and the cache isnt updating */
 		else if (psys_in_edit_mode(sim->eval_ctx, sim->eval_ctx->view_layer, psys)) {
 			if ((pset->flag & PE_DRAW_PART)==0)
 				skip = 1;
 			else if (part->childtype==0 && (psys->flag & PSYS_HAIR_DYNAMICS && psys->pointcache->flag & PTCACHE_BAKED)==0)
 				skip = 1; /* in edit mode paths are needed for child particles and dynamic hair */
 		}
+#endif
 	}



More information about the Bf-blender-cvs mailing list