From 743a67c6cba6a85467542694c9c6f88b3bf29aa7 Mon Sep 17 00:00:00 2001 From: Antony Riakiotakis Date: Wed, 11 Feb 2015 15:09:11 +0100 Subject: [PATCH] Cavity option active even in fill brushes --- source/blender/editors/sculpt_paint/paint_image_proj.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/source/blender/editors/sculpt_paint/paint_image_proj.c b/source/blender/editors/sculpt_paint/paint_image_proj.c index 8e9661fb8ef..cce5c2cca58 100644 --- a/source/blender/editors/sculpt_paint/paint_image_proj.c +++ b/source/blender/editors/sculpt_paint/paint_image_proj.c @@ -4928,16 +4928,17 @@ static void project_state_init(bContext *C, Object *ob, ProjPaintState *ps, int ps->clone_ima = (!ps->do_material_slots) ? settings->imapaint.clone : NULL; + ps->do_mask_cavity = (settings->imapaint.paint.flags & PAINT_USE_CAVITY_MASK) ? true : false; + ps->cavity_curve = settings->imapaint.paint.cavity_curve; + /* setup projection painting data */ if (ps->tool != PAINT_TOOL_FILL) { ps->do_backfacecull = (settings->imapaint.flag & IMAGEPAINT_PROJECT_BACKFACE) ? false : true; ps->do_occlude = (settings->imapaint.flag & IMAGEPAINT_PROJECT_XRAY) ? false : true; ps->do_mask_normal = (settings->imapaint.flag & IMAGEPAINT_PROJECT_FLAT) ? false : true; - ps->do_mask_cavity = (settings->imapaint.paint.flags & PAINT_USE_CAVITY_MASK) ? true : false; - ps->cavity_curve = settings->imapaint.paint.cavity_curve; } else { - ps->do_backfacecull = ps->do_occlude = ps->do_mask_normal = ps->do_mask_cavity = 0; + ps->do_backfacecull = ps->do_occlude = ps->do_mask_normal = 0; } ps->do_new_shading_nodes = BKE_scene_use_new_shading_nodes(scene); /* only cache the value */