diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2014-04-04 15:23:45 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2014-04-04 15:23:45 +0400 |
commit | 41e2dc7746c7a9c1a84e9d46ea9941d05353b925 (patch) | |
tree | af4f7a10422e4a6b2d1910fe63c120dbfdd735e4 /source | |
parent | 1aa753ce8847c0f3bbee4e1de44b2fe75586c135 (diff) |
Fix for mask slide operators didn't work with LMB selection
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/editors/mask/mask_ops.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/source/blender/editors/mask/mask_ops.c b/source/blender/editors/mask/mask_ops.c index 089b015cbe6..03e87e348ea 100644 --- a/source/blender/editors/mask/mask_ops.c +++ b/source/blender/editors/mask/mask_ops.c @@ -463,6 +463,7 @@ enum { typedef struct SlidePointData { /* Generic fields. */ + short event_invoke_type; int action; Mask *mask; MaskLayer *masklay; @@ -610,7 +611,7 @@ static void *slide_point_customdata(bContext *C, wmOperator *op, const wmEvent * select_sliding_point(mask, masklay, spline, point, which_handle); customdata = MEM_callocN(sizeof(SlidePointData), "mask slide point data"); - + customdata->event_invoke_type = event->type; customdata->mask = mask; customdata->masklay = masklay; customdata->spline = spline; @@ -942,7 +943,8 @@ static int slide_point_modal(bContext *C, wmOperator *op, const wmEvent *event) } case LEFTMOUSE: - if (event->val == KM_RELEASE) { + case RIGHTMOUSE: + if (event->type == data->event_invoke_type && event->val == KM_RELEASE) { Scene *scene = CTX_data_scene(C); /* dont key sliding feather uw's */ @@ -1010,6 +1012,8 @@ void MASK_OT_slide_point(wmOperatorType *ot) /******************** slide spline curvature *********************/ typedef struct SlideSplineCurvatureData { + short event_invoke_type; + Mask *mask; MaskLayer *mask_layer; MaskSpline *spline; @@ -1085,6 +1089,7 @@ static SlideSplineCurvatureData *slide_spline_curvature_customdata( } slide_data = MEM_callocN(sizeof(SlideSplineCurvatureData), "slide curvature slide"); + slide_data->event_invoke_type = event->type; slide_data->mask = mask; slide_data->mask_layer = mask_layer; slide_data->spline = spline; @@ -1341,7 +1346,8 @@ static int slide_spline_curvature_modal(bContext *C, wmOperator *op, const wmEve } case LEFTMOUSE: - if (event->val == KM_RELEASE) { + case RIGHTMOUSE: + if (event->type == slide_data->event_invoke_type && event->val == KM_RELEASE) { /* dont key sliding feather uw's */ if (IS_AUTOKEY_ON(scene)) { ED_mask_layer_shape_auto_key(slide_data->mask_layer, CFRA); |