I am trying to create an automatic build system for Blender 2.73 that reads XML files with many paths, opens the files one by one, and then displays them.
I use the following code 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)
source
share