Increase Object Selection Accuracy?

I have two cubes in the viewport about 40 pixels away from each other. Clicking in the empty space between the cubes will alternate selecting one of the cubes instead of de-selecting it like I'd expect from that far away.

This "slop" seems to extend the selectable "hit box" of an object about 20 or so pixels beyond it's visible bounds. Is there any way to increase the precision so that the "hit box" doesn't extend so far past the object? It's resulting in a lot of accidental selection/tweak-drags and is really annoying.

In the source code for VIEW3D_OT_select I can see this property:

prop = RNA_def_int_vector(ot->srna, "location", 2, NULL, INT_MIN, INT_MAX, "Location", "Mouse location", INT_MIN, INT_MAX);


Is the 2 after "location" a multiplier of some kind responsible for this effect I'm seeing? If so is there any way to change it without having to recompile Blender?

Or is there a simpler way in the user prefs where I can adjust mouse selection sensitivity?

Thanks for any help.

EDIT:

Experimenting with Border Select I found that invoking a single pixel border selection like this:

bpy.ops.view3d.select_border(gesture_mode=3, xmin=x, xmax=x, ymin=y, ymax=y)


has the same sloppy selection behavior as VIEW3D_OT_select, which is also using a single pixel coordinate for it's 'location' property.

But invoking a 2x2 Border Select like this:

bpy.ops.view3d.select_border(gesture_mode=3, xmin=x, xmax=x+1, ymin=y, ymax=y+1)


gives a very precise selection.

Unfortunately because it's Border Select doing this when two objects are very close or overlapping it can sometimes select multiple objects with a single click.

But I think it shows that when you give Blender a single pixel selection search it's doing something funky under the hood to multiply or widen it's hit detection, which is really too bad. I can't imagine why that would ever be desirable behavior?

• This might be an issue connected to the clipping distance. Will increasing start clip and decreasing end clip make the selection more precise? – Dimali May 3 '17 at 20:17
• You mean the Clip property for the 3dview, right? I tried setting it to .01 near and 10,000 far but still no luck :( Thanks for the suggestion, though. One thing I did notice is that border select offers the type of precision I'm expecting. You can draw the border all the way up to an object edge without selecting it. It only selects if you actually cross over to where the geometry is. VIEW3D_OT_select must be using a different selection method. – andyV May 4 '17 at 4:08