[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [15853] branches/fluidcontrol/source/ blender: UI fixes are the hardest ones..

Daniel Genrich daniel.genrich at gmx.net
Mon Jul 28 23:52:37 CEST 2008


Revision: 15853
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=15853
Author:   genscher
Date:     2008-07-28 23:52:37 +0200 (Mon, 28 Jul 2008)

Log Message:
-----------
UI fixes are the hardest ones.. (2nd try)

Modified Paths:
--------------
    branches/fluidcontrol/source/blender/blenkernel/intern/fluidsim.c
    branches/fluidcontrol/source/blender/makesdna/DNA_object_fluidsim.h
    branches/fluidcontrol/source/blender/src/buttons_object.c
    branches/fluidcontrol/source/blender/src/fluidsim.c

Modified: branches/fluidcontrol/source/blender/blenkernel/intern/fluidsim.c
===================================================================
--- branches/fluidcontrol/source/blender/blenkernel/intern/fluidsim.c	2008-07-28 20:25:08 UTC (rev 15852)
+++ branches/fluidcontrol/source/blender/blenkernel/intern/fluidsim.c	2008-07-28 21:52:37 UTC (rev 15853)
@@ -141,6 +141,8 @@
 		*/
 		
 		fss->lastgoodframe = -1;
+		
+		fss->flag = 0;
 
 	}
 	

Modified: branches/fluidcontrol/source/blender/makesdna/DNA_object_fluidsim.h
===================================================================
--- branches/fluidcontrol/source/blender/makesdna/DNA_object_fluidsim.h	2008-07-28 20:25:08 UTC (rev 15852)
+++ branches/fluidcontrol/source/blender/makesdna/DNA_object_fluidsim.h	2008-07-28 21:52:37 UTC (rev 15853)
@@ -108,7 +108,7 @@
 	float surfaceSmoothing;
 	/* number of surface subdivisions*/
 	int surfaceSubdivs;
-	int unusedDNADummy;
+	int flag; /* GUI flags */
 
 	/* particle display - size scaling, and alpha influence */
 	float particleInfSize, particleInfAlpha;
@@ -158,8 +158,8 @@
 #define OB_FSPART_NEWPART (1<<3)
 #define OB_FSPART_FLOAT   (1<<4)
 
-// new fluid bit flags for show_advancedoptions (min 8 - 1,2,4 reserved) - dg
-#define OB_FLUIDSIM_REVERSE 8
+// new fluid bit flags for fss->flags - dg
+#define OB_FLUIDSIM_REVERSE 1
 
 #ifdef __cplusplus
 }

Modified: branches/fluidcontrol/source/blender/src/buttons_object.c
===================================================================
--- branches/fluidcontrol/source/blender/src/buttons_object.c	2008-07-28 20:25:08 UTC (rev 15852)
+++ branches/fluidcontrol/source/blender/src/buttons_object.c	2008-07-28 21:52:37 UTC (rev 15853)
@@ -5051,9 +5051,10 @@
 					       fss->bbSize[0],fss->bbSize[1],fss->bbSize[2], fss->maxRefine, memString );
 		
 			uiBlockBeginAlign ( block );
-			uiDefButBitS ( block, TOG, 4, REDRAWBUTSOBJECT, "Std",     0, yline,25,objHeight, &fss->show_advancedoptions, 0, 0, 0, 0, "Show standard domain options." );
-			uiDefButBitS ( block, TOG, 1, REDRAWBUTSOBJECT, "Adv",     25, yline,25,objHeight, &fss->show_advancedoptions, 0, 0, 0, 0, "Show advanced domain options." );
-			uiDefButBitS ( block, TOG, 2, REDRAWBUTSOBJECT, "Bnd",     50, yline,25,objHeight, &fss->show_advancedoptions, 0, 0, 0, 0, "Show domain boundary options." );
+			uiDefButS ( block, ROW, REDRAWBUTSOBJECT, "Std",	 0,yline, 25,objHeight, &fss->show_advancedoptions, 16.0, 0, 20.0, 0, "Show standard domain options." );
+			uiDefButS ( block, ROW, REDRAWBUTSOBJECT, "Adv",	25,yline, 25,objHeight, &fss->show_advancedoptions, 16.0, 1, 20.0, 1, "Show advanced domain options." );
+			uiDefButS ( block, ROW, REDRAWBUTSOBJECT, "Bnd",	50,yline, 25,objHeight, &fss->show_advancedoptions, 16.0, 2, 20.0, 2, "Show domain boundary options." );
+			
 			uiBlockEndAlign ( block );
 		
 			uiDefBut ( block, BUT, B_FLUIDSIM_BAKE, "BAKE",90, yline,210,objHeight, NULL, 0.0, 0.0, 10, 0, "Perform simulation and output and surface&preview meshes for each frame." );
