[Bf-blender-cvs] [8463e6c] master: Fix for crash when using particle emission with clump/roughness curves in a smoke sim.

Lukas Tönne noreply at git.blender.org
Wed Mar 25 12:29:32 CET 2015


Commit: 8463e6cb416021d72282e386218118e06226101e
Author: Lukas Tönne
Date:   Wed Mar 25 12:26:16 2015 +0100
Branches: master
https://developer.blender.org/rB8463e6cb416021d72282e386218118e06226101e

Fix for crash when using particle emission with clump/roughness curves
in a smoke sim.

This interaction between sims is totally stupid and must be recoded
entirely in some utopian future.

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

M	source/blender/blenkernel/intern/smoke.c

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

diff --git a/source/blender/blenkernel/intern/smoke.c b/source/blender/blenkernel/intern/smoke.c
index 559e1e0..aa8649b 100644
--- a/source/blender/blenkernel/intern/smoke.c
+++ b/source/blender/blenkernel/intern/smoke.c
@@ -66,6 +66,7 @@
 #include "BKE_bvhutils.h"
 #include "BKE_cdderivedmesh.h"
 #include "BKE_collision.h"
+#include "BKE_colortools.h"
 #include "BKE_constraint.h"
 #include "BKE_customdata.h"
 #include "BKE_deform.h"
@@ -1239,6 +1240,12 @@ static void emit_from_particles(Object *flow_ob, SmokeDomainSettings *sds, Smoke
 		sim.ob = flow_ob;
 		sim.psys = psys;
 
+		/* prepare curvemapping tables */
+		if ((psys->part->child_flag & PART_CHILD_USE_CLUMP_CURVE) && psys->part->clumpcurve)
+			curvemapping_changed_all(psys->part->clumpcurve);
+		if ((psys->part->child_flag & PART_CHILD_USE_ROUGH_CURVE) && psys->part->roughcurve)
+			curvemapping_changed_all(psys->part->roughcurve);
+
 		/* initialize particle cache */
 		if (psys->part->type == PART_HAIR) {
 			// TODO: PART_HAIR not supported whatsoever




More information about the Bf-blender-cvs mailing list