Fix T39034 brush always shown even after deactivating the show cursor

option after reentering a paint mode.

Solution by Bastien with modifications, thanks!
Show Brush flag need not be reenabled always, but make sure it is at
least enabled once on paint initialization.
This commit is contained in:
Antonis Ryakiotakis 2014-03-10 18:42:35 +02:00
parent 658f37acd7
commit 2de9da6ee9
Notes: blender-bot 2023-02-14 11:02:43 +01:00
Referenced by issue #39034, sculpt mode show brush.
5 changed files with 6 additions and 2 deletions

View File

@ -308,8 +308,6 @@ void BKE_paint_init(Paint *p, const char col[3])
memcpy(p->paint_cursor_col, col, 3);
p->paint_cursor_col[3] = 128;
p->flags |= PAINT_SHOW_BRUSH;
}
void BKE_paint_free(Paint *paint)

View File

@ -542,6 +542,8 @@ Scene *BKE_scene_add(Main *bmain, const char *name)
sce->toolsettings->proportional_size = 1.0f;
sce->toolsettings->imapaint.paint.flags |= PAINT_SHOW_BRUSH;
sce->physics_settings.gravity[0] = 0.0f;
sce->physics_settings.gravity[1] = 0.0f;
sce->physics_settings.gravity[2] = -9.81f;

View File

@ -189,6 +189,7 @@ static VPaint *new_vpaint(int wpaint)
VPaint *vp = MEM_callocN(sizeof(VPaint), "VPaint");
vp->flag = (wpaint) ? 0 : VP_SPRAY;
vp->paint.flags |= PAINT_SHOW_BRUSH;
return vp;
}

View File

@ -5140,6 +5140,7 @@ static int sculpt_mode_toggle_exec(bContext *C, wmOperator *op)
/* Turn on X plane mirror symmetry by default */
ts->sculpt->paint.symmetry_flags |= PAINT_SYMM_X;
ts->sculpt->paint.flags |= PAINT_SHOW_BRUSH;
/* Make sure at least dyntopo subdivision is enabled */
ts->sculpt->flags |= SCULPT_DYNTOPO_SUBDIVIDE;

View File

@ -194,6 +194,8 @@ void ED_space_image_uv_sculpt_update(wmWindowManager *wm, ToolSettings *settings
settings->uv_sculpt_tool = UV_SCULPT_TOOL_GRAB;
settings->uv_sculpt_settings = UV_SCULPT_LOCK_BORDERS | UV_SCULPT_ALL_ISLANDS;
settings->uv_relax_method = UV_SCULPT_TOOL_RELAX_LAPLACIAN;
/* Uv sculpting does not include explicit brush view control yet, always enable */
settings->uvsculpt->paint.flags |= PAINT_SHOW_BRUSH;
}
BKE_paint_init(&settings->uvsculpt->paint, PAINT_CURSOR_SCULPT);