[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [22368] branches/blender2.5/blender/source /blender/blenkernel/intern/smoke.c: Smoke: fix problem with more than 1 domain + collision and flow groups - reported by nudelZ aka "Master of Smoke"

Daniel Genrich daniel.genrich at gmx.net
Tue Aug 11 14:01:36 CEST 2009


Revision: 22368
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=22368
Author:   genscher
Date:     2009-08-11 14:01:36 +0200 (Tue, 11 Aug 2009)

Log Message:
-----------
Smoke: fix problem with more than 1 domain + collision and flow groups - reported by nudelZ aka "Master of Smoke"

Modified Paths:
--------------
    branches/blender2.5/blender/source/blender/blenkernel/intern/smoke.c

Modified: branches/blender2.5/blender/source/blender/blenkernel/intern/smoke.c
===================================================================
--- branches/blender2.5/blender/source/blender/blenkernel/intern/smoke.c	2009-08-11 11:52:23 UTC (rev 22367)
+++ branches/blender2.5/blender/source/blender/blenkernel/intern/smoke.c	2009-08-11 12:01:36 UTC (rev 22368)
@@ -662,10 +662,11 @@
 			smd->domain->omega = 1.0;
 			smd->domain->alpha = -0.001;
 			smd->domain->beta = 0.1;
-			smd->domain->flags = 0;
+			smd->domain->flags = 0; // MOD_SMOKE_DISSOLVE_INV;
 			smd->domain->strength = 2.0;
 			smd->domain->noise = MOD_SMOKE_NOISEWAVE;
 			smd->domain->visibility = 1;
+			// smd->domain->diss_speed = 50;
 
 			// init 3dview buffer
 			smd->domain->tvox = NULL;
@@ -759,9 +760,11 @@
 		{
 			GroupObject *go = NULL;
 			Base *base = NULL;
-			int cnt_domain = 0;
 			
 			tstart();
+			
+			// if(sds->flags & MOD_SMOKE_DISSOLVE)
+			// 	smoke_dissolve(sds->fluid, sds->diss_speed, sds->flags & MOD_SMOKE_DISSOLVE_LOG, sds->flags & MOD_SMOKE_DISSOLVE_INV);
 
 			/* reset view for new frame */
 			if(sds->viewsettings < MOD_SMOKE_VIEW_USEBIG)
@@ -769,34 +772,13 @@
 			else
 				sds->viewsettings = MOD_SMOKE_VIEW_USEBIG;
 
-			/* check for 2nd domain, if not there -> no groups are necessary */
-			for(base = scene->base.first; base; base= base->next) 
-			{
-				Object *ob1= base->object;
-				
-				if(ob1 && ob1 != ob)
-				{
-					ModifierData *tmd = modifiers_findByType(ob1, eModifierType_Smoke);
-
-					if(tmd && tmd->mode & (eModifierMode_Realtime | eModifierMode_Render))
-					{
-						SmokeModifierData *tsmd = (SmokeModifierData *)tmd;
-
-						if((tsmd->type & MOD_SMOKE_TYPE_DOMAIN))
-						{
-							cnt_domain++;
-						}
-					}
-				}
-			}
-
 			// do flows and fluids
-			if(sds->fluid_group || !cnt_domain)
+			if(1)
 			{
 				Object *otherobj = NULL;
 				ModifierData *md = NULL;
 
-				if(cnt_domain && !sds->fluid_group) // we use groups since we have 2 domains
+				if(sds->fluid_group) // we use groups since we have 2 domains
 					go = sds->fluid_group->gobject.first;
 				else
 					base = scene->base.first;
@@ -805,7 +787,7 @@
 				{
 					otherobj = NULL;
 
-					if(cnt_domain && !sds->fluid_group) 
+					if(sds->fluid_group) 
 					{
 						if(go->ob)
 							otherobj = go->ob;
@@ -815,7 +797,7 @@
 
 					if(!otherobj)
 					{
-						if(cnt_domain && !sds->fluid_group)
+						if(sds->fluid_group)
 							go = go->next;
 						else
 							base= base->next;
@@ -942,7 +924,7 @@
 						}	
 					}
 
-					if(cnt_domain && !sds->fluid_group)
+					if(sds->fluid_group)
 						go = go->next;
 					else
 						base= base->next;
@@ -967,12 +949,12 @@
 			*/
 
 			// do collisions	
-			if(sds->coll_group || !cnt_domain)
+			if(1)
 			{
 				Object *otherobj = NULL;
 				ModifierData *md = NULL;
 
-				if(cnt_domain && !sds->coll_group) // we use groups since we have 2 domains
+				if(sds->coll_group) // we use groups since we have 2 domains
 					go = sds->coll_group->gobject.first;
 				else
 					base = scene->base.first;
@@ -981,7 +963,7 @@
 				{
 					otherobj = NULL;
 
-					if(cnt_domain && !sds->coll_group) 
+					if(sds->coll_group) 
 					{
 						if(go->ob)
 							otherobj = go->ob;
@@ -991,7 +973,7 @@
 
 					if(!otherobj)
 					{
-						if(cnt_domain && !sds->coll_group)
+						if(sds->coll_group)
 							go = go->next;
 						else
 							base= base->next;
@@ -1065,7 +1047,7 @@
 						}
 					}
 
-					if(cnt_domain && !sds->coll_group)
+					if(sds->coll_group)
 						go = go->next;
 					else
 						base= base->next;





More information about the Bf-blender-cvs mailing list