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:
authorAntony Riakiotakis <kalast@gmail.com>2014-03-10 20:42:35 +0400
committerAntony Riakiotakis <kalast@gmail.com>2014-03-10 20:42:35 +0400
commit2de9da6ee9a8813704ad402c7bc4ba77b35a9267 (patch)
tree051358f2c6af5e4f2c984849080aef4f2e2bafd8
parent658f37acd7968d12fc8cac8a8154e680dd57d74f (diff)
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.
-rw-r--r--source/blender/blenkernel/intern/paint.c2
-rw-r--r--source/blender/blenkernel/intern/scene.c2
-rw-r--r--source/blender/editors/sculpt_paint/paint_vertex.c1
-rw-r--r--source/blender/editors/sculpt_paint/sculpt.c1
-rw-r--r--source/blender/editors/sculpt_paint/sculpt_uv.c2
5 files changed, 6 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/paint.c b/source/blender/blenkernel/intern/paint.c
index 5a38445ee02..4d84dd5fbb1 100644
--- a/source/blender/blenkernel/intern/paint.c
+++ b/source/blender/blenkernel/intern/paint.c
@@ -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)
diff --git a/source/blender/blenkernel/intern/scene.c b/source/blender/blenkernel/intern/scene.c
index da2eda0fbee..bc83adb31d3 100644
--- a/source/blender/blenkernel/intern/scene.c
+++ b/source/blender/blenkernel/intern/scene.c
@@ -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;
diff --git a/source/blender/editors/sculpt_paint/paint_vertex.c b/source/blender/editors/sculpt_paint/paint_vertex.c
index 55296aeda18..12eb1524515 100644
--- a/source/blender/editors/sculpt_paint/paint_vertex.c
+++ b/source/blender/editors/sculpt_paint/paint_vertex.c
@@ -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;
}
diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c
index c4c800434ad..eac18533e85 100644
--- a/source/blender/editors/sculpt_paint/sculpt.c
+++ b/source/blender/editors/sculpt_paint/sculpt.c
@@ -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;
diff --git a/source/blender/editors/sculpt_paint/sculpt_uv.c b/source/blender/editors/sculpt_paint/sculpt_uv.c
index 4dc2c87ca0a..da2b62bce8b 100644
--- a/source/blender/editors/sculpt_paint/sculpt_uv.c
+++ b/source/blender/editors/sculpt_paint/sculpt_uv.c
@@ -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);