[Bf-blender-cvs] [7451a52] soc-2013-paint: Disable stencil masking if there's no stencil image set.

Antony Riakiotakis noreply at git.blender.org
Thu May 8 21:04:31 CEST 2014


Commit: 7451a52f2838be7e316d1c2fb50f5ac884846822
Author: Antony Riakiotakis
Date:   Thu May 8 22:04:20 2014 +0300
https://developer.blender.org/rB7451a52f2838be7e316d1c2fb50f5ac884846822

Disable stencil masking if there's no stencil image set.

===================================================================

M	source/blender/editors/sculpt_paint/paint_image_proj.c

===================================================================

diff --git a/source/blender/editors/sculpt_paint/paint_image_proj.c b/source/blender/editors/sculpt_paint/paint_image_proj.c
index 341e2b5..7bf6cde 100644
--- a/source/blender/editors/sculpt_paint/paint_image_proj.c
+++ b/source/blender/editors/sculpt_paint/paint_image_proj.c
@@ -4441,8 +4441,9 @@ static void project_state_init(bContext *C, Object *ob, ProjPaintState *ps, int
 
 	ps->do_stencil_brush = ps->brush->imagepaint_tool == PAINT_TOOL_MASK;
 	/* deactivate stenciling for the stencil brush :) */
-	ps->do_layer_stencil = ((settings->imapaint.flag & IMAGEPAINT_PROJECT_LAYER_STENCIL) && !(ps->do_stencil_brush)) ? 1 : 0;
-	ps->do_layer_stencil_inv = (settings->imapaint.flag & IMAGEPAINT_PROJECT_LAYER_STENCIL_INV) ? 1 : 0;
+	ps->do_layer_stencil = ((settings->imapaint.flag & IMAGEPAINT_PROJECT_LAYER_STENCIL) &&
+							!(ps->do_stencil_brush) && ps->stencil_ima);
+	ps->do_layer_stencil_inv = (settings->imapaint.flag & IMAGEPAINT_PROJECT_LAYER_STENCIL_INV);
 
 
 #ifndef PROJ_DEBUG_NOSEAMBLEED




More information about the Bf-blender-cvs mailing list