0
$\begingroup$

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?

$\endgroup$
  • $\begingroup$ This might be an issue connected to the clipping distance. Will increasing start clip and decreasing end clip make the selection more precise? $\endgroup$ – Dimali May 3 '17 at 20:17
  • $\begingroup$ 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. $\endgroup$ – andyV May 4 '17 at 4:08
1
$\begingroup$

It's been a while but I forgot to answer this after I figured it out.

Unfortunately there is a whopping 28 pixel hitbox hard coded in to Blender's selection tools.

I cover my findings here in this post: Object Selection Accuracy

But long story short, for some reason this massive hit-detection area is hard-coded giving the user no control over it. Maybe one day in the future... :\

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.