Docs: reference G & U from Global & UserDef doc-strings

Include some context for how these structs are used as it's not so
clear where values are set/initialized.
This commit is contained in:
Campbell Barton 2024-03-08 13:26:07 +11:00
parent 8dd049d569
commit 20b5908af8
2 changed files with 13 additions and 0 deletions

View File

@ -16,6 +16,13 @@
struct Main;
/**
* Global data, typically accessed from #G.
* See: #BKE_blender_globals_init & #BKE_blender_globals_clear.
*
* \note This is run-time only but some global data is written
* to #FileGlobal which is used to initialize members of #Global.
*/
struct Global {
/**

View File

@ -740,6 +740,12 @@ typedef struct bUserScriptDirectory {
char dir_path[768]; /* FILE_MAXDIR */
} bUserScriptDirectory;
/**
* Main user preferences data, typically accessed from #U.
* See: #BKE_blendfile_userdef_from_defaults & #BKE_blendfile_userdef_read.
*
* \note This is either loaded from the file #BLENDER_USERPREF_FILE or from memory, see #U_default.
*/
typedef struct UserDef {
DNA_DEFINE_CXX_METHODS(UserDef)