[Bf-blender-cvs] [f06a1b7] master: Maksing: fix issue when it's not possible to drag right handle of aligned handles

Sergey Sharybin noreply at git.blender.org
Mon Mar 31 11:00:53 CEST 2014


Commit: f06a1b77e291c595f3928d952cc9f18c04df3ae2
Author: Sergey Sharybin
Date:   Mon Mar 31 14:46:30 2014 +0600
https://developer.blender.org/rBf06a1b77e291c595f3928d952cc9f18c04df3ae2

Maksing: fix issue when it's not possible to drag right handle of aligned handles

===================================================================

M	source/blender/editors/mask/mask_ops.c

===================================================================

diff --git a/source/blender/editors/mask/mask_ops.c b/source/blender/editors/mask/mask_ops.c
index e8cd97d..d170d00 100644
--- a/source/blender/editors/mask/mask_ops.c
+++ b/source/blender/editors/mask/mask_ops.c
@@ -503,10 +503,27 @@ static bool slide_point_check_initial_feather(MaskSpline *spline)
 }
 
 static void select_sliding_point(Mask *mask, MaskLayer *mask_layer, MaskSpline *spline,
-                                 MaskSplinePoint *point)
+                                 MaskSplinePoint *point, eMaskWhichHandle which_handle)
 {
 	ED_mask_select_toggle_all(mask, SEL_DESELECT);
-	BKE_mask_point_select_set(point, TRUE);
+
+	switch (which_handle) {
+		case MASK_WHICH_HANDLE_NONE:
+			BKE_mask_point_select_set(point, TRUE);
+			break;
+		case MASK_WHICH_HANDLE_LEFT:
+			point->bezt.f1 |= SELECT;
+			break;
+		case MASK_WHICH_HANDLE_RIGHT:
+			point->bezt.f3 |= SELECT;
+			break;
+		case MASK_WHICH_HANDLE_STICK:
+			point->bezt.f1 |= SELECT;
+			point->bezt.f3 |= SELECT;
+			break;
+		default:
+			BLI_assert(!"Unexpected situation in select_sliding_point()");
+	}
 
 	mask_layer->act_spline = spline;
 	mask_layer->act_point = point;
@@ -581,7 +598,7 @@ static void *slide_point_customdata(bContext *C, wmOperator *op, const wmEvent *
 	}
 
 	if (action != SLIDE_ACTION_NONE) {
-		select_sliding_point(mask, masklay, spline, point);
+		select_sliding_point(mask, masklay, spline, point, which_handle);
 
 		customdata = MEM_callocN(sizeof(SlidePointData), "mask slide point data");




More information about the Bf-blender-cvs mailing list