Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2009-07-02 23:41:31 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2009-07-02 23:41:31 +0400
commit093ff8202ced6391a2ef657abe42615672146954 (patch)
tree8b65da58becc4ac56bf81ae7d3adab7c86730d15 /source/blender/blenkernel/intern/fluidsim.c
parent5a0896e1a3c7f17abd37e3d818585fde8e80ff6d (diff)
2.5: Physics Buttons
All kinds of changes to get it ready for UI layouts. This means RNA and operators should be working correct, but most buttons are still not actually there yet. * Added near empty soft body, fluid, field and collision panels, tweaks to cloth panels. * Fluid bake works, but without escape or showing any progress. * Fluid/Softbody/Cloth/Collision can now be both added as modifiers or in the physics panels. * Missing: fields & soft body for particles. * Missing: proper updating softbodies, guess this code still needs updates after pointcache refactor?
Diffstat (limited to 'source/blender/blenkernel/intern/fluidsim.c')
-rw-r--r--source/blender/blenkernel/intern/fluidsim.c19
1 files changed, 18 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/fluidsim.c b/source/blender/blenkernel/intern/fluidsim.c
index 54008185f72..6eba64cf33d 100644
--- a/source/blender/blenkernel/intern/fluidsim.c
+++ b/source/blender/blenkernel/intern/fluidsim.c
@@ -34,7 +34,9 @@
#include "DNA_mesh_types.h"
#include "DNA_meshdata_types.h"
+#include "DNA_object_fluidsim.h"
#include "DNA_object_force.h" // for pointcache
+#include "DNA_object_types.h"
#include "DNA_particle_types.h"
#include "DNA_scene_types.h" // N_T
@@ -78,7 +80,7 @@ void fluidsim_init(FluidsimModifierData *fluidmd)
if(!fss)
return;
- fss->type = OB_FSBND_NOSLIP;
+ fss->type = OB_FLUIDSIM_ENABLE;
fss->show_advancedoptions = 0;
fss->resolutionxyz = 50;
@@ -657,5 +659,20 @@ void initElbeemMesh(struct Scene *scene, struct Object *ob,
dm->release(dm);
}
+void fluid_estimate_memory(Object *ob, FluidsimSettings *fss, char *value)
+{
+ Mesh *mesh;
+
+ value[0]= '\0';
+
+ if(ob->type == OB_MESH) {
+ /* use mesh bounding box and object scaling */
+ mesh= ob->data;
+
+ fluid_get_bb(mesh->mvert, mesh->totvert, ob->obmat, fss->bbStart, fss->bbSize);
+ elbeemEstimateMemreq(fss->resolutionxyz, fss->bbSize[0],fss->bbSize[1],fss->bbSize[2], fss->maxRefine, value);
+ }
+}
+
#endif // DISABLE_ELBEEM