diff options
author | Daniel Genrich <daniel.genrich@gmx.net> | 2008-07-07 13:23:12 +0400 |
---|---|---|
committer | Daniel Genrich <daniel.genrich@gmx.net> | 2008-07-07 13:23:12 +0400 |
commit | d3745d70a507bef4dfeadec2d8bd8947e5f3d6c4 (patch) | |
tree | 208e9936ea9f17551e2c0aa5861a81bdcd2651bd /source | |
parent | 7bbf88d602368733e66cf00b4f70947ef83b3b64 (diff) |
Another addition of time values, yet some things to follow
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/makesdna/DNA_object_fluidsim.h | 3 | ||||
-rw-r--r-- | source/blender/src/buttons_object.c | 9 | ||||
-rw-r--r-- | source/blender/src/fluidsim.c | 9 |
3 files changed, 14 insertions, 7 deletions
diff --git a/source/blender/makesdna/DNA_object_fluidsim.h b/source/blender/makesdna/DNA_object_fluidsim.h index 51592d76ec4..0c0eff0620e 100644 --- a/source/blender/makesdna/DNA_object_fluidsim.h +++ b/source/blender/makesdna/DNA_object_fluidsim.h @@ -119,6 +119,9 @@ typedef struct FluidsimSettings { struct MVert *meshSurfNormals; /* Fluid control settings */ + float cpsTimeStart; + float cpsTimeEnd; + float attractforceStrength; float attractforceRadius; float velocityforceStrength; diff --git a/source/blender/src/buttons_object.c b/source/blender/src/buttons_object.c index 9967e69fe27..3a0c9e8514d 100644 --- a/source/blender/src/buttons_object.c +++ b/source/blender/src/buttons_object.c @@ -5216,19 +5216,18 @@ static void object_panel_fluidsim(Object *ob) } else if(fss->type == OB_FLUIDSIM_CONTROL) { - uiDefBut(block, LABEL, 0, "Attraction force:", 0,yline,300,20, NULL, 0.0, 0, 0, 0, ""); + 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."); yline -= lineHeight; + uiDefBut(block, LABEL, 0, "Attraction force:", 0,yline,300,20, NULL, 0.0, 0, 0, 0, ""); + yline -= lineHeight; uiDefButF(block, NUM, B_DIFF, "Strength:", 0, yline,150,20, &fss->attractforceStrength, 0.0, 2.0, 10,0, ""); uiDefButF(block, NUM, B_DIFF, "Radius:", 150, yline,150,20, &fss->attractforceRadius, 0.0, 2.0, 10,0, ""); - yline -= lineHeight; - uiDefBut(block, LABEL, 0, "Velocity force:", 0,yline,300,20, NULL, 0.0, 0, 0, 0, ""); - 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, ""); } diff --git a/source/blender/src/fluidsim.c b/source/blender/src/fluidsim.c index 768acc18819..7298c767e45 100644 --- a/source/blender/src/fluidsim.c +++ b/source/blender/src/fluidsim.c @@ -219,6 +219,8 @@ FluidsimSettings *fluidsimSettingsNew(struct Object *srcob) fss->attractforceRadius = 0.75; fss->velocityforceStrength = 0.2; fss->velocityforceRadius = 0.75; + fss->cpsTimeStart = fss->animStart; + fss->cpsTimeEnd = fss->animEnd; return fss; } @@ -1026,17 +1028,20 @@ void fluidsimBake(struct Object *ob) fsmesh.obstaclePartslip = obit->fluidsimSettings->partSlipValue; fsmesh.volumeInitType = obit->fluidsimSettings->volumeInitType; fsmesh.obstacleImpactFactor = obit->fluidsimSettings->surfaceSmoothing; // misused value - + /* if(fsmesh.type == OB_FLUIDSIM_CONTROL) { // control fluids will get exported as whole deform = 1; + fsmesh.cpsTimeStart = obit->fluidsimSettings->cpsTimeStart; + fsmesh.cpsTimeEnd = obit->fluidsimSettings->cpsTimeEnd; + fsmesh.attractforceStrength = obit->fluidsimSettings->attractforceStrength; fsmesh.attractforceRadius = obit->fluidsimSettings->attractforceRadius; fsmesh.velocityforceStrength = obit->fluidsimSettings->velocityforceStrength; fsmesh.velocityforceRadius = obit->fluidsimSettings->velocityforceRadius; - } + }*/ // animated meshes if(deform) { |