# How to run a script when when baking is finished?

I need sort of an alarm script that will play a loud sound when baking has finished. How can I get such a script to run when baking is complete?

• Here is a script that play or shutdown your computer at the end of a render. I think it's a good start May 19 '14 at 11:08
• blendernation.com/2014/05/11/… ... sorry I forgot to put the link :S May 19 '14 at 13:49

## 1 Answer

Blender currently supports only callbacks for these events:

• frame_change_pre, frame_change_post
• render_pre, render_post
• render_stats
• load_pre, load_post
• save_pre, save_post

The simplest thing you could do is invoke the appropriate bake operator by a script (the python call is displayed when the mouse pointer is over the back button).

Create a python script e.g.:

bpy.ops.fluid.bake()


and add the code to play a sound from How to play a sound after script finishes?