Hi,
Working from the application theme example in the blender documentation, I’m trying to set some variables for the preferences via scripting.
Most of it I got working just fine, but am a bit stumped with the new script folder code.
I have the following code that works:
import bpy
from bpy.app.handlers import persistent
@persistent
def load_handler_for_preferences(_):
print("Changing Preference Defaults!")
from bpy import context
prefs = context.preferences
# Change Interface View settings
prefs.use_preferences_save = False
# Change Data and Render File Paths
paths = prefs.filepaths
paths.temporary_directory = "S:\Temp"
paths.render_cache_directory = "S:\Cache"
# Preferences - Save&Load - Blend Files
paths.use_load_ui = False
# Change or Add Script Directory Paths
scripts = prefs.something?
scripts.script_directory_add = 'W:/scripts/B_4.00/scripts'
I’m not entire sure how to set the script path variable, and set a name and path for any script directories I want to set this way. I looked at the documentation for directories but the add/remove and naming is all very vague.
cheers for any tips!