diff options
author | Daniel Genrich <daniel.genrich@gmx.net> | 2008-07-08 21:38:33 +0400 |
---|---|---|
committer | Daniel Genrich <daniel.genrich@gmx.net> | 2008-07-08 21:38:33 +0400 |
commit | 3bab1eba3a6c1cbf590d57cd10040491116077fa (patch) | |
tree | 305fdc7ec7fa16a6e3b0097e8c84bb2a8b100c79 /source | |
parent | 01e9635ef14de49e34dd0889c51dcb06799fa061 (diff) |
Introduced quality to GUI, not yet tested (WIP commit)
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/makesdna/DNA_object_fluidsim.h | 1 | ||||
-rw-r--r-- | source/blender/src/buttons_object.c | 9 | ||||
-rw-r--r-- | source/blender/src/fluidsim.c | 4 |
3 files changed, 10 insertions, 4 deletions
diff --git a/source/blender/makesdna/DNA_object_fluidsim.h b/source/blender/makesdna/DNA_object_fluidsim.h index 0c0eff0620e..3426b1426a3 100644 --- a/source/blender/makesdna/DNA_object_fluidsim.h +++ b/source/blender/makesdna/DNA_object_fluidsim.h @@ -121,6 +121,7 @@ typedef struct FluidsimSettings { /* Fluid control settings */ float cpsTimeStart; float cpsTimeEnd; + float cpsQuality; float attractforceStrength; float attractforceRadius; diff --git a/source/blender/src/buttons_object.c b/source/blender/src/buttons_object.c index 3a0c9e8514d..6146fb045d4 100644 --- a/source/blender/src/buttons_object.c +++ b/source/blender/src/buttons_object.c @@ -5069,7 +5069,7 @@ static void object_panel_fluidsim(Object *ob) if(fss->typeFlags&OB_FSBND_PARTSLIP) { uiDefBut(block, LABEL, 0, "PartSlipValue:", 0,yline,200,objHeight, NULL, 0.0, 0, 0, 0, ""); - uiDefButF(block, NUM, B_DIFF, "", 200, yline,100,objHeight, &fss->partSlipValue, 0.0, 1.0, 10,0, "."); + uiDefButF(block, NUM, B_DIFF, "Amount of mixing between no- and free-slip, 0=stickier, 1=same as free slip.", 200, yline,100,objHeight, &fss->partSlipValue, 0.0, 1.0, 10,0, "."); yline -= lineHeight; } else { //uiDefBut(block, LABEL, 0, "-", 200,yline,100,objHeight, NULL, 0.0, 0, 0, 0, ""); @@ -5216,8 +5216,8 @@ static void object_panel_fluidsim(Object *ob) } else if(fss->type == OB_FLUIDSIM_CONTROL) { - uiDefButF(block, NUM, B_DIFF, "Time Sta:", 0, yline,150,20, &fss->cpsTimeStart, 0.0, 2.0, 10,0, "Specifies time when the control particles are activated."); - uiDefButF(block, NUM, B_DIFF, "Time End:", 150, yline,150,20, &fss->cpsTimeEnd, 0.0, 2.0, 10,0, "Specifies time when the control particles are deactivated."); + uiDefButF(block, NUM, B_DIFF, "Time Sta:", 0, yline,150,20, &fss->cpsTimeStart, 0.0, 100.0, 10,0, "Specifies time when the control particles are activated."); + uiDefButF(block, NUM, B_DIFF, "Time End:", 150, yline,150,20, &fss->cpsTimeEnd, 0.0, 100.0, 10,0, "Specifies time when the control particles are deactivated."); yline -= lineHeight; @@ -5230,6 +5230,9 @@ static void object_panel_fluidsim(Object *ob) yline -= lineHeight; uiDefButF(block, NUM, B_DIFF, "Strength:", 0, yline,150,20, &fss->velocityforceStrength, 0.0, 2.0, 10,0, ""); uiDefButF(block, NUM, B_DIFF, "Radius:", 150, yline,150,20, &fss->velocityforceRadius, 0.0, 2.0, 10,0, ""); + + yline -= lineHeight; + uiDefButF(block, NUM, B_DIFF, "Quality:", 0, yline,150,20, &fss->cpsQuality, 1.0, 100.0, 10,0, "Specifies the quality which is used for object sampling."); } else { yline -= lineHeight + 5; diff --git a/source/blender/src/fluidsim.c b/source/blender/src/fluidsim.c index 0d38e8b9601..4504ae89391 100644 --- a/source/blender/src/fluidsim.c +++ b/source/blender/src/fluidsim.c @@ -221,6 +221,7 @@ FluidsimSettings *fluidsimSettingsNew(struct Object *srcob) fss->velocityforceRadius = 0.75; fss->cpsTimeStart = fss->animStart; fss->cpsTimeEnd = fss->animEnd; + fss->cpsQuality = 10.0; // 1.0 / 10.0 => means 0.1 width return fss; } @@ -1073,6 +1074,7 @@ void fluidsimBake(struct Object *ob) fsmesh.cpsTimeStart = obit->fluidsimSettings->cpsTimeStart; fsmesh.cpsTimeEnd = obit->fluidsimSettings->cpsTimeEnd; + fsmesh.cpsQuality = obit->fluidsimSettings->cpsQuality; fsmesh.channelSizeAttractforceRadius = fsmesh.channelSizeVelocityforceStrength = @@ -1084,7 +1086,7 @@ void fluidsimBake(struct Object *ob) fsmesh.channelVelocityforceStrength = channelVelocityforceStrength[o]; fsmesh.channelVelocityforceRadius = channelVelocityforceRadius[o]; } - else*/ + else */ { // set channels to 0 fsmesh.channelAttractforceStrength = |