0
$\begingroup$

Does anyone know how to change the script directory in the user preferences using Python from command line?

I believe it has something to do with bpy.types.UserPreferencesFilePaths, but I'm not sure how to use it.

Please help, thanks!

$\endgroup$
1

1 Answer 1

1
$\begingroup$
import bpy
from bpy import context
path = "/somepath"
context.user_preferences.filepaths.script_directory = path
$\endgroup$
1
  • $\begingroup$ thank you, that works for 2.77 and 2.78, have yet to try with 2.76, but my guess is it works for 2.76 as well $\endgroup$
    – Chunlin Hu
    Nov 1, 2016 at 8:46

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .