Himanshu-Jain
  • Joined on 2023-02-14
Himanshu-Jain closed issue blender/blender#104804 2023-02-16 10:22:11 +01:00
bpy.ops.wm.open_mainfile command overwrite the existing file without warning
Himanshu-Jain commented on issue blender/blender#104804 2023-02-16 10:22:10 +01:00
bpy.ops.wm.open_mainfile command overwrite the existing file without warning

So the final working solution should be,

bpy.ops.wm.open_mainfile('INVOKE_DEFAULT', filepath=r"file.blend", display_file_selector=False)

Thanks @iss & @lichtwerk

Himanshu-Jain commented on issue blender/blender#104804 2023-02-16 07:00:06 +01:00
bpy.ops.wm.open_mainfile command overwrite the existing file without warning

Yes 'INVOKE_DEFAULT' context shows a "save file" warning, but it also opens up "Blender file view" to open a file instead of opening a file mentioned in filepath argument.

Himanshu-Jain commented on issue blender/blender#104804 2023-02-16 05:34:00 +01:00
bpy.ops.wm.open_mainfile command overwrite the existing file without warning

Yes, it is working differently on Mac.

Blender - 3.2.2 Mac - M1 Pro

Himanshu-Jain opened issue blender/blender#104804 2023-02-16 05:02:03 +01:00
bpy.ops.wm.open_mainfile command overwrite the existing file without warning
Himanshu-Jain opened issue blender/blender#104735 2023-02-14 12:19:03 +01:00
bpy.ops.wm.open_mainfile command overwrite the existing file without warning