Revision: 15466 http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=15466 Author: genscher Date: 2008-07-07 11:23:12 +0200 (Mon, 07 Jul 2008)
Log Message: ----------- Another addition of time values, yet some things to follow Modified Paths: -------------- branches/fluidcontrol/intern/elbeem/extern/elbeem.h branches/fluidcontrol/intern/elbeem/intern/elbeem.cpp branches/fluidcontrol/intern/elbeem/intern/ntl_geometryobject.h branches/fluidcontrol/intern/elbeem/intern/solver_control.cpp branches/fluidcontrol/source/blender/makesdna/DNA_object_fluidsim.h branches/fluidcontrol/source/blender/src/buttons_object.c branches/fluidcontrol/source/blender/src/fluidsim.c Modified: branches/fluidcontrol/intern/elbeem/extern/elbeem.h =================================================================== --- branches/fluidcontrol/intern/elbeem/extern/elbeem.h 2008-07-07 06:13:58 UTC (rev 15465) +++ branches/fluidcontrol/intern/elbeem/extern/elbeem.h 2008-07-07 09:23:12 UTC (rev 15466) @@ -160,6 +160,9 @@ const char *name; /* fluid control settings */ + float cpsTimeStart; + float cpsTimeEnd; + // TODO dg: change to channels float attractforceStrength; float attractforceRadius; Modified: branches/fluidcontrol/intern/elbeem/intern/elbeem.cpp =================================================================== --- branches/fluidcontrol/intern/elbeem/intern/elbeem.cpp 2008-07-07 06:13:58 UTC (rev 15465) +++ branches/fluidcontrol/intern/elbeem/intern/elbeem.cpp 2008-07-07 09:23:12 UTC (rev 15466) @@ -161,6 +161,9 @@ mesh->name = "[unnamed]"; /* fluid control settings */ + mesh->cpsTimeStart = 0; + mesh->cpsTimeEnd = 0; + mesh->attractforceStrength = 0; mesh->attractforceRadius = 0; mesh->velocityforceStrength = 0; @@ -206,6 +209,8 @@ obj->setGeoImpactFactor(mesh->obstacleImpactFactor); /* fluid control features */ + obj->setCpsTimeStart(mesh->cpsTimeStart); + obj->setCpsTimeEnd(mesh->cpsTimeEnd); obj->setAttractForceStrength(mesh->attractforceStrength); obj->setAttractForceRadius(mesh->attractforceRadius); obj->setVelocityForceStrength(mesh->velocityforceStrength); Modified: branches/fluidcontrol/intern/elbeem/intern/ntl_geometryobject.h =================================================================== --- branches/fluidcontrol/intern/elbeem/intern/ntl_geometryobject.h 2008-07-07 06:13:58 UTC (rev 15465) +++ branches/fluidcontrol/intern/elbeem/intern/ntl_geometryobject.h 2008-07-07 09:23:12 UTC (rev 15466) @@ -102,6 +102,14 @@ /* fluid control features */ /****************************************/ /*! Set/get the particle control set attract force strength */ + inline float getCpsTimeStart() const { return mCpsTimeStart; } + inline void setCpsTimeStart(float set) { mCpsTimeStart=set; } + + /*! Set/get the particle control set attract force strength */ + inline float getCpsTimeEnd() const { return mCpsTimeEnd; } + inline void setCpsTimeEnd(float set) { mCpsTimeEnd=set; } + + /*! Set/get the particle control set attract force strength */ inline float getAttractForceStrength() const { return mAttractforceStrength; } inline void setAttractForceStrength(float set) { mAttractforceStrength=set; } @@ -225,6 +233,9 @@ AnimChannel<float> mcGeoActive; /* fluid control settings */ + float mCpsTimeStart; + float mCpsTimeEnd + ; // TODO dg: change to channels float mAttractforceStrength; float mAttractforceRadius; Modified: branches/fluidcontrol/intern/elbeem/intern/solver_control.cpp =================================================================== --- branches/fluidcontrol/intern/elbeem/intern/solver_control.cpp 2008-07-07 06:13:58 UTC (rev 15465) +++ branches/fluidcontrol/intern/elbeem/intern/solver_control.cpp 2008-07-07 09:23:12 UTC (rev 15466) @@ -239,6 +239,9 @@ cset->mcForceVel = AnimChannel<float>(obj->getVelocityForceStrength()); cset->mcRadiusVel = AnimChannel<float>(obj->getVelocityForceRadius()); + cset->mCparts->setCPSTimeStart(obj->getCpsTimeStart()); + cset->mCparts->setCPSTimeEnd(obj->getCpsTimeEnd()); + // this value can be left at 0.5: cset->mCparts->setCPSMvmWeightFac(0.5); Modified: branches/fluidcontrol/source/blender/makesdna/DNA_object_fluidsim.h =================================================================== --- branches/fluidcontrol/source/blender/makesdna/DNA_object_fluidsim.h 2008-07-07 06:13:58 UTC (rev 15465) +++ branches/fluidcontrol/source/blender/makesdna/DNA_object_fluidsim.h 2008-07-07 09:23:12 UTC (rev 15466) @@ -119,6 +119,9 @@ struct MVert *meshSurfNormals; /* Fluid control settings */ + float cpsTimeStart; + float cpsTimeEnd; + float attractforceStrength; float attractforceRadius; float velocityforceStrength; Modified: branches/fluidcontrol/source/blender/src/buttons_object.c =================================================================== --- branches/fluidcontrol/source/blender/src/buttons_object.c 2008-07-07 06:13:58 UTC (rev 15465) +++ branches/fluidcontrol/source/blender/src/buttons_object.c 2008-07-07 09:23:12 UTC (rev 15466) @@ -5216,19 +5216,18 @@ } 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, ""); } Modified: branches/fluidcontrol/source/blender/src/fluidsim.c =================================================================== --- branches/fluidcontrol/source/blender/src/fluidsim.c 2008-07-07 06:13:58 UTC (rev 15465) +++ branches/fluidcontrol/source/blender/src/fluidsim.c 2008-07-07 09:23:12 UTC (rev 15466) @@ -219,6 +219,8 @@ 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 @@ 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) { _______________________________________________ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org http://lists.blender.org/mailman/listinfo/bf-blender-cvs