I want to fix the selection threshold for single-click near components. It’s way too big. This hurts clicking empty space to deselect. I do not care about keyboard shortcuts to accomplish this.
Faces work fine. It doesn’t select the nearest face in a 20 pixel radius. My knowledge is very limited, but I fixed verts. Edges are the problem, the same fix doesn’t work. I’ve tried a lot of things that do nothing.
Please, somebody help me out.
The magic happens here:
blender-git\blender\source\blender\editors\mesh\editmesh_select.c
I found out where to look from this post:
Changing those values (lines 407 & 408) has no effect on selection threshold.
I already have verts working great, and can adjust their selection threshold to any size I wish.
You can do this by changing line 492 from
if (dist_test < *r_dist)
to
if (dist_test < some value)
For whatever reason, edges work different. Changing the the same area (line 705) doesn’t do anything.
Some more info:
For line 492, just use a value that fits with the hotbox placement and the size/shape of your cursor. I have it working perfectly with my custom cursor (it’s a ripoff from another app)
The original doesn’t fit inside 16 pixels, so I won’t be using small cursor.
The only difference between mine and the one I ripped off is the sides of my box are 1 pixel longer so the hotbox is centered. This cursor is designed around the concept of showing the selection threshold without blocking it’s center. I never even thought about it until I had to use the Blender crosshair for a few minutes.
I set line 492 to (dist_test < 7) because that’s where the center of my box is. Origin is topleft. Verts are (de)selected if inside the box, and they are left alone if they are outside the box.
I stumbled my way into fixing verts by commenting out big swaths of applicable code until I could
1. Build
2. Not crash when selecting
3. Stop selecting
4. Try to wrap my head around what is going on in the remaining commented area
5. Put it back the way it was and play around with stuff until I got somewhere
Right now I’m pretty tired so I probably won’t reply until I get some sleep.
Thanks!