I'm trying to make an automated build system for Blender 2.73 which reads XML files with lots of paths, opens the files one by another and then renders them.
I'm using the following code in order to open:
bpy.ops.wm.open_mainfile("file_path")
My problem is that I get the following error:
Traceback (most recent call last):
File "<blender_console>", line 1, in <module>
File "<BLENDER_PATH>/scripts/modules/bpy/ops.py", line 186, in __call__
ret = op_call(self.idname_py(), C_dict, kw, C_exec, C_undo)
TypeError: Calling operator "bpy.ops.wm.open_mainfile" error, expected a string enum in ('INVOKE_DEFAULT', 'INVOKE_REGION_WIN', 'INVOKE_REGION_CHANNELS', 'INVOKE_REGION_PREVIEW', 'INVOKE_AREA', 'INVOKE_SCREEN', 'EXEC_DEFAULT', 'EXEC_REGION_WIN', 'EXEC_REGION_CHANNELS', 'EXEC_REGION_PREVIE)