Solved - Can I bake a fluid sim to mesh(es)

Hi guys,
I‘m trying to bake the mesh of a fluid simulation that is 70 frames long to one single mesh for each frame. Why? Because I want to :wink: Just kidding. I want to see the fluid animation but make something new with the finally generated mesh.
I know I can do the following: Object -> Convert To -> Mesh with ‚Keep Original‘.
But I don‘t want to do this for 70 (or more) frames.
Is there an easier method that I didn‘t discover yet?
Or is there a python script which does that for me?
Exporting it as Alembic or FBX doesn‘t work because it‘s exporting the animation not the meshes for each frame. At least I didn‘t find a button that allows it do export in this way.
Can anyone help me please.
Thanks a lot.

By the way… Can this be done in the #FlipFluids Addon?

Hi BlenderPete,

you could use the obj exporter and check “Animation”, this writes out a single obj per frame.

Or you could use python (you have to select the object you want to convert first):

import bpy
orig = bpy.context.active_object.name

for f in range (1,71):
    bpy.context.scene.frame_set(f)
    bpy.ops.object.convert(target='MESH', keep_original=True)
    bpy.ops.object.select_all(action='DESELECT')
    bpy.data.objects[orig].select_set(True)
    bpy.context.view_layer.objects.active = bpy.data.objects[orig]
1 Like

Thank you very much @georg_kv. Especially for python code :slight_smile: