I am trying to create an operator that restarts Blender. This script has worked for me in the past:
import bpy
import subprocess
blender_exe = bpy.app.binary_path
subprocess.Popen([blender_exe, "-con", "--python-expr", "import bpy; bpy.ops.wm.recover_last_session()"])
bpy.ops.wm.quit_blender()
I'm now using Blender 3.5 on Windows 11 Pro Version 22H2. Blender quits, but never reopens. If I just run the subprocess
, it will open the last session. Blender or Windows is quitting both sessions. Is there a way to only quit the old session?
Thank you!