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 05:43:10 +0300
committerCampbell Barton <ideasman42@gmail.com>2017-10-17 05:49:20 +0300
commit99520e3f92e14eb3b7fab3f7decd0914a3da1360 (patch)
tree79947d6dbf20e773b107359e9faddc5a17c0271b /source/blender/editors/sculpt_paint/paint_stroke.c
parent57ec19e0e5cbb96392eccf12d4ccc17c4cf9b65b (diff)
Cleanup: use 'e' prefix for enum typedefs
Convention was only followed loosely, apply to DNA where changes aren't likely to conflict. (Skipped ModifierType for eg).
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 bb2cd52a41e..2c8e88e3ccb 100644
--- a/source/blender/editors/sculpt_paint/paint_stroke.c
+++ b/source/blender/editors/sculpt_paint/paint_stroke.c
@@ -192,7 +192,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:
@@ -214,7 +214,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,
@@ -396,7 +396,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);
@@ -416,7 +416,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;
@@ -491,7 +491,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)) {
@@ -757,7 +757,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);
}
@@ -772,7 +772,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;
@@ -798,7 +798,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)))
@@ -817,14 +817,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;
@@ -1086,7 +1086,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;