3D View: preference to disable selection cycling on first click

Object mode selection does a kind of cycling that excludes the active
selected object. This is separate from regular selection cycling which
is enabled when clicking multiple times without moving the cursor.

This has the down-side that clicking on an object to drag it always
selects the object behind it (in the case of overlapping objects).

Since object mode selection is fundamental functionality, this is
exposed as an experimental preference for user feedback & testing.

See T96752 for details.
This commit is contained in:
Campbell Barton 2022-03-24 21:37:51 +11:00
parent 643da14a4e
commit 24c30e001f
Notes: blender-bot 2023-02-13 15:54:46 +01:00
Referenced by issue #96752, Proposal: disable object mode selection cycling on first click
4 changed files with 12 additions and 2 deletions

View File

@ -2261,6 +2261,7 @@ class USERPREF_PT_experimental_new_features(ExperimentalPanel, Panel):
context, (
({"property": "use_sculpt_vertex_colors"}, "T71947"),
({"property": "use_sculpt_tools_tilt"}, "T82877"),
({"property": "use_select_nearest_on_first_click"}, "T96752"),
({"property": "use_extended_asset_browser"}, ("project/view/130/", "Project Page")),
({"property": "use_override_templates"}, ("T73318", "Milestone 4")),
({"property": "use_named_attribute_nodes"}, ("T91742")),

View File

@ -2142,7 +2142,9 @@ static Base *mouse_select_eval_buffer(ViewContext *vc,
* doesn't have a bone selection, otherwise selecting sub-elements is difficult. */
((buffer[hit_index].id & 0xFFFF0000) == 0) &&
/* Only exclude active object when it is selected. */
(BASACT(view_layer) && (BASACT(view_layer)->flag & BASE_SELECTED))) {
(BASACT(view_layer) && (BASACT(view_layer)->flag & BASE_SELECTED)) &&
/* Allow disabling this behavior entirely. */
(U.experimental.use_select_nearest_on_first_click == false)) {
const int select_id_active = BASACT(view_layer)->object->runtime.select_id;

View File

@ -650,8 +650,9 @@ typedef struct UserDef_Experimental {
char use_extended_asset_browser;
char use_override_templates;
char use_named_attribute_nodes;
char use_select_nearest_on_first_click;
char enable_eevee_next;
char _pad[1];
// char _pad[0];
/** `makesdna` does not allow empty structs. */
} UserDef_Experimental;

View File

@ -6439,6 +6439,12 @@ static void rna_def_userdef_experimental(BlenderRNA *brna)
"Named Attribute Nodes",
"Enable named attribute nodes in the geometry nodes add menu");
prop = RNA_def_property(srna, "use_select_nearest_on_first_click", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "use_select_nearest_on_first_click", 1);
RNA_def_property_ui_text(prop,
"Object Select Nearest on First Click",
"When enabled, always select the front-most object on the first click");
prop = RNA_def_property(srna, "enable_eevee_next", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "enable_eevee_next", 1);
RNA_def_property_ui_text(prop, "EEVEE Next", "Enable the new EEVEE codebase, requires restart");