diff options
author | Antony Riakiotakis <kalast@gmail.com> | 2013-12-10 00:36:33 +0400 |
---|---|---|
committer | Antony Riakiotakis <kalast@gmail.com> | 2013-12-10 00:40:02 +0400 |
commit | f0675b14d84392e65c9e746752defa707335626c (patch) | |
tree | 063c281b5b063d506d9a46bb1970e69f33975470 /source/blender/editors/sculpt_paint/paint_image.c | |
parent | ec30d711ccfc28be494580df38d4fce9c0a00875 (diff) |
Refactoring/cleanup, borrowed from soc-2013-paint branch.
* Move symmetry options to the paint struct (where all paint systems can
make use of it)
* Rename draw_pressure to stroke_active. This is what is really checked
on those occasions that this is used. Also move turning on/off of this
option to the stroke level and avoid doing it on every stroke system.
* Rename BRUSH_RESTORE_MESH to BRUSH_DRAG_DOT. In image painting this
won't restore any mesh, so better have a name that is directly linked to
what the flag actually does.
Diffstat (limited to 'source/blender/editors/sculpt_paint/paint_image.c')
-rw-r--r-- | source/blender/editors/sculpt_paint/paint_image.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_image.c b/source/blender/editors/sculpt_paint/paint_image.c index 6ffa54c5569..47ca3e5ce0c 100644 --- a/source/blender/editors/sculpt_paint/paint_image.c +++ b/source/blender/editors/sculpt_paint/paint_image.c @@ -511,7 +511,7 @@ static PaintOperation *texture_paint_init(bContext *C, wmOperator *op, float mou { UnifiedPaintSettings *ups = &settings->unified_paint_settings; - ups->draw_pressure = true; + ups->stroke_active = true; } return pop; @@ -595,7 +595,7 @@ static void paint_stroke_done(const bContext *C, struct PaintStroke *stroke) { UnifiedPaintSettings *ups = &scene->toolsettings->unified_paint_settings; - ups->draw_pressure = false; + ups->stroke_active = false; } } @@ -766,7 +766,7 @@ void brush_drawcursor_texpaint_uvsculpt(bContext *C, int x, int y, void *UNUSED( { UnifiedPaintSettings *ups = &scene->toolsettings->unified_paint_settings; /* hrmf, duplicate paint_draw_cursor logic here */ - if (ups->draw_pressure && BKE_brush_use_size_pressure(scene, brush)) { + if (ups->stroke_active && BKE_brush_use_size_pressure(scene, brush)) { /* inner at full alpha */ glutil_draw_lined_arc(0, (float)(M_PI * 2.0), size * ups->pressure_value, 40); /* outer at half alpha */ |