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-08 13:16:37 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2018-06-08 13:17:22 +0300
commit7b6af843c2bdef9c9ab6d00100d93192a8e769c0 (patch)
tree1dae0407c639733739a2e281547f54d8e8a93614 /source/blender/editors/sculpt_paint/paint_image_proj.c
parent55606dbdbcd33fb8ba2ee41284fc1c5c35977815 (diff)
Cleanup: getting rid of G.main.
Sometimes one needs a *lot* of changes for a single G.main... :/
Diffstat (limited to 'source/blender/editors/sculpt_paint/paint_image_proj.c')
-rw-r--r--source/blender/editors/sculpt_paint/paint_image_proj.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_image_proj.c b/source/blender/editors/sculpt_paint/paint_image_proj.c
index 8e1d47db61a..96aa4b17788 100644
--- a/source/blender/editors/sculpt_paint/paint_image_proj.c
+++ b/source/blender/editors/sculpt_paint/paint_image_proj.c
@@ -5025,6 +5025,7 @@ void paint_proj_stroke(
/* clone gets special treatment here to avoid going through image initialization */
if (ps_handle->is_clone_cursor_pick) {
+ Main *bmain = CTX_data_main(C);
Scene *scene = ps_handle->scene;
View3D *v3d = CTX_wm_view3d(C);
ARegion *ar = CTX_wm_region(C);
@@ -5033,7 +5034,7 @@ void paint_proj_stroke(
view3d_operator_needs_opengl(C);
- if (!ED_view3d_autodist(scene, ar, v3d, mval_i, cursor, false, NULL))
+ if (!ED_view3d_autodist(bmain, scene, ar, v3d, mval_i, cursor, false, NULL))
return;
ED_region_tag_redraw(ar);
@@ -5445,6 +5446,7 @@ static int texture_paint_image_from_view_exec(bContext *C, wmOperator *op)
ImBuf *ibuf;
char filename[FILE_MAX];
+ Main *bmain = CTX_data_main(C);
Scene *scene = CTX_data_scene(C);
ToolSettings *settings = scene->toolsettings;
int w = settings->imapaint.screen_grab_size[0];
@@ -5460,7 +5462,7 @@ static int texture_paint_image_from_view_exec(bContext *C, wmOperator *op)
if (h > maxsize) h = maxsize;
ibuf = ED_view3d_draw_offscreen_imbuf(
- scene, CTX_wm_view3d(C), CTX_wm_region(C),
+ bmain, scene, CTX_wm_view3d(C), CTX_wm_region(C),
w, h, IB_rect, V3D_OFSDRAW_NONE, R_ALPHAPREMUL, 0, NULL,
NULL, NULL, err_out);
if (!ibuf) {