@@ -5061,7 +5062,7 @@
 			yline -= lineHeight;
 			yline -= 2*separateHeight;
 		
-			if ( fss->show_advancedoptions & 1 )
+			if ( fss->show_advancedoptions == 1 )
 			{
 				// advanced options
 				uiDefBut ( block, LABEL, 0, "Gravity:",		0, yline,  90,objHeight, NULL, 0.0, 0, 0, 0, "" );
@@ -5106,7 +5107,7 @@
 				yline -= lineHeight;
 		
 			}
-			else if ( fss->show_advancedoptions & 2 )
+			else if ( fss->show_advancedoptions == 2 )
 			{
 				// copied from obstacle...
 				//yline -= lineHeight + 5;
@@ -5183,7 +5184,7 @@
 				yline -= 1*separateHeight;
 		
 				uiBlockBeginAlign ( block );
-				uiDefButBitS ( block, TOG, OB_FLUIDSIM_REVERSE, REDRAWBUTSOBJECT, "Reverse",     0, yline,50,objHeight, &fss->show_advancedoptions, 0, 0, 0, 0, "Reverse fluidsim frames" );
+				uiDefButBitS ( block, TOG, OB_FLUIDSIM_REVERSE, REDRAWBUTSOBJECT, "Reverse",     0, yline,50,objHeight, &fss->flag, 0, 0, 0, 0, "Reverse fluidsim frames" );
 				uiDefBut ( block, LABEL,   0, "",  50,yline,25,objHeight, NULL, 0.0, 0, 0, 0, "" );
 				uiDefIconBut ( block, BUT, B_FLUIDSIM_SELDIR, ICON_FILESEL,  75, yline,  20, objHeight,                   0, 0, 0, 0, 0,  "Select Directory (and/or filename prefix) to store baked fluid simulation files in" );
 				uiDefBut ( block, TEX,     B_BAKE_CACHE_CHANGE,"",	      95, yline, 205, objHeight, fss->surfdataPath, 0.0,79.0, 0, 0,  "Enter Directory (and/or filename prefix) to store baked fluid simulation files in" );
@@ -5340,7 +5341,7 @@
 		
 			yline -= lineHeight;
 			uiDefButF ( block, NUM, B_DIFF, "Quality:", 0, yline,150,20, &fss->cpsQuality, 5.0, 100.0,   10,0, "Specifies the quality which is used for object sampling (higher = better but slower)." );
-			uiDefButBitS ( block, TOG, OB_FLUIDSIM_REVERSE, REDRAWBUTSOBJECT, "Reverse",     150, yline,150,20, &fss->show_advancedoptions, 0, 0, 0, 0, "Reverse control object movement." );
+			uiDefButBitS ( block, TOG, OB_FLUIDSIM_REVERSE, REDRAWBUTSOBJECT, "Reverse",     150, yline,150,20, &fss->flag, 0, 0, 0, 0, "Reverse control object movement." );
 		}
 		else
 		{

Modified: branches/fluidcontrol/source/blender/src/fluidsim.c
===================================================================
--- branches/fluidcontrol/source/blender/src/fluidsim.c	2008-07-28 20:25:08 UTC (rev 15852)
+++ branches/fluidcontrol/source/blender/src/fluidsim.c	2008-07-28 21:52:37 UTC (rev 15853)
@@ -956,7 +956,7 @@
 					fsmesh.cpsTimeStart = fluidmdtmp->fss->cpsTimeStart;
 					fsmesh.cpsTimeEnd = fluidmdtmp->fss->cpsTimeEnd;
 					fsmesh.cpsQuality = fluidmdtmp->fss->cpsQuality;
-					fsmesh.obstacleType = (fluidmdtmp->fss->show_advancedoptions & OB_FLUIDSIM_REVERSE);
+					fsmesh.obstacleType = (fluidmdtmp->fss->flag & OB_FLUIDSIM_REVERSE);
 					
 					fsmesh.channelSizeAttractforceRadius = 
 					fsmesh.channelSizeVelocityforceStrength = 





More information about the Bf-blender-cvs mailing list