diff options
author | Campbell Barton <ideasman42@gmail.com> | 2016-04-27 07:09:36 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2016-04-27 07:11:07 +0300 |
commit | ed0db62a3dafc6040a998b605f0f48084f013994 (patch) | |
tree | 19ab13e98638f12c5a376157e8bc4965ce7e4c00 /source | |
parent | 32e20369a57580fad677a7dc38bf6806f9fd65d2 (diff) |
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.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/editors/mask/mask_add.c | 11 |
1 files changed, 1 insertions, 10 deletions
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; |