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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.