Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2017-11-19 18:28:07 +0300
committerCampbell Barton <ideasman42@gmail.com>2017-11-19 18:28:07 +0300
commit0a69e3b307f05aeab8bd84f69560b4118c9bfaf2 (patch)
tree2dfeaae34f13c78bfd1594a78637ce31a95aba33 /source/blender/editors/object/object_edit.c
parent92ea28101725631f8ebe6c6cfd37007175f1af03 (diff)
Option not to select with un-hide
D1518 from @mba105 w/ edits
Diffstat (limited to 'source/blender/editors/object/object_edit.c')
-rw-r--r--source/blender/editors/object/object_edit.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/source/blender/editors/object/object_edit.c b/source/blender/editors/object/object_edit.c
index 4e949c82a9f..d7c7976c344 100644
--- a/source/blender/editors/object/object_edit.c
+++ b/source/blender/editors/object/object_edit.c
@@ -133,7 +133,7 @@ Object *ED_object_active_context(bContext *C)
/* ********* clear/set restrict view *********/
-static int object_hide_view_clear_exec(bContext *C, wmOperator *UNUSED(op))
+static int object_hide_view_clear_exec(bContext *C, wmOperator *op)
{
Main *bmain = CTX_data_main(C);
ScrArea *sa = CTX_wm_area(C);
@@ -141,12 +141,13 @@ static int object_hide_view_clear_exec(bContext *C, wmOperator *UNUSED(op))
Scene *scene = CTX_data_scene(C);
Base *base;
bool changed = false;
+ const bool select = RNA_boolean_get(op->ptr, "select");
/* XXX need a context loop to handle such cases */
for (base = FIRSTBASE; base; base = base->next) {
if ((base->lay & v3d->lay) && base->object->restrictflag & OB_RESTRICT_VIEW) {
if (!(base->object->restrictflag & OB_RESTRICT_SELECT)) {
- base->flag |= SELECT;
+ SET_FLAG_FROM_TEST(base->flag, select, SELECT);
}
base->object->flag = base->flag;
base->object->restrictflag &= ~OB_RESTRICT_VIEW;
@@ -176,6 +177,8 @@ void OBJECT_OT_hide_view_clear(wmOperatorType *ot)
/* flags */
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
+
+ RNA_def_boolean(ot->srna, "select", true, "Select", "");
}
static int object_hide_view_set_exec(bContext *C, wmOperator *op)