Commit: 723cc85423105da0957b181a17615e7956fc4d05
Author: Sebastián Barschkis
Date: Sat Apr 6 18:33:12 2019 +0200
Branches: fluid-mantaflow
https://developer.blender.org/rB723cc85423105da0957b181a17615e7956fc4d05
Mantaflow: Fixes small issue with levelset
Minor change in levelset generation and added sanity check for flowsflags
===================================================================
M source/blender/blenkernel/intern/smoke.c
===================================================================
diff --git a/source/blender/blenkernel/intern/smoke.c
b/source/blender/blenkernel/intern/smoke.c
index 45e4c6f0897..821ff1d8bf8 100644
--- a/source/blender/blenkernel/intern/smoke.c
+++ b/source/blender/blenkernel/intern/smoke.c
@@ -1808,7 +1808,7 @@ static void update_mesh_distances(int index, float
*mesh_distances, BVHTreeFromM
/* Initialize grid points to -0.5 inside and 0.5 outside mesh.
* Inside mesh: All rays have to hit (no misses) or all face normals
have to match ray direction */
if (mesh_distances[index] != -0.5f)
- mesh_distances[index] = (miss_cnt > 1 || dir_cnt == ray_cnt) ?
0.5f : -0.5f;
+ mesh_distances[index] = (miss_cnt > 0 || dir_cnt == ray_cnt) ?
0.5f : -0.5f;
/* Second pass: Ensure that single planes get initialized. */
BVHTreeNearest nearest = {0};
@@ -2528,6 +2528,9 @@ static void update_flowsflags(SmokeDomainSettings *sds,
Object **flowobjs, int n
Object *collob = flowobjs[flowIndex];
SmokeModifierData *smd2 = (SmokeModifierData
*)modifiers_findByType(collob, eModifierType_Smoke);
+ // Sanity check
+ if (!smd2) continue;
+
if ((smd2->type & MOD_SMOKE_TYPE_FLOW) && smd2->flow) {
SmokeFlowSettings *sfs = smd2->flow;
if (!sfs) break;
_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs