From 0a69e3b307f05aeab8bd84f69560b4118c9bfaf2 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 20 Nov 2017 02:28:07 +1100 Subject: Option not to select with un-hide D1518 from @mba105 w/ edits --- source/blender/editors/mask/mask_ops.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'source/blender/editors/mask') diff --git a/source/blender/editors/mask/mask_ops.c b/source/blender/editors/mask/mask_ops.c index 101ef70fb70..97d5ee1eff0 100644 --- a/source/blender/editors/mask/mask_ops.c +++ b/source/blender/editors/mask/mask_ops.c @@ -1937,16 +1937,17 @@ void MASK_OT_handle_type_set(wmOperatorType *ot) /* ********* clear/set restrict view *********/ -static int mask_hide_view_clear_exec(bContext *C, wmOperator *UNUSED(op)) +static int mask_hide_view_clear_exec(bContext *C, wmOperator *op) { Mask *mask = CTX_data_edit_mask(C); MaskLayer *masklay; bool changed = false; + const bool select = RNA_boolean_get(op->ptr, "select"); for (masklay = mask->masklayers.first; masklay; masklay = masklay->next) { if (masklay->restrictflag & OB_RESTRICT_VIEW) { - ED_mask_layer_select_set(masklay, true); + ED_mask_layer_select_set(masklay, select); masklay->restrictflag &= ~OB_RESTRICT_VIEW; changed = true; } @@ -1977,6 +1978,8 @@ void MASK_OT_hide_view_clear(wmOperatorType *ot) /* flags */ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; + + RNA_def_boolean(ot->srna, "select", true, "Select", ""); } static int mask_hide_view_set_exec(bContext *C, wmOperator *op) -- cgit v1.2.3