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-25 13:32:48 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2018-06-25 13:32:48 +0300
commit8a7f317666caa41aad0428b5ed3f399cdfbbd816 (patch)
tree7e6ba6c6a1ab952cc175d4e08b39aebc2286cb4a /source/blender/editors/sculpt_paint/paint_image.c
parentf33cb522dd5793c685dcd681f7c7e13ff60f920a (diff)
Cleanup: Nuke most of G.main from GPU code.
Diffstat (limited to 'source/blender/editors/sculpt_paint/paint_image.c')
-rw-r--r--source/blender/editors/sculpt_paint/paint_image.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_image.c b/source/blender/editors/sculpt_paint/paint_image.c
index cee7801a9cb..2ada62b028b 100644
--- a/source/blender/editors/sculpt_paint/paint_image.c
+++ b/source/blender/editors/sculpt_paint/paint_image.c
@@ -1024,6 +1024,7 @@ static int texture_paint_toggle_poll(bContext *C)
static int texture_paint_toggle_exec(bContext *C, wmOperator *op)
{
+ Main *bmain = CTX_data_main(C);
Scene *scene = CTX_data_scene(C);
Object *ob = CTX_data_active_object(C);
const int mode_flag = OB_MODE_TEXTURE_PAINT;
@@ -1039,14 +1040,13 @@ static int texture_paint_toggle_exec(bContext *C, wmOperator *op)
ob->mode &= ~mode_flag;
if (U.glreslimit != 0)
- GPU_free_images();
- GPU_paint_set_mipmap(1);
+ GPU_free_images(bmain);
+ GPU_paint_set_mipmap(bmain, 1);
toggle_paint_cursor(C, 0);
}
else {
bScreen *sc;
- Main *bmain = CTX_data_main(C);
Image *ima = NULL;
ImagePaintSettings *imapaint = &scene->toolsettings->imapaint;
@@ -1089,8 +1089,8 @@ static int texture_paint_toggle_exec(bContext *C, wmOperator *op)
BKE_paint_init(bmain, scene, ePaintTextureProjective, PAINT_CURSOR_TEXTURE_PAINT);
if (U.glreslimit != 0)
- GPU_free_images();
- GPU_paint_set_mipmap(0);
+ GPU_free_images(bmain);
+ GPU_paint_set_mipmap(bmain, 0);
toggle_paint_cursor(C, 1);
}