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:
Diffstat (limited to 'source/blender/editors/sculpt_paint/paint_stroke.c')
-rw-r--r--source/blender/editors/sculpt_paint/paint_stroke.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_stroke.c b/source/blender/editors/sculpt_paint/paint_stroke.c
index e7b62505417..7ddf5dff000 100644
--- a/source/blender/editors/sculpt_paint/paint_stroke.c
+++ b/source/blender/editors/sculpt_paint/paint_stroke.c
@@ -333,7 +333,7 @@ static int project_brush_radius(RegionView3D* rv3d, float radius, float location
{
float view[3], nonortho[3], ortho[3], offset[3], p1[2], p2[2];
- viewvector(rv3d, location, view);
+ ED_view3d_global_to_vector(rv3d, location, view);
// create a vector that is not orthogonal to view
@@ -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;