diff options
Diffstat (limited to 'source/blender/editors/sculpt_paint/paint_stroke.c')
-rw-r--r-- | source/blender/editors/sculpt_paint/paint_stroke.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_stroke.c b/source/blender/editors/sculpt_paint/paint_stroke.c index 58c3446673c..7ddf5dff000 100644 --- a/source/blender/editors/sculpt_paint/paint_stroke.c +++ b/source/blender/editors/sculpt_paint/paint_stroke.c @@ -916,6 +916,19 @@ int paint_stroke_exec(bContext *C, wmOperator *op) return OPERATOR_FINISHED; } +int paint_stroke_cancel(bContext *C, wmOperator *op) +{ + PaintStroke *stroke = op->customdata; + + if(stroke->done) + stroke->done(C, stroke); + + MEM_freeN(stroke); + op->customdata = NULL; + + return OPERATOR_CANCELLED; +} + ViewContext *paint_stroke_view_context(PaintStroke *stroke) { return &stroke->vc; |