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 45a0a765ce1..db816cb9e14 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; @@ -221,6 +221,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 |