I have had a look at Baking smoke on a headless machine, however, I cannot figure out my way from there to bake dynamic paint on a headless machine. This is what I have come up with by now:
import bpy
for scene in bpy.data.scenes:
for object in scene.objects:
for modifier in object.modifiers:
if modifier.type == 'DYNAMIC_PAINT':
override = {'scene': scene, 'object': object}
bpy.ops.dpaint.bake(override)
break
However, I get:
PyContext 'window' not found
PyContext 'window' not found
PyContext 'window' not found
Error: Bake failed: invalid canvas
Error: Bake failed: invalid canvas
Traceback (most recent call last):
File "/home/horazont/baker.py", line 8, in <module>
bpy.ops.dpaint.bake(override)
File "/usr/share/blender/2.69/scripts/modules/bpy/ops.py", line 186, in __call__
ret = op_call(self.idname_py(), C_dict, kw, C_exec, C_undo)
RuntimeError: Error: Bake failed: invalid canvas
Blender quit
Which parameters do I have to pass to the operator?