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:
authorCampbell Barton <ideasman42@gmail.com>2012-01-17 22:01:16 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-01-17 22:01:16 +0400
commit2019f636b059fde75f459e646c8b0253a5c8189d (patch)
tree1c097f5a4b03f2fd8e1d379f3ec1beb3b91c88e9 /source/blender/editors
parent391a214303ed7d7307b8c26496d00607a1b34814 (diff)
misc small changes and bmesh support for testing script
Diffstat (limited to 'source/blender/editors')
-rw-r--r--source/blender/editors/sculpt_paint/paint_image.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_image.c b/source/blender/editors/sculpt_paint/paint_image.c
index fea827ed00b..a5b79d0c974 100644
--- a/source/blender/editors/sculpt_paint/paint_image.c
+++ b/source/blender/editors/sculpt_paint/paint_image.c
@@ -4650,7 +4650,8 @@ static int uv_sculpt_brush_poll(bContext *C)
int ret;
Object *obedit = CTX_data_edit_object(C);
SpaceImage *sima= CTX_wm_space_image(C);
- ToolSettings *toolsettings = CTX_data_scene(C)->toolsettings;
+ Scene *scene = CTX_data_scene(C);
+ ToolSettings *toolsettings = scene->toolsettings;
if(!uv_sculpt_brush(C) || !obedit || obedit->type != OB_MESH)
return 0;
@@ -5162,7 +5163,7 @@ static void brush_drawcursor(bContext *C, int x, int y, void *UNUSED(customdata)
float pixel_size;
float alpha= 0.5f;
- ts = CTX_data_scene(C)->toolsettings;
+ ts = scene->toolsettings;
if(use_zoom && !ts->use_uv_sculpt){
pixel_size = MAX2(size * zoomx, size * zoomy);
@@ -5202,14 +5203,16 @@ static void brush_drawcursor(bContext *C, int x, int y, void *UNUSED(customdata)
static void toggle_paint_cursor(bContext *C, int enable)
{
- ToolSettings *settings= CTX_data_scene(C)->toolsettings;
+ wmWindowManager *wm= CTX_wm_manager(C);
+ Scene *scene = CTX_data_scene(C);
+ ToolSettings *settings= scene->toolsettings;
if(settings->imapaint.paintcursor && !enable) {
- WM_paint_cursor_end(CTX_wm_manager(C), settings->imapaint.paintcursor);
+ WM_paint_cursor_end(wm, settings->imapaint.paintcursor);
settings->imapaint.paintcursor = NULL;
}
else if(enable)
- settings->imapaint.paintcursor= WM_paint_cursor_activate(CTX_wm_manager(C), image_paint_poll, brush_drawcursor, NULL);
+ settings->imapaint.paintcursor= WM_paint_cursor_activate(wm, image_paint_poll, brush_drawcursor, NULL);
}
/* enable the paint cursor if it isn't already.