diff options
author | Campbell Barton <ideasman42@gmail.com> | 2015-01-23 19:10:23 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2015-01-24 09:09:24 +0300 |
commit | fcda27cdaedfcf79607b13dbf5c6fe670e95d2ac (patch) | |
tree | b2c1e96fd987bc0e8d7fb5d3c120cca2d1793717 /source/blender/editors/sculpt_paint | |
parent | ae213d740da1416df229e06616c883d979cfd640 (diff) |
Cleanup: style
Diffstat (limited to 'source/blender/editors/sculpt_paint')
-rw-r--r-- | source/blender/editors/sculpt_paint/paint_cursor.c | 16 | ||||
-rw-r--r-- | source/blender/editors/sculpt_paint/paint_image.c | 5 |
2 files changed, 9 insertions, 12 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_cursor.c b/source/blender/editors/sculpt_paint/paint_cursor.c index 430ea1cc11d..2d425b7e5a0 100644 --- a/source/blender/editors/sculpt_paint/paint_cursor.c +++ b/source/blender/editors/sculpt_paint/paint_cursor.c @@ -652,16 +652,12 @@ static void paint_draw_tex_overlay(UnifiedPaintSettings *ups, Brush *brush, } /* set quad color. Colored overlay does not get blending */ - if (col) - glColor4f(1.0, - 1.0, - 1.0, - overlay_alpha / 100.0f); - else - glColor4f(U.sculpt_paint_overlay_col[0], - U.sculpt_paint_overlay_col[1], - U.sculpt_paint_overlay_col[2], - overlay_alpha / 100.0f); + if (col) { + glColor4f(1.0, 1.0, 1.0, overlay_alpha / 100.0f); + } + else { + glColor4f(UNPACK3(U.sculpt_paint_overlay_col), overlay_alpha / 100.0f); + } /* draw textured quad */ glBegin(GL_QUADS); diff --git a/source/blender/editors/sculpt_paint/paint_image.c b/source/blender/editors/sculpt_paint/paint_image.c index d52b17372f7..df38117f376 100644 --- a/source/blender/editors/sculpt_paint/paint_image.c +++ b/source/blender/editors/sculpt_paint/paint_image.c @@ -158,9 +158,10 @@ static void undo_copy_tile(UndoImageTile *tile, ImBuf *tmpibuf, ImBuf *ibuf, Cop } } else { - if (mode == RESTORE_COPY) + if (mode == RESTORE_COPY) { IMB_rectcpy(tmpibuf, ibuf, 0, 0, tile->x * IMAPAINT_TILE_SIZE, - tile->y * IMAPAINT_TILE_SIZE, IMAPAINT_TILE_SIZE, IMAPAINT_TILE_SIZE); + tile->y * IMAPAINT_TILE_SIZE, IMAPAINT_TILE_SIZE, IMAPAINT_TILE_SIZE); + } /* swap to the tmpbuf for easy copying */ if (ibuf->rect_float) { SWAP(float *, tmpibuf->rect_float, tile->rect.fp); |