diff options
author | Campbell Barton <ideasman42@gmail.com> | 2017-11-19 18:28:07 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2017-11-19 18:28:07 +0300 |
commit | 0a69e3b307f05aeab8bd84f69560b4118c9bfaf2 (patch) | |
tree | 2dfeaae34f13c78bfd1594a78637ce31a95aba33 /source/blender/editors/physics | |
parent | 92ea28101725631f8ebe6c6cfd37007175f1af03 (diff) |
Option not to select with un-hide
D1518 from @mba105 w/ edits
Diffstat (limited to 'source/blender/editors/physics')
-rw-r--r-- | source/blender/editors/physics/particle_edit.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/source/blender/editors/physics/particle_edit.c b/source/blender/editors/physics/particle_edit.c index 199d5e0fbfa..da66ec44235 100644 --- a/source/blender/editors/physics/particle_edit.c +++ b/source/blender/editors/physics/particle_edit.c @@ -1950,11 +1950,12 @@ void PARTICLE_OT_hide(wmOperatorType *ot) /*************************** reveal operator **************************/ -static int reveal_exec(bContext *C, wmOperator *UNUSED(op)) +static int reveal_exec(bContext *C, wmOperator *op) { Object *ob= CTX_data_active_object(C); Scene *scene= CTX_data_scene(C); - PTCacheEdit *edit= PE_get_current(scene, ob); + PTCacheEdit *edit = PE_get_current(scene, ob); + const bool select = RNA_boolean_get(op->ptr, "select"); POINT_P; KEY_K; LOOP_POINTS { @@ -1962,8 +1963,9 @@ static int reveal_exec(bContext *C, wmOperator *UNUSED(op)) point->flag &= ~PEP_HIDE; point->flag |= PEP_EDIT_RECALC; - LOOP_KEYS - key->flag |= PEK_SELECT; + LOOP_KEYS { + SET_FLAG_FROM_TEST(key->flag, select, PEK_SELECT); + } } } @@ -1986,6 +1988,9 @@ void PARTICLE_OT_reveal(wmOperatorType *ot) /* flags */ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + + /* props */ + RNA_def_boolean(ot->srna, "select", true, "Select", ""); } /************************ select less operator ************************/ |