assets/pipeline/batch.py

17 lines
359 B
Python
Raw Normal View History

2024-04-15 13:23:17 -04:00
import bpy
from bpy.app.handlers import persistent
import shutil
blender_bin = shutil.which("blender")
if blender_bin:
print("Found:", blender_bin)
bpy.app.binary_path = blender_bin
else:
print("Unable to find blender!")
@persistent
def load_handler(dummy):
print("Load Handler", bpy.data.filepath)
bpy.app.handlers.load_post(load_handler)