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:
authorMiika Hamalainen <blender@miikah.org>2013-05-10 23:30:08 +0400
committerMiika Hamalainen <blender@miikah.org>2013-05-10 23:30:08 +0400
commitc152913217e29e46a90f811b9308343b70b283fd (patch)
tree7cbeda524ef7315cd25d5b74968ceba73f37fde9 /source/blender/blenkernel/intern/smoke.c
parent6dc23a2712d5c45d281c20e77b0d21902f3860b6 (diff)
Couple fixes for my previous commit:
- In some cases smoke flow could have 1 cell clipped off its sides. - Forgot to re-enable openmp for emission code.
Diffstat (limited to 'source/blender/blenkernel/intern/smoke.c')
-rw-r--r--source/blender/blenkernel/intern/smoke.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/blenkernel/intern/smoke.c b/source/blender/blenkernel/intern/smoke.c
index 1d0ac507f31..1c66c5ccf77 100644
--- a/source/blender/blenkernel/intern/smoke.c
+++ b/source/blender/blenkernel/intern/smoke.c
@@ -1250,7 +1250,7 @@ static void emit_from_derivedmesh(Object *flow_ob, SmokeDomainSettings *sds, Smo
float *vert_vel = NULL;
int has_velocity = 0;
- float min[3], max[3], res[3];
+ int min[3], max[3], res[3];
int hires_multiplier = 1;
CDDM_calc_normals(dm);
@@ -1310,7 +1310,7 @@ static void emit_from_derivedmesh(Object *flow_ob, SmokeDomainSettings *sds, Smo
}
/* set emission map */
- clampBoundsInDomain(sds, em->min, em->max, NULL, NULL, sfs->surface_distance, dt);
+ clampBoundsInDomain(sds, em->min, em->max, NULL, NULL, (int)ceil(sfs->surface_distance), dt);
em_allocateData(em, sfs->flags & MOD_SMOKE_FLOW_INITVELOCITY, hires_multiplier);
/* setup loop bounds */
@@ -1321,7 +1321,7 @@ static void emit_from_derivedmesh(Object *flow_ob, SmokeDomainSettings *sds, Smo
}
if (bvhtree_from_mesh_faces(&treeData, dm, 0.0f, 4, 6)) {
- //#pragma omp parallel for schedule(static)
+ #pragma omp parallel for schedule(static)
for (z = min[2]; z < max[2]; z++) {
int x, y;
for (x = min[0]; x < max[0]; x++)