diff options
-rw-r--r-- | release/scripts/startup/bl_ui/space_userpref.py | 1 | ||||
-rw-r--r-- | source/blender/editors/space_view3d/view3d_select.c | 4 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_userdef_types.h | 3 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_userdef.c | 6 |
4 files changed, 12 insertions, 2 deletions
diff --git a/release/scripts/startup/bl_ui/space_userpref.py b/release/scripts/startup/bl_ui/space_userpref.py index 5fcb573b583..3a72d3e2096 100644 --- a/release/scripts/startup/bl_ui/space_userpref.py +++ b/release/scripts/startup/bl_ui/space_userpref.py @@ -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")), diff --git a/source/blender/editors/space_view3d/view3d_select.c b/source/blender/editors/space_view3d/view3d_select.c index 6ae9b463cfb..30282df8026 100644 --- a/source/blender/editors/space_view3d/view3d_select.c +++ b/source/blender/editors/space_view3d/view3d_select.c @@ -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; diff --git a/source/blender/makesdna/DNA_userdef_types.h b/source/blender/makesdna/DNA_userdef_types.h index 4dee89db274..5fb8d0328f1 100644 --- a/source/blender/makesdna/DNA_userdef_types.h +++ b/source/blender/makesdna/DNA_userdef_types.h @@ -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; diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c index a02feb44aaa..03f512b5528 100644 --- a/source/blender/makesrna/intern/rna_userdef.c +++ b/source/blender/makesrna/intern/rna_userdef.c @@ -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"); |