Skip to content

Instantly share code, notes, and snippets.

@torrinworx
torrinworx / blender-script.py
Created December 31, 2022 00:20 — forked from ali1234/blender-script.py
A Python script which runs itself inside Blender upon being run from the command line. Passes through command line arguments.
#!/usr/bin/env python3
import sys
try:
import bpy
except ImportError:
print('Running myself inside Blender')
import subprocess
exit(subprocess.call(['blender', '--background', '--python', __file__, '--'] + sys.argv))