Skip to content

Instantly share code, notes, and snippets.

@SuddenDevelopment
Created February 8, 2024 15:09
Show Gist options
  • Save SuddenDevelopment/467a56fbb34eacc13058ee7293c4d406 to your computer and use it in GitHub Desktop.
Save SuddenDevelopment/467a56fbb34eacc13058ee7293c4d406 to your computer and use it in GitHub Desktop.
open a new instance of blender from python
import subprocess
import platform
# Path to the Blender executable
if platform.system() == "Windows":
blender_executable_path = "C:\\Program Files\\Blender Foundation\\Blender\\blender.exe"
elif platform.system() == "Linux":
blender_executable_path = "/usr/bin/blender"
else:
blender_executable_path = "/Applications/Blender.app/Contents/MacOS/Blender"
# Path to the .blend file you want to open
blend_file_path = "/Users/anthonyaragues/Documents/blender/ALLEY.blend"
# Open a new instance of Blender and open the .blend file
subprocess.Popen([blender_executable_path, blend_file_path])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment