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/interface/interface_eyedropper_color.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/interface/interface_eyedropper_color.c')
-rw-r--r-- | source/blender/editors/interface/interface_eyedropper_color.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/editors/interface/interface_eyedropper_color.c b/source/blender/editors/interface/interface_eyedropper_color.c index 052da74623f..7ba4b15a88f 100644 --- a/source/blender/editors/interface/interface_eyedropper_color.c +++ b/source/blender/editors/interface/interface_eyedropper_color.c @@ -38,6 +38,7 @@ #include "BLI_math_vector.h" #include "BKE_context.h" +#include "BKE_main.h" #include "BKE_screen.h" #include "RNA_access.h" @@ -131,6 +132,7 @@ static void eyedropper_exit(bContext *C, wmOperator *op) void eyedropper_color_sample_fl(bContext *C, int mx, int my, float r_col[3]) { /* we could use some clever */ + Main *bmain = CTX_data_main(C); wmWindow *win = CTX_wm_window(C); ScrArea *sa = BKE_screen_find_area_xy(win->screen, SPACE_TYPE_ANY, mx, my); const char *display_device = CTX_data_scene(C)->display_settings.display_device; @@ -156,7 +158,7 @@ void eyedropper_color_sample_fl(bContext *C, int mx, int my, float r_col[3]) int mval[2] = {mx - ar->winrct.xmin, my - ar->winrct.ymin}; - if (ED_space_node_color_sample(snode, ar, mval, r_col)) { + if (ED_space_node_color_sample(bmain, snode, ar, mval, r_col)) { return; } } |