flamenco-env/setup/setup.py

21 lines
754 B
Python
Raw Normal View History

2024-08-29 17:39:20 -04:00
import bpy
## CONFIGURATION ##
render_api = 'OPTIX' # NONE, CUDA, OPTIX, HIP, ONEAPI
2024-08-31 11:29:22 -04:00
hostname = 'http://localhost:8080/'
2024-08-29 17:39:20 -04:00
2024-09-02 13:35:37 -04:00
# LEGACY - Flamenco addon install, intended for Blender 4.1 and older
# addon_path = '/home/user/git/flamenco-env/workspace/flamenco-addon.zip'
2024-09-02 13:35:37 -04:00
# bpy.ops.preferences.addon_install(overwrite=True, filepath=addon_path)
# bpy.ops.preferences.addon_enable(module="flamenco")
2024-09-02 13:35:37 -04:00
2024-08-29 17:39:20 -04:00
## SETUP PREFS ##
bpy.context.preferences.addons["cycles"].preferences.compute_device_type = render_api
bpy.context.preferences.addons["flamenco"].preferences.manager_urlz = hostname
bpy.context.preferences.filepaths.use_scripts_auto_execute = True # Enable for Rigify
2024-08-29 17:39:20 -04:00
bpy.ops.wm.save_userpref()
2024-08-31 11:06:27 -04:00
# Exit blender now that we're done
bpy.ops.wm.quit_blender()