Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Montagne <montagne29@wanadoo.fr>2018-06-11 13:14:18 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2018-06-11 13:15:14 +0300
commitd0956e9cb3077971a9ae6c1ba9560604d5ad1ef7 (patch)
tree0dea964abf85748db7ab15a2feee1a41bf6ec52c /source/blender/blenkernel/BKE_global.h
parent8055ed2741d1da48f2bf84c75ccb37b54cef1ab8 (diff)
Cleanup: Moar G.main removal of Hell.
This commit actually adds some G.main... but at much, much higher level than the ones it removes, so should still be better ;)
Diffstat (limited to 'source/blender/blenkernel/BKE_global.h')
-rw-r--r--source/blender/blenkernel/BKE_global.h7
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