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:
Diffstat (limited to 'source/blender/editors/space_view3d/view3d_select.c')
-rw-r--r--source/blender/editors/space_view3d/view3d_select.c26
1 files changed, 17 insertions, 9 deletions
diff --git a/source/blender/editors/space_view3d/view3d_select.c b/source/blender/editors/space_view3d/view3d_select.c
index ecf43c734e2..e3f97dd1c63 100644
--- a/source/blender/editors/space_view3d/view3d_select.c
+++ b/source/blender/editors/space_view3d/view3d_select.c
@@ -1589,9 +1589,12 @@ void VIEW3D_OT_select_menu(wmOperatorType *ot)
RNA_def_property_flag(prop, PROP_HIDDEN | PROP_ENUM_NO_TRANSLATE);
ot->prop = prop;
- RNA_def_boolean(ot->srna, "extend", 0, "Extend", "");
- RNA_def_boolean(ot->srna, "deselect", 0, "Deselect", "");
- RNA_def_boolean(ot->srna, "toggle", 0, "Toggle", "");
+ prop = RNA_def_boolean(ot->srna, "extend", 0, "Extend", "");
+ RNA_def_property_flag(prop, PROP_SKIP_SAVE);
+ prop = RNA_def_boolean(ot->srna, "deselect", 0, "Deselect", "");
+ RNA_def_property_flag(prop, PROP_SKIP_SAVE);
+ prop = RNA_def_boolean(ot->srna, "toggle", 0, "Toggle", "");
+ RNA_def_property_flag(prop, PROP_SKIP_SAVE);
}
static Base *object_mouse_select_menu(bContext *C,
@@ -1764,9 +1767,12 @@ void VIEW3D_OT_bone_select_menu(wmOperatorType *ot)
RNA_def_property_flag(prop, PROP_HIDDEN | PROP_ENUM_NO_TRANSLATE);
ot->prop = prop;
- RNA_def_boolean(ot->srna, "extend", 0, "Extend", "");
- RNA_def_boolean(ot->srna, "deselect", 0, "Deselect", "");
- RNA_def_boolean(ot->srna, "toggle", 0, "Toggle", "");
+ prop = RNA_def_boolean(ot->srna, "extend", 0, "Extend", "");
+ RNA_def_property_flag(prop, PROP_SKIP_SAVE);
+ prop = RNA_def_boolean(ot->srna, "deselect", 0, "Deselect", "");
+ RNA_def_property_flag(prop, PROP_SKIP_SAVE);
+ prop = RNA_def_boolean(ot->srna, "toggle", 0, "Toggle", "");
+ RNA_def_property_flag(prop, PROP_SKIP_SAVE);
}
static bool bone_mouse_select_menu(bContext *C,
const uint *buffer,
@@ -2150,7 +2156,7 @@ static Base *mouse_select_eval_buffer(ViewContext *vc,
for (a = 0; a < hits; a++) {
if (has_bones) {
/* skip non-bone objects */
- if ((buffer[4 * a + 3] & 0xFFFF0000)) {
+ if (buffer[4 * a + 3] & 0xFFFF0000) {
if (base->object->runtime.select_id == (buffer[(4 * a) + 3] & 0xFFFF)) {
basact = base;
}
@@ -2515,6 +2521,7 @@ static bool ed_object_select_pick(bContext *C,
}
/* also prevent making it active on mouse selection */
else if (BASE_SELECTABLE(v3d, basact)) {
+ const bool use_activate_selected_base = (oldbasact != basact) && (is_obedit == false);
if (extend) {
ED_object_base_select(basact, BA_SELECT);
}
@@ -2523,7 +2530,8 @@ static bool ed_object_select_pick(bContext *C,
}
else if (toggle) {
if (basact->flag & BASE_SELECTED) {
- if (basact == oldbasact) {
+ /* Keep selected if the base is to be activated. */
+ if (use_activate_selected_base == false) {
ED_object_base_select(basact, BA_DESELECT);
}
}
@@ -2539,7 +2547,7 @@ static bool ed_object_select_pick(bContext *C,
}
}
- if ((oldbasact != basact) && (is_obedit == false)) {
+ if (use_activate_selected_base) {
ED_object_base_activate(C, basact); /* adds notifier */
if ((scene->toolsettings->object_flag & SCE_OBJECT_MODE_LOCK) == 0) {
WM_toolsystem_update_from_context_view3d(C);