[Bf-blender-cvs] [ed0db62] master: Mask: always add a new spline when adding a new vert
Campbell Barton
noreply at git.blender.org
Wed Apr 27 06:08:23 CEST 2016
Commit: ed0db62a3dafc6040a998b605f0f48084f013994
Author: Campbell Barton
Date: Wed Apr 27 14:09:36 2016 +1000
Branches: master
https://developer.blender.org/rBed0db62a3dafc6040a998b605f0f48084f013994
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.
===================================================================
M source/blender/editors/mask/mask_add.c
===================================================================
diff --git a/source/blender/editors/mask/mask_add.c b/source/blender/editors/mask/mask_add.c
index 7138c3f..e3e8f35 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;
More information about the Bf-blender-cvs
mailing list