[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [16655] trunk/blender/source/blender/src/ buttons_object.c: Patch for rearranging fluid GUI provided by artist nudelZ
Daniel Genrich
daniel.genrich at gmx.net
Sun Sep 21 23:02:41 CEST 2008
Revision: 16655
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=16655
Author: genscher
Date: 2008-09-21 23:02:41 +0200 (Sun, 21 Sep 2008)
Log Message:
-----------
Patch for rearranging fluid GUI provided by artist nudelZ
Modified Paths:
--------------
trunk/blender/source/blender/src/buttons_object.c
Modified: trunk/blender/source/blender/src/buttons_object.c
===================================================================
--- trunk/blender/source/blender/src/buttons_object.c 2008-09-21 20:39:19 UTC (rev 16654)
+++ trunk/blender/source/blender/src/buttons_object.c 2008-09-21 21:02:41 UTC (rev 16655)
@@ -5011,9 +5011,9 @@
{
#ifndef DISABLE_ELBEEM
uiBlock *block;
- int yline = 160;
+ int yline = 174;
const int lineHeight = 20;
- const int separateHeight = 3;
+ const int separateHeight = 2;
const int objHeight = 20;
FluidsimModifierData *fluidmd = (FluidsimModifierData *)modifiers_findByType(ob, eModifierType_Fluidsim);
int libdata = 0, val = 0;
@@ -5033,7 +5033,7 @@
}
else
{
- but = uiDefButI(block, TOG, REDRAWBUTSOBJECT, "Fluidsim", 10,200,130,20, &val, 0, 0, 0, 0, "Sets object to participate in fluid simulation");
+ but = uiDefButI(block, TOG, REDRAWBUTSOBJECT, "Fluid", 0,200,130,20, &val, 0, 0, 0, 0, "Sets object to participate in fluid simulation");
uiButSetFunc(but, object_fluidsim__enabletoggle, ob, NULL);
/*
@@ -5048,6 +5048,8 @@
*/
}
+ uiDefBut(block, LABEL, 0, "",0,0,300,0, NULL, 0.0, 0, 0, 0, ""); /* tell UI we go to 10,10*/
+
if(fluidmd)
{
FluidsimSettings *fss = fluidmd->fss;
@@ -5065,26 +5067,25 @@
uiSetButLock(1, "Simulation frames are baked");
}
*/
-
uiBlockBeginAlign ( block );
- uiDefButS ( block, ROW, B_FLUIDSIM_CHANGETYPE ,"Domain", 90, yline, 70,objHeight, &fss->type, 15.0, OB_FLUIDSIM_DOMAIN, 20.0, 1.0, "Bounding box of this object represents the computational domain of the fluid simulation." );
- uiDefButS ( block, ROW, B_FLUIDSIM_CHANGETYPE ,"Fluid", 160, yline, 70,objHeight, &fss->type, 15.0, OB_FLUIDSIM_FLUID, 20.0, 2.0, "Object represents a volume of fluid in the simulation." );
- uiDefButS ( block, ROW, B_FLUIDSIM_CHANGETYPE ,"Obstacle", 230, yline, 70,objHeight, &fss->type, 15.0, OB_FLUIDSIM_OBSTACLE,20.0, 3.0, "Object is a fixed obstacle." );
+ uiDefButS ( block, ROW, B_FLUIDSIM_CHANGETYPE ,"Domain", 90, yline, 70,objHeight, &fss->type, 15.0, OB_FLUIDSIM_DOMAIN, 20.0, 1.0, "Bounding box of this object represents the computational domain of the fluid simulation." );
+ uiDefButS ( block, ROW, B_FLUIDSIM_CHANGETYPE ,"Fluid", 160, yline, 70,objHeight, &fss->type, 15.0, OB_FLUIDSIM_FLUID, 20.0, 2.0, "Object represents a volume of fluid in the simulation." );
+ uiDefButS ( block, ROW, B_FLUIDSIM_CHANGETYPE ,"Obstacle", 230, yline, 70,objHeight, &fss->type, 15.0, OB_FLUIDSIM_OBSTACLE, 20.0, 3.0, "Object is a fixed obstacle." );
yline -= lineHeight;
- uiDefButS ( block, ROW, B_FLUIDSIM_CHANGETYPE ,"Inflow", 90, yline, 52,objHeight, &fss->type, 15.0, OB_FLUIDSIM_INFLOW, 20.0, 4.0, "Object adds fluid to the simulation." );
- uiDefButS ( block, ROW, B_FLUIDSIM_CHANGETYPE ,"Outflow", 142, yline, 52,objHeight, &fss->type, 15.0, OB_FLUIDSIM_OUTFLOW, 20.0, 5.0, "Object removes fluid from the simulation." );
- uiDefButS ( block, ROW, B_FLUIDSIM_MAKEPART ,"Particle", 194, yline, 52,objHeight, &fss->type, 15.0, OB_FLUIDSIM_PARTICLE,20.0, 3.0, "Object is made a particle system to display particles generated by a fluidsim domain object." );
-
- uiDefButS ( block, ROW, B_FLUIDSIM_CHANGETYPE ,"Control", 246, yline, 54,objHeight, &fss->type, 15.0, OB_FLUIDSIM_CONTROL,20.0, 3.0, "Object is made a fluid control mesh, which influences the fluid." );
+ uiDefButS ( block, ROW, B_FLUIDSIM_CHANGETYPE ,"Inflow", 90, yline, 52,objHeight, &fss->type, 15.0, OB_FLUIDSIM_INFLOW, 20.0, 4.0, "Object adds fluid to the simulation." );
+ uiDefButS ( block, ROW, B_FLUIDSIM_CHANGETYPE ,"Outflow", 142, yline, 52,objHeight, &fss->type, 15.0, OB_FLUIDSIM_OUTFLOW, 20.0, 5.0, "Object removes fluid from the simulation." );
+ uiDefButS ( block, ROW, B_FLUIDSIM_MAKEPART ,"Particle", 194, yline, 52,objHeight, &fss->type, 15.0, OB_FLUIDSIM_PARTICLE,20.0, 3.0, "Object is made a particle system to display particles generated by a fluidsim domain object." );
+ uiDefButS ( block, ROW, B_FLUIDSIM_CHANGETYPE ,"Control", 246, yline, 54,objHeight, &fss->type, 15.0, OB_FLUIDSIM_CONTROL,20.0, 3.0, "Object is made a fluid control mesh, which influences the fluid." );
uiBlockEndAlign ( block );
yline -= lineHeight;
- yline -= 2*separateHeight;
-
+ yline -= separateHeight;
+
+
/* display specific settings for each type */
if ( fss->type == OB_FLUIDSIM_DOMAIN )
{
- const int maxRes = 512;
+ const int maxRes = 1024;
char memString[32];
Mesh *mesh = ob->data;
@@ -5096,27 +5097,27 @@
uiBlockBeginAlign ( block );
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." );
-
+ uiDefButS ( block, ROW, REDRAWBUTSOBJECT, "Adv", 20,yline, 25,objHeight, &fss->show_advancedoptions, 16.0, 1, 20.0, 1, "Show advanced domain options." );
+ uiDefButS ( block, ROW, REDRAWBUTSOBJECT, "Bnd", 40,yline, 25,objHeight, &fss->show_advancedoptions, 16.0, 2, 20.0, 2, "Show domain boundary options." );
+ uiDefButS ( block, ROW, REDRAWBUTSOBJECT, "Par", 60,yline, 25,objHeight, &fss->show_advancedoptions, 16.0, 3, 20.0, 3, "Show particle 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." );
yline -= lineHeight;
- yline -= 2*separateHeight;
+ yline -= separateHeight;
if ( fss->show_advancedoptions == 1 )
{
// advanced options
- uiDefBut ( block, LABEL, 0, "Gravity:", 0, yline, 90,objHeight, NULL, 0.0, 0, 0, 0, "" );
+ uiDefBut ( block, LABEL, 0, "Gravity:", 0, yline, 120,objHeight, NULL, 0.0, 0, 0, 0, "" );
uiBlockBeginAlign ( block );
- uiDefButF ( block, NUM, B_DIFF, "X:", 90, yline, 70,objHeight, &fss->gravx, -1000.1, 1000.1, 10, 0, "Gravity in X direction" );
- uiDefButF ( block, NUM, B_DIFF, "Y:", 160, yline, 70,objHeight, &fss->gravy, -1000.1, 1000.1, 10, 0, "Gravity in Y direction" );
- uiDefButF ( block, NUM, B_DIFF, "Z:", 230, yline, 70,objHeight, &fss->gravz, -1000.1, 1000.1, 10, 0, "Gravity in Z direction" );
+ uiDefButF ( block, NUM, B_DIFF, "X:", 120, yline, 60,objHeight, &fss->gravx, -1000.1, 1000.1, 10, 0, "Gravity in X direction" );
+ uiDefButF ( block, NUM, B_DIFF, "Y:", 180, yline, 60,objHeight, &fss->gravy, -1000.1, 1000.1, 10, 0, "Gravity in Y direction" );
+ uiDefButF ( block, NUM, B_DIFF, "Z:", 240, yline, 60,objHeight, &fss->gravz, -1000.1, 1000.1, 10, 0, "Gravity in Z direction" );
uiBlockEndAlign ( block );
yline -= lineHeight;
- yline -= 1*separateHeight;
+ yline -= separateHeight;
/* viscosity */
if ( fss->viscosityMode==1 ) /*manual*/
@@ -5125,29 +5126,32 @@
0,yline, 90,objHeight, &fss->viscosityMode, 0, 0, 0, 0, "Set viscosity of the fluid to a preset value, or use manual input." );
if ( fss->viscosityMode==1 )
{
- uiDefButF ( block, NUM, B_DIFF, "Value:", 90, yline, 105,objHeight, &fss->viscosityValue, 0.0, 10.0, 10, 0, "Viscosity setting: value that is multiplied by 10 to the power of (exponent*-1)." );
- uiDefButS ( block, NUM, B_DIFF, "Neg-Exp.:", 195, yline, 105,objHeight, &fss->viscosityExponent, 0, 10, 10, 0, "Negative exponent for the viscosity value (to simplify entering small values e.g. 5*10^-6." );
+ uiBlockBeginAlign ( block );
+ uiDefButF ( block, NUM, B_DIFF, "Value:", 120, yline, 90,objHeight, &fss->viscosityValue, 0.0, 10.0, 10, 0, "Viscosity setting: value that is multiplied by 10 to the power of (exponent*-1)." );
+ uiDefButS ( block, NUM, B_DIFF, "Neg-Exp.:", 210, yline, 90,objHeight, &fss->viscosityExponent, 0, 10, 10, 0, "Negative exponent for the viscosity value (to simplify entering small values e.g. 5*10^-6." );
uiBlockEndAlign ( block );
}
else
{
// display preset values
- uiDefBut ( block, LABEL, 0, fluidsimViscosityPresetString[fss->viscosityMode], 90,yline,200,objHeight, NULL, 0.0, 0, 0, 0, "" );
+ uiDefBut ( block, LABEL, 0, fluidsimViscosityPresetString[fss->viscosityMode], 120,yline,180,objHeight, NULL, 0.0, 0, 0, 0, "" );
}
+
yline -= lineHeight;
- yline -= 1*separateHeight;
+ yline -= separateHeight;
- uiDefBut ( block, LABEL, 0, "Realworld-size:", 0,yline,150,objHeight, NULL, 0.0, 0, 0, 0, "" );
- uiDefButF ( block, NUM, B_DIFF, "", 150, yline,150,objHeight, &fss->realsize, 0.001, 10.0, 10, 0, "Size of the simulation domain in meters." );
+ uiDefBut ( block, LABEL, 0, "Realworld-size:", 0,yline,120,objHeight, NULL, 0.0, 0, 0, 0, "" );
+ uiDefButF ( block, NUM, B_DIFF, "", 120, yline,180,objHeight, &fss->realsize, 0.001, 10.0, 10, 0, "Size of the simulation domain in meters." );
yline -= lineHeight;
- yline -= 2*separateHeight;
+ yline -= separateHeight;
- uiDefBut ( block, LABEL, 0, "Gridlevels:", 0,yline,150,objHeight, NULL, 0.0, 0, 0, 0, "" );
- uiDefButI ( block, NUM, B_DIFF, "", 150, yline,150,objHeight, &fss->maxRefine, -1, 4, 10, 0, "Number of coarsened Grids to use (set to -1 for automatic selection)." );
+ uiDefBut ( block, LABEL, 0, "Gridlevels:", 0,yline,120,objHeight, NULL, 0.0, 0, 0, 0, "" );
+ uiDefButI ( block, NUM, B_DIFF, "", 120, yline,180,objHeight, &fss->maxRefine, -1, 4, 10, 0, "Number of coarsened Grids to use (set to -1 for automatic selection)." );
yline -= lineHeight;
+ yline -= separateHeight;
- uiDefBut ( block, LABEL, 0, "Compressibility:", 0,yline,150,objHeight, NULL, 0.0, 0, 0, 0, "" );
- uiDefButF ( block, NUM, B_DIFF, "", 150, yline,150,objHeight, &fss->gstar, 0.001, 0.10, 10,0, "Allowed compressibility due to gravitational force for standing fluid (directly affects simulation step size)." );
+ uiDefBut ( block, LABEL, 0, "Compressibility:", 0,yline,120,objHeight, NULL, 0.0, 0, 0, 0, "" );
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list