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>2013-04-16 19:02:41 +0400
committerAntony Riakiotakis <kalast@gmail.com>2013-04-16 19:02:41 +0400
commit53c9507c2878b38176c841c4a2172ea7f543aaba (patch)
tree72ed3397704e272a4a5cc9a60701e21347609b3d /source/blender/editors/sculpt_paint/paint_stroke.c
parentea0ad013d35984cba06cd8318fd42cc39c74c37f (diff)
Option to hide overlay during a stroke. To enable, press the brush icon
next to the overlay alpha.
Diffstat (limited to 'source/blender/editors/sculpt_paint/paint_stroke.c')
-rw-r--r--source/blender/editors/sculpt_paint/paint_stroke.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_stroke.c b/source/blender/editors/sculpt_paint/paint_stroke.c
index 359b98cec59..bbddd2e4a69 100644
--- a/source/blender/editors/sculpt_paint/paint_stroke.c
+++ b/source/blender/editors/sculpt_paint/paint_stroke.c
@@ -411,7 +411,7 @@ PaintStroke *paint_stroke_new(bContext *C,
{
PaintStroke *stroke = MEM_callocN(sizeof(PaintStroke), "PaintStroke");
- stroke->brush = BKE_paint_brush(BKE_paint_get_active_from_context(C));
+ Brush *br = stroke->brush = BKE_paint_brush(BKE_paint_get_active_from_context(C));
view3d_set_viewcontext(C, &stroke->vc);
if (stroke->vc.v3d)
view3d_get_transformation(stroke->vc.ar, stroke->vc.rv3d, stroke->vc.obact, &stroke->mats);
@@ -422,11 +422,15 @@ PaintStroke *paint_stroke_new(bContext *C,
stroke->done = done;
stroke->event_type = event_type; /* for modal, return event */
+ if (br->overlay_flags & BRUSH_OVERLAY_OVERRIDE_ON_STROKE)
+ BKE_paint_set_overlay_override(true);
+
return stroke;
}
void paint_stroke_data_free(struct wmOperator *op)
{
+ BKE_paint_set_overlay_override(false);
MEM_freeN(op->customdata);
op->customdata = NULL;
}