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:
authorDaniel Genrich <daniel.genrich@gmx.net>2008-07-29 01:52:37 +0400
committerDaniel Genrich <daniel.genrich@gmx.net>2008-07-29 01:52:37 +0400
commitdfc93da127a03bfd87cb56a3f33566ebf7be6f01 (patch)
treef4ea1c9b3e4fa8815e990f676353db8009bf36be
parentdd1634b07d4141c941a3ce17c88ecc0e3a92378c (diff)
UI fixes are the hardest ones.. (2nd try)
-rw-r--r--source/blender/blenkernel/intern/fluidsim.c2
-rw-r--r--source/blender/makesdna/DNA_object_fluidsim.h6
-rw-r--r--source/blender/src/buttons_object.c15
-rw-r--r--source/blender/src/fluidsim.c2
4 files changed, 14 insertions, 11 deletions
diff --git a/source/blender/blenkernel/intern/fluidsim.c b/source/blender/blenkernel/intern/fluidsim.c
index 29c7fff24f9..746e4387b61 100644
--- a/source/blender/blenkernel/intern/fluidsim.c
+++ b/source/blender/blenkernel/intern/fluidsim.c
@@ -141,6 +141,8 @@ void fluidsim_init(FluidsimModifierData *fluidmd)
*/
fss->lastgoodframe = -1;
+
+ fss->flag = 0;
}
diff --git a/source/blender/makesdna/DNA_object_fluidsim.h b/source/blender/makesdna/DNA_object_fluidsim.h
index 19e65855c54..ac7828b1798 100644
--- a/source/blender/makesdna/DNA_object_fluidsim.h
+++ b/source/blender/makesdna/DNA_object_fluidsim.h
@@ -108,7 +108,7 @@ typedef struct FluidsimSettings {
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 @@ typedef struct FluidsimSettings {
#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
}
diff --git a/source/blender/src/buttons_object.c b/source/blender/src/buttons_object.c
index 658bbf648a4..02b90db2335 100644
--- a/source/blender/src/buttons_object.c
+++ b/source/blender/src/buttons_object.c
@@ -5051,9 +5051,10 @@ static void object_panel_fluidsim(Object *ob)
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 @@ static void object_panel_fluidsim(Object *ob)
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 @@ static void object_panel_fluidsim(Object *ob)
yline -= lineHeight;
}
- else if ( fss->show_advancedoptions & 2 )
+ else if ( fss->show_advancedoptions == 2 )
{
// copied from obstacle...
//yline -= lineHeight + 5;
@@ -5183,7 +5184,7 @@ static void object_panel_fluidsim(Object *ob)
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 @@ static void object_panel_fluidsim(Object *ob)
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
{
diff --git a/source/blender/src/fluidsim.c b/source/blender/src/fluidsim.c
index 7d5939ce94b..05e82921e92 100644
--- a/source/blender/src/fluidsim.c
+++ b/source/blender/src/fluidsim.c
@@ -956,7 +956,7 @@ void fluidsimBake(struct Object *ob)
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 =