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:
Diffstat (limited to 'source/blender/editors/sculpt_paint')
-rw-r--r--source/blender/editors/sculpt_paint/paint_image.c3
-rw-r--r--source/blender/editors/sculpt_paint/paint_image_proj.c2
-rw-r--r--source/blender/editors/sculpt_paint/paint_vertex.c2
3 files changed, 3 insertions, 4 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_image.c b/source/blender/editors/sculpt_paint/paint_image.c
index fe16611a6eb..2c33c0dbcf6 100644
--- a/source/blender/editors/sculpt_paint/paint_image.c
+++ b/source/blender/editors/sculpt_paint/paint_image.c
@@ -349,8 +349,7 @@ typedef struct PaintOperation {
bool paint_use_opacity_masking(Brush *brush)
{
return ((brush->flag & BRUSH_AIRBRUSH) || (brush->flag & BRUSH_DRAG_DOT) ||
- (brush->flag & BRUSH_ANCHORED) || (brush->imagepaint_tool == PAINT_TOOL_SMEAR) ||
- (brush->imagepaint_tool == PAINT_TOOL_SOFTEN) ||
+ (brush->flag & BRUSH_ANCHORED) || (ELEM(brush->imagepaint_tool, PAINT_TOOL_SMEAR, PAINT_TOOL_SOFTEN)) ||
(brush->imagepaint_tool == PAINT_TOOL_FILL) ||
(brush->flag & BRUSH_USE_GRADIENT) ||
(brush->mtex.tex && !ELEM(brush->mtex.brush_map_mode,
diff --git a/source/blender/editors/sculpt_paint/paint_image_proj.c b/source/blender/editors/sculpt_paint/paint_image_proj.c
index 37af1fb6cda..8c16300a047 100644
--- a/source/blender/editors/sculpt_paint/paint_image_proj.c
+++ b/source/blender/editors/sculpt_paint/paint_image_proj.c
@@ -1789,7 +1789,7 @@ static float project_paint_uvpixel_mask(const ProjPaintState *ps,
static int project_paint_pixel_sizeof(const short tool)
{
- if ((tool == PAINT_TOOL_CLONE) || (tool == PAINT_TOOL_SMEAR)) {
+ if (ELEM(tool, PAINT_TOOL_CLONE, PAINT_TOOL_SMEAR)) {
return sizeof(ProjPixelClone);
}
return sizeof(ProjPixel);
diff --git a/source/blender/editors/sculpt_paint/paint_vertex.c b/source/blender/editors/sculpt_paint/paint_vertex.c
index e88af7caf42..9e9e0f441f7 100644
--- a/source/blender/editors/sculpt_paint/paint_vertex.c
+++ b/source/blender/editors/sculpt_paint/paint_vertex.c
@@ -964,7 +964,7 @@ static void do_weight_paint_vertex_multi(
if (me->editflag & ME_EDIT_VERTEX_GROUPS_X_SYMMETRY) {
index_mirr = mesh_get_x_mirror_vert(ob, NULL, index, topology);
- if (index_mirr != -1 && index_mirr != index) {
+ if (!ELEM(index_mirr, -1, index)) {
dv_mirr = &me->dvert[index_mirr];
}
else {