diff options
author | Campbell Barton <ideasman42@gmail.com> | 2021-02-16 08:26:05 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2021-02-16 08:28:48 +0300 |
commit | 63fb53ad95dc21cc6f8647e4a157ddefa938e28f (patch) | |
tree | ed9d8bc32b3f3894356a68b5045d6cfde87a7ee3 | |
parent | 7bb5e4a3c192a0c09d2877eed7808b215fff5abb (diff) |
Docs: add a docstring for UserDef.pythondir
-rw-r--r-- | source/blender/makesdna/DNA_userdef_types.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/source/blender/makesdna/DNA_userdef_types.h b/source/blender/makesdna/DNA_userdef_types.h index e6e2b6553c0..d304641e112 100644 --- a/source/blender/makesdna/DNA_userdef_types.h +++ b/source/blender/makesdna/DNA_userdef_types.h @@ -673,6 +673,21 @@ typedef struct UserDef { /** 768 = FILE_MAXDIR. */ char render_cachedir[768]; char textudir[768]; + /** + * Optional user location for scripts. + * + * This supports the same layout as Blender's scripts directory `release/scripts`. + * + * \note Unlike most paths, changing this is not fully supported at run-time, + * requiring a restart to properly take effect. Supporting this would cause complications as + * the script path can contain `startup`, `addons` & `modules` etc. properly unwinding the + * Python environment to the state it _would_ have been in gets complicated. + * + * Although this is partially supported as the `sys.path` is refreshed when loading preferences. + * This is done to support #PREFERENCES_OT_copy_prev which is available to the user when they + * launch with a new version of Blender. In this case setting the script path on top of + * factory settings will work without problems. + */ char pythondir[768]; char sounddir[768]; char i18ndir[768]; |