[Bf-blender-cvs] [74ff9c1036a] fluid-mantaflow: fix for particle system sanity check
Sebastián Barschkis
noreply at git.blender.org
Tue Jun 13 15:22:16 CEST 2017
Commit: 74ff9c1036aa38f854c497da89f3d479272658c3
Author: Sebastián Barschkis
Date: Sun Jun 11 14:37:19 2017 +0200
Branches: fluid-mantaflow
https://developer.blender.org/rB74ff9c1036aa38f854c497da89f3d479272658c3
fix for particle system sanity check
sanity was a little to late. needs to be before any file reading (getter) operation
===================================================================
M source/blender/blenkernel/intern/particle_system.c
===================================================================
diff --git a/source/blender/blenkernel/intern/particle_system.c b/source/blender/blenkernel/intern/particle_system.c
index 0807c4f7215..483daf02f35 100644
--- a/source/blender/blenkernel/intern/particle_system.c
+++ b/source/blender/blenkernel/intern/particle_system.c
@@ -3774,6 +3774,11 @@ static void particles_manta_step(ParticleSimulationData *sim, int UNUSED(cfra),
int p, totpart;
int flagActivePart, activeParts = 0, fileParts = 0;
+ // Sanity check: no particle files present yet
+ // TODO (sebbas): need better way to catch cases where pp is not yet present
+ if (curFrame == 0)
+ return;
+
totpart = liquid_get_num_particles(sds->fluid);
totpart = (use_render_params) ? totpart : (part->disp*totpart) / 100;
@@ -3786,11 +3791,6 @@ static void particles_manta_step(ParticleSimulationData *sim, int UNUSED(cfra),
for (p=0, pa=psys->particles; p<totpart; p++, pa++) {
- // Sanity check: no particle files present yet
- // TODO (sebbas): need better way to catch cases where pp is not yet present
- if (curFrame == 0)
- return;
-
flagActivePart = liquid_get_particle_flag_at(sds->fluid, p);
// Only allow active particles, i.e. filter out dead particles that just Mantaflow needs
More information about the Bf-blender-cvs
mailing list