diff options
Diffstat (limited to 'source/blender/editors/sculpt_paint/paint_stroke.c')
-rw-r--r-- | source/blender/editors/sculpt_paint/paint_stroke.c | 29 |
1 files changed, 19 insertions, 10 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_stroke.c b/source/blender/editors/sculpt_paint/paint_stroke.c index 98e068ac8d4..03067d1bdd4 100644 --- a/source/blender/editors/sculpt_paint/paint_stroke.c +++ b/source/blender/editors/sculpt_paint/paint_stroke.c @@ -317,8 +317,7 @@ static int paint_smooth_stroke(PaintStroke *stroke, float output[2], output[0] = sample->mouse[0]; output[1] = sample->mouse[1]; - if (paint_supports_smooth_stroke(stroke->brush, mode)) - { + if (paint_supports_smooth_stroke(stroke->brush, mode)) { float u = stroke->brush->smooth_stroke_factor, v = 1.0f - u; float dx = stroke->last_mouse_position[0] - sample->mouse[0]; float dy = stroke->last_mouse_position[1] - sample->mouse[1]; @@ -463,11 +462,17 @@ bool paint_supports_dynamic_size(Brush *br, PaintMode mode) switch (mode) { case PAINT_SCULPT: - if (ELEM4(br->sculpt_tool, SCULPT_TOOL_GRAB, SCULPT_TOOL_THUMB, SCULPT_TOOL_ROTATE, SCULPT_TOOL_SNAKE_HOOK)) - return false; + if (ELEM4(br->sculpt_tool, + SCULPT_TOOL_GRAB, + SCULPT_TOOL_THUMB, + SCULPT_TOOL_ROTATE, + SCULPT_TOOL_SNAKE_HOOK)) + { + return false; + } default: ; - } + } return true; } @@ -476,19 +481,23 @@ bool paint_supports_smooth_stroke(Brush *br, PaintMode mode) if(!(br->flag & BRUSH_SMOOTH_STROKE) || (br->flag & BRUSH_ANCHORED) || (br->flag & BRUSH_RESTORE_MESH)) + { return false; + } switch (mode) { case PAINT_SCULPT: if (ELEM4(br->sculpt_tool, - SCULPT_TOOL_GRAB, - SCULPT_TOOL_THUMB, - SCULPT_TOOL_ROTATE, - SCULPT_TOOL_SNAKE_HOOK)) + SCULPT_TOOL_GRAB, + SCULPT_TOOL_THUMB, + SCULPT_TOOL_ROTATE, + SCULPT_TOOL_SNAKE_HOOK)) + { return false; + } default: ; - } + } return true; } |