From ed0db62a3dafc6040a998b605f0f48084f013994 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 27 Apr 2016 14:09:36 +1000 Subject: Mask: always add a new spline when adding a new vert Previously, adding a new vertex with Ctrl-LMB would move an existing when there was an active spline but no active point. This function is used as a fallback, extending an existing active point is already handled. --- source/blender/editors/mask/mask_add.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) (limited to 'source/blender/editors/mask') diff --git a/source/blender/editors/mask/mask_add.c b/source/blender/editors/mask/mask_add.c index 7138c3f4a36..e3e8f35e7d8 100644 --- a/source/blender/editors/mask/mask_add.c +++ b/source/blender/editors/mask/mask_add.c @@ -521,26 +521,17 @@ static bool add_vertex_new(const bContext *C, Mask *mask, MaskLayer *masklay, co const float ctime = CFRA; MaskSpline *spline; - MaskSplinePoint *point; MaskSplinePoint *new_point = NULL, *ref_point = NULL; if (!masklay) { /* if there's no masklay currently operationg on, create new one */ masklay = BKE_mask_layer_new(mask, ""); mask->masklay_act = mask->masklay_tot - 1; - spline = NULL; - point = NULL; - } - else { - finSelectedSplinePoint(masklay, &spline, &point, true); } ED_mask_select_toggle_all(mask, SEL_DESELECT); - if (!spline) { - /* no selected splines in active masklay, create new spline */ - spline = BKE_mask_spline_add(masklay); - } + spline = BKE_mask_spline_add(masklay); masklay->act_spline = spline; new_point = spline->points; -- cgit v1.2.3