[Bf-blender-cvs] [63fb53ad95d] master: Docs: add a docstring for UserDef.pythondir
Campbell Barton
noreply at git.blender.org
Tue Feb 16 06:29:07 CET 2021
Commit: 63fb53ad95dc21cc6f8647e4a157ddefa938e28f
Author: Campbell Barton
Date: Tue Feb 16 16:26:05 2021 +1100
Branches: master
https://developer.blender.org/rB63fb53ad95dc21cc6f8647e4a157ddefa938e28f
Docs: add a docstring for UserDef.pythondir
===================================================================
M source/blender/makesdna/DNA_userdef_types.h
===================================================================
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];
More information about the Bf-blender-cvs
mailing list