diff options
Diffstat (limited to 'source/blender/blenkernel/BKE_global.h')
-rw-r--r-- | source/blender/blenkernel/BKE_global.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/source/blender/blenkernel/BKE_global.h b/source/blender/blenkernel/BKE_global.h index e184fd3796b..c5ad91c81fd 100644 --- a/source/blender/blenkernel/BKE_global.h +++ b/source/blender/blenkernel/BKE_global.h @@ -54,7 +54,7 @@ typedef struct Global { /* strings: lastsaved */ char ima[1024], lib[1024]; /* 1024 = FILE_MAX */ - /* when set: G.main->name contains valid relative base path */ + /* when set: G_MAIN->name contains valid relative base path */ bool relbase_valid; bool file_loaded; bool save_over; @@ -210,6 +210,11 @@ enum { /* Memory is allocated where? blender.c */ extern Global G; +/** + * Stupid macro to hide the few *valid* usages of G.main (from startup/exit code e.g.), helps with cleanup task. + */ +#define G_MAIN (G).main + #ifdef __cplusplus } #endif |