diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2018-06-11 16:40:37 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2018-06-11 16:40:37 +0300 |
commit | 78a8d3685bd3487eb0b5dd55793f94fe7235e377 (patch) | |
tree | 77f9ba0ddd9613eb7e9dbb8e0402f977548a281f /source/blender/editors/space_node/node_add.c | |
parent | b763c34e80d3b20f9a7f0a592e479e5fa7ab295f (diff) |
Cleanup: remove moar ugly G.main usages...
BKE_image was an ugly nest, could fix all but the ones from compositor,
so moved ugly G.main there, at least we know where the Evil is that way ;)
Diffstat (limited to 'source/blender/editors/space_node/node_add.c')
-rw-r--r-- | source/blender/editors/space_node/node_add.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/editors/space_node/node_add.c b/source/blender/editors/space_node/node_add.c index edd19617a0f..10dbda08280 100644 --- a/source/blender/editors/space_node/node_add.c +++ b/source/blender/editors/space_node/node_add.c @@ -304,6 +304,7 @@ void NODE_OT_add_reroute(wmOperatorType *ot) static int node_add_file_exec(bContext *C, wmOperator *op) { + Main *bmain = CTX_data_main(C); SpaceNode *snode = CTX_wm_space_node(C); bNode *node; Image *ima; @@ -353,7 +354,7 @@ static int node_add_file_exec(bContext *C, wmOperator *op) * to get proper image source. */ if (RNA_struct_property_is_set(op->ptr, "filepath")) { - BKE_image_signal(ima, NULL, IMA_SIGNAL_RELOAD); + BKE_image_signal(bmain, ima, NULL, IMA_SIGNAL_RELOAD); WM_event_add_notifier(C, NC_IMAGE | NA_EDITED, ima); } |