[Bf-blender-cvs] [c23ce4a] fluid-mantaflow: fixed viewport bug: objects inside smoke or liquid domain are now visible

Sebastián Barschkis noreply at git.blender.org
Mon Aug 8 21:22:27 CEST 2016


Commit: c23ce4a79da660daf2221a8d8cda48b6deabb30d
Author: Sebastián Barschkis
Date:   Mon Aug 8 21:21:47 2016 +0200
Branches: fluid-mantaflow
https://developer.blender.org/rBc23ce4a79da660daf2221a8d8cda48b6deabb30d

fixed viewport bug: objects inside smoke or liquid domain are now visible

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

M	source/blender/blenkernel/intern/smoke.c
M	source/blender/editors/space_view3d/drawobject.c

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

diff --git a/source/blender/blenkernel/intern/smoke.c b/source/blender/blenkernel/intern/smoke.c
index 3783520..8aecfde 100644
--- a/source/blender/blenkernel/intern/smoke.c
+++ b/source/blender/blenkernel/intern/smoke.c
@@ -555,6 +555,7 @@ void smokeModifier_createType(struct SmokeModifierData *smd)
 			
 			smd->domain->viewport_display_mode = SM_VIEWPORT_FINAL;
 			smd->domain->render_display_mode = SM_VIEWPORT_FINAL;
+			smd->domain->type = MOD_SMOKE_DOMAIN_TYPE_GAS;
 			
 			/* liquid */
 			smd->domain->particle_randomness = 0.1f;
diff --git a/source/blender/editors/space_view3d/drawobject.c b/source/blender/editors/space_view3d/drawobject.c
index 43f3a0d..28f0925 100644
--- a/source/blender/editors/space_view3d/drawobject.c
+++ b/source/blender/editors/space_view3d/drawobject.c
@@ -7528,7 +7528,7 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, const short
 	{
 		smd = (SmokeModifierData *)md;
 
-		if (smd->domain && smd->domain->type & MOD_SMOKE_DOMAIN_TYPE_GAS) {
+		if (smd->domain && (smd->domain->type == MOD_SMOKE_DOMAIN_TYPE_GAS)) {
 			if (!v3d->transp && (dflag & DRAW_PICKING) == 0) {
 				if (!v3d->xray && !(ob->dtx & OB_DRAWXRAY)) {
 					/* object has already been drawn so skip drawing it */
@@ -7900,7 +7900,7 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, const short
 #endif
 
 		/* only draw domains */
-		if (smd->domain) {
+		if (smd->domain && (smd->domain->type == MOD_SMOKE_DOMAIN_TYPE_GAS)) {
 			SmokeDomainSettings *sds = smd->domain;
 			float viewnormal[3];




More information about the Bf-blender-cvs mailing list