Created
February 8, 2024 15:09
-
-
Save SuddenDevelopment/467a56fbb34eacc13058ee7293c4d406 to your computer and use it in GitHub Desktop.
open a new instance of blender from python
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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