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/curve/editcurve.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'source/blender/editors/curve/editcurve.c') diff --git a/source/blender/editors/curve/editcurve.c b/source/blender/editors/curve/editcurve.c index 4916c206a85..fc363475608 100644 --- a/source/blender/editors/curve/editcurve.c +++ b/source/blender/editors/curve/editcurve.c @@ -2926,7 +2926,7 @@ void CURVE_OT_hide(wmOperatorType *ot) /********************** reveal operator *********************/ -static int reveal_exec(bContext *C, wmOperator *UNUSED(op)) +static int reveal_exec(bContext *C, wmOperator *op) { Object *obedit = CTX_data_edit_object(C); ListBase *editnurb = object_editcurve_get(obedit); @@ -2934,6 +2934,7 @@ static int reveal_exec(bContext *C, wmOperator *UNUSED(op)) BPoint *bp; BezTriple *bezt; int a; + const bool select = RNA_boolean_get(op->ptr, "select"); for (nu = editnurb->first; nu; nu = nu->next) { nu->hide = 0; @@ -2942,7 +2943,7 @@ static int reveal_exec(bContext *C, wmOperator *UNUSED(op)) a = nu->pntsu; while (a--) { if (bezt->hide) { - select_beztriple(bezt, SELECT, SELECT, HIDDEN); + select_beztriple(bezt, select, SELECT, HIDDEN); bezt->hide = 0; } bezt++; @@ -2953,7 +2954,7 @@ static int reveal_exec(bContext *C, wmOperator *UNUSED(op)) a = nu->pntsu * nu->pntsv; while (a--) { if (bp->hide) { - select_bpoint(bp, SELECT, SELECT, HIDDEN); + select_bpoint(bp, select, SELECT, HIDDEN); bp->hide = 0; } bp++; @@ -2972,7 +2973,7 @@ void CURVE_OT_reveal(wmOperatorType *ot) /* identifiers */ ot->name = "Reveal Hidden"; ot->idname = "CURVE_OT_reveal"; - ot->description = "Show again hidden control points"; + ot->description = "Reveal hidden control points"; /* api callbacks */ ot->exec = reveal_exec; @@ -2980,6 +2981,8 @@ void CURVE_OT_reveal(wmOperatorType *ot) /* flags */ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; + + RNA_def_boolean(ot->srna, "select", true, "Select", ""); } /********************** subdivide operator *********************/ -- cgit v1.2.3