[Bf-blender-cvs] [d645b1a78a7] master: Cleanup: some more G.main removal.

Bastien Montagne noreply at git.blender.org
Fri Jun 15 17:42:59 CEST 2018


Commit: d645b1a78a752950d061a4ccb125721acade5544
Author: Bastien Montagne
Date:   Fri Jun 15 17:42:17 2018 +0200
Branches: master
https://developer.blender.org/rBd645b1a78a752950d061a4ccb125721acade5544

Cleanup: some more G.main removal.

We are really starting to scratch the last bits here...

===================================================================

M	source/blender/blenlib/BLI_callbacks.h
M	source/blender/blenlib/intern/callbacks.c
M	source/blender/render/intern/source/pipeline.c

===================================================================

diff --git a/source/blender/blenlib/BLI_callbacks.h b/source/blender/blenlib/BLI_callbacks.h
index fdffbeb4c8d..6eb45107488 100644
--- a/source/blender/blenlib/BLI_callbacks.h
+++ b/source/blender/blenlib/BLI_callbacks.h
@@ -66,7 +66,7 @@ typedef struct bCallbackFuncStore {
 } bCallbackFuncStore;
 
 
-void BLI_callback_exec(struct Main *main, struct ID *self, eCbEvent evt);
+void BLI_callback_exec(struct Main *bmain, struct ID *self, eCbEvent evt);
 void BLI_callback_add(bCallbackFuncStore *funcstore, eCbEvent evt);
 
 void BLI_callback_global_init(void);
diff --git a/source/blender/blenlib/intern/callbacks.c b/source/blender/blenlib/intern/callbacks.c
index 191be49263c..766e3f38f00 100644
--- a/source/blender/blenlib/intern/callbacks.c
+++ b/source/blender/blenlib/intern/callbacks.c
@@ -32,13 +32,13 @@
 
 static ListBase callback_slots[BLI_CB_EVT_TOT] = {{NULL}};
 
-void BLI_callback_exec(struct Main *main, struct ID *self, eCbEvent evt)
+void BLI_callback_exec(struct Main *bmain, struct ID *self, eCbEvent evt)
 {
 	ListBase *lb = &callback_slots[evt];
 	bCallbackFuncStore *funcstore;
 
 	for (funcstore = lb->first; funcstore; funcstore = funcstore->next) {
-		funcstore->func(main, self, funcstore->arg);
+		funcstore->func(bmain, self, funcstore->arg);
 	}
 }
 
diff --git a/source/blender/render/intern/source/pipeline.c b/source/blender/render/intern/source/pipeline.c
index 96eda640ee3..ea47ac34f13 100644
--- a/source/blender/render/intern/source/pipeline.c
+++ b/source/blender/render/intern/source/pipeline.c
@@ -3577,7 +3577,7 @@ static int do_write_image_or_movie(Render *re, Main *bmain, Scene *scene, bMovie
 	/* Flush stdout to be sure python callbacks are printing stuff after blender. */
 	fflush(stdout);
 
-	BLI_callback_exec(G.main, NULL, BLI_CB_EVT_RENDER_STATS);
+	BLI_callback_exec(re->main, NULL, BLI_CB_EVT_RENDER_STATS);
 
 	BLI_timecode_string_from_time_simple(name, sizeof(name), re->i.lastframetime - render_time);
 	printf(" (Saving: %s)\n", name);



More information about the Bf-blender-cvs mailing list