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:
authorCampbell Barton <ideasman42@gmail.com>2017-10-17 06:06:49 +0300
committerCampbell Barton <ideasman42@gmail.com>2017-10-17 06:06:49 +0300
commit0ffa64a45f7d961cb079a56629bcff105c81eb56 (patch)
tree238bdd23687e6b54c1f75a35e5497837e8662bea /source/blender/editors/sculpt_paint/paint_stroke.c
parentdd91d7d09d9994bc20bdbfb501d5101044ac99c8 (diff)
parent99520e3f92e14eb3b7fab3f7decd0914a3da1360 (diff)
Merge branch 'master' into blender2.8
Diffstat (limited to 'source/blender/editors/sculpt_paint/paint_stroke.c')
-rw-r--r--source/blender/editors/sculpt_paint/paint_stroke.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_stroke.c b/source/blender/editors/sculpt_paint/paint_stroke.c
index d92afd414f8..dacaea6a96e 100644
--- a/source/blender/editors/sculpt_paint/paint_stroke.c
+++ b/source/blender/editors/sculpt_paint/paint_stroke.c
@@ -201,7 +201,7 @@ static void paint_draw_line_cursor(bContext *C, int x, int y, void *customdata)
glDisable(GL_LINE_SMOOTH);
}
-static bool paint_tool_require_location(Brush *brush, PaintMode mode)
+static bool paint_tool_require_location(Brush *brush, ePaintMode mode)
{
switch (mode) {
case ePaintSculpt:
@@ -223,7 +223,7 @@ static bool paint_tool_require_location(Brush *brush, PaintMode mode)
/* Initialize the stroke cache variants from operator properties */
static bool paint_brush_update(bContext *C,
Brush *brush,
- PaintMode mode,
+ ePaintMode mode,
struct PaintStroke *stroke,
const float mouse_init[2],
float mouse[2], float pressure,
@@ -405,7 +405,7 @@ static bool paint_brush_update(bContext *C,
return location_success;
}
-static bool paint_stroke_use_jitter(PaintMode mode, Brush *brush, bool invert)
+static bool paint_stroke_use_jitter(ePaintMode mode, Brush *brush, bool invert)
{
bool use_jitter = (brush->flag & BRUSH_ABSOLUTE_JITTER) ?
(brush->jitter_absolute != 0) : (brush->jitter != 0);
@@ -425,7 +425,7 @@ static void paint_brush_stroke_add_step(bContext *C, wmOperator *op, const float
{
Scene *scene = CTX_data_scene(C);
Paint *paint = BKE_paint_get_active_from_context(C);
- PaintMode mode = BKE_paintmode_get_active_from_context(C);
+ ePaintMode mode = BKE_paintmode_get_active_from_context(C);
Brush *brush = BKE_paint_brush(paint);
PaintStroke *stroke = op->customdata;
UnifiedPaintSettings *ups = stroke->ups;
@@ -500,7 +500,7 @@ static void paint_brush_stroke_add_step(bContext *C, wmOperator *op, const float
/* Returns zero if no sculpt changes should be made, non-zero otherwise */
static bool paint_smooth_stroke(
- PaintStroke *stroke, const PaintSample *sample, PaintMode mode,
+ PaintStroke *stroke, const PaintSample *sample, ePaintMode mode,
float r_mouse[2], float *r_pressure)
{
if (paint_supports_smooth_stroke(stroke->brush, mode)) {
@@ -766,7 +766,7 @@ static void stroke_done(struct bContext *C, struct wmOperator *op)
}
/* Returns zero if the stroke dots should not be spaced, non-zero otherwise */
-bool paint_space_stroke_enabled(Brush *br, PaintMode mode)
+bool paint_space_stroke_enabled(Brush *br, ePaintMode mode)
{
return (br->flag & BRUSH_SPACE) && paint_supports_dynamic_size(br, mode);
}
@@ -781,7 +781,7 @@ static bool sculpt_is_grab_tool(Brush *br)
}
/* return true if the brush size can change during paint (normally used for pressure) */
-bool paint_supports_dynamic_size(Brush *br, PaintMode mode)
+bool paint_supports_dynamic_size(Brush *br, ePaintMode mode)
{
if (br->flag & BRUSH_ANCHORED)
return false;
@@ -807,7 +807,7 @@ bool paint_supports_dynamic_size(Brush *br, PaintMode mode)
return true;
}
-bool paint_supports_smooth_stroke(Brush *br, PaintMode mode)
+bool paint_supports_smooth_stroke(Brush *br, ePaintMode mode)
{
if (!(br->flag & BRUSH_SMOOTH_STROKE) ||
(br->flag & (BRUSH_ANCHORED | BRUSH_DRAG_DOT | BRUSH_LINE)))
@@ -826,14 +826,14 @@ bool paint_supports_smooth_stroke(Brush *br, PaintMode mode)
return true;
}
-bool paint_supports_texture(PaintMode mode)
+bool paint_supports_texture(ePaintMode mode)
{
/* omit: PAINT_WEIGHT, PAINT_SCULPT_UV, PAINT_INVALID */
return ELEM(mode, ePaintSculpt, ePaintVertex, ePaintTextureProjective, ePaintTexture2D);
}
/* return true if the brush size can change during paint (normally used for pressure) */
-bool paint_supports_dynamic_tex_coords(Brush *br, PaintMode mode)
+bool paint_supports_dynamic_tex_coords(Brush *br, ePaintMode mode)
{
if (br->flag & BRUSH_ANCHORED)
return false;
@@ -1095,7 +1095,7 @@ static void paint_stroke_line_constrain(PaintStroke *stroke, float mouse[2])
int paint_stroke_modal(bContext *C, wmOperator *op, const wmEvent *event)
{
Paint *p = BKE_paint_get_active_from_context(C);
- PaintMode mode = BKE_paintmode_get_active_from_context(C);
+ ePaintMode mode = BKE_paintmode_get_active_from_context(C);
PaintStroke *stroke = op->customdata;
Brush *br = stroke->brush;
PaintSample sample_average;