UI fixes are the hardest ones.. (2nd try)

This commit is contained in:
Daniel Genrich
2008-07-28 21:52:37 +00:00
parent dd1634b07d
commit dfc93da127
4 changed files with 14 additions and 11 deletions

View File

@@ -141,6 +141,8 @@ void fluidsim_init(FluidsimModifierData *fluidmd)
*/
fss->lastgoodframe = -1;
fss->flag = 0;
}

View File

@@ -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
}

View File

@@ -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
{

View File

@@ -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 =