diff options
Diffstat (limited to 'source/blender/editors/sculpt_paint/paint_vertex.c')
-rw-r--r-- | source/blender/editors/sculpt_paint/paint_vertex.c | 37 |
1 files changed, 33 insertions, 4 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_vertex.c b/source/blender/editors/sculpt_paint/paint_vertex.c index 08c26aaa755..5b04bdb8ee7 100644 --- a/source/blender/editors/sculpt_paint/paint_vertex.c +++ b/source/blender/editors/sculpt_paint/paint_vertex.c @@ -2172,6 +2172,11 @@ static int wpaint_stroke_test_start(bContext *C, wmOperator *op, const float UNU if (me->editflag & ME_EDIT_MIRROR_X) { wpd->vgroup_mirror = wpaint_mirror_vgroup_ensure(ob, wpd->vgroup_active); } + + { + UnifiedPaintSettings *ups = &ts->unified_paint_settings; + ups->draw_pressure = true; + } return TRUE; } @@ -2414,6 +2419,11 @@ static void wpaint_stroke_update_step(bContext *C, struct PaintStroke *stroke, P swap_m4m4(vc->rv3d->persmat, mat); + { + UnifiedPaintSettings *ups = &ts->unified_paint_settings; + ups->pressure_value = pressure; + } + DAG_id_tag_update(ob->data, 0); ED_region_tag_redraw(vc->ar); } @@ -2454,7 +2464,12 @@ static void wpaint_stroke_done(const bContext *C, struct PaintStroke *stroke) } } } - + + { + UnifiedPaintSettings *ups = &ts->unified_paint_settings; + ups->draw_pressure = false; + } + DAG_id_tag_update(ob->data, 0); WM_event_add_notifier(C, NC_OBJECT | ND_DRAW, ob); @@ -2583,9 +2598,8 @@ static int set_vpaint(bContext *C, wmOperator *op) /* toggle */ BKE_paint_init(&vp->paint, PAINT_CURSOR_VERTEX_PAINT); } - if (me) - /* update modifier stack for mapping requirements */ - DAG_id_tag_update(&me->id, 0); + /* update modifier stack for mapping requirements */ + DAG_id_tag_update(&me->id, 0); WM_event_add_notifier(C, NC_SCENE | ND_MODE, scene); @@ -2735,6 +2749,11 @@ static int vpaint_stroke_test_start(bContext *C, struct wmOperator *op, const fl invert_m4_m4(imat, mat); copy_m3_m4(vpd->vpimat, imat); + { + UnifiedPaintSettings *ups = &ts->unified_paint_settings; + ups->draw_pressure = true; + } + return 1; } @@ -2889,6 +2908,11 @@ static void vpaint_stroke_update_step(bContext *C, struct PaintStroke *stroke, P do_shared_vertexcol(me, do_tessface); } + { + UnifiedPaintSettings *ups = &ts->unified_paint_settings; + ups->pressure_value = pressure; + } + ED_region_tag_redraw(vc->ar); if (vpd->use_fast_update == FALSE) { @@ -2920,6 +2944,11 @@ static void vpaint_stroke_done(const bContext *C, struct PaintStroke *stroke) BLI_memarena_free(vpd->polyfacemap_arena); } + { + UnifiedPaintSettings *ups = &ts->unified_paint_settings; + ups->draw_pressure = false; + } + WM_event_add_notifier(C, NC_OBJECT | ND_DRAW, ob); MEM_freeN(vpd); |