diff options
Diffstat (limited to 'source/blender/editors/sculpt_paint/paint_image.c')
-rw-r--r-- | source/blender/editors/sculpt_paint/paint_image.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_image.c b/source/blender/editors/sculpt_paint/paint_image.c index 04941e36455..f348273e745 100644 --- a/source/blender/editors/sculpt_paint/paint_image.c +++ b/source/blender/editors/sculpt_paint/paint_image.c @@ -391,11 +391,14 @@ void paint_brush_init_tex(Brush *brush) /* init mtex nodes */ if (brush) { MTex *mtex = &brush->mtex; - if (mtex->tex && mtex->tex->nodetree) - ntreeTexBeginExecTree(mtex->tex->nodetree); /* has internal flag to detect it only does it once */ + if (mtex->tex && mtex->tex->nodetree) { + /* has internal flag to detect it only does it once */ + ntreeTexBeginExecTree(mtex->tex->nodetree); + } mtex = &brush->mask_mtex; - if (mtex->tex && mtex->tex->nodetree) + if (mtex->tex && mtex->tex->nodetree) { ntreeTexBeginExecTree(mtex->tex->nodetree); + } } } @@ -1105,7 +1108,8 @@ static int texture_paint_toggle_exec(bContext *C, wmOperator *op) /* entering paint mode also sets image to editors */ if (imapaint->mode == IMAGEPAINT_MODE_MATERIAL) { - Material *ma = give_current_material(ob, ob->actcol); /* set the current material active paint slot on image editor */ + /* set the current material active paint slot on image editor */ + Material *ma = give_current_material(ob, ob->actcol); if (ma && ma->texpaintslot) ima = ma->texpaintslot[ma->paint_active_slot].ima; |