X-Ray selection experiments build

For the directional aspect, I’d say add two options for left-right or right-left directions should do the trick. Probably the easiest to implement and you won’t have to fiddle or break the things that are apoarently already there.

@lcas do you remember that I told you I had an error message popping up continuously? It seems that it is caused by not having a tool selected: ⚓ T98837 Tool 'builtin_brush.Draw' not found for space 'VIEW_3D' warning. So it’s a Blender thing and, as you expected, not part of your build.

E: By the way, why are all the options in the N-panel for me? It looks different on my end from the images you’ve shown: :face_with_spiral_eyes: For instance, I also don’t have the buttons up top.


It is the latest link, the 3.3.1 build.

1 Like

I don’t know why the N-panel has all that, but I see the same thing. I guess I never opened it the whole time while doing that. Going to go back and see later on. It’s been like a month of not doing any blender except messing with 3.4 beta and now 3.5 alpha builds.

Update on what I’ve done -
Object mode able to do a near select instead of forcing a select through every time
Select by both object origin or just touching some part of the object
Make the directional select work with just left vs right and in the way you would expect rather than the relatively strict way it does right now where it will do a tweak if it thinks your drag select is outside of what you’ve assigned the direction to

This works with box, lasso, and circle. Circle by object touch (as opposed to origin like it is right now) isn’t perfect but it is close enough and worth having as an alternative.

Issue I’m having is with the simplified directional keymap. I can’t change the options inside the direction dropdown or add a second one with just ‘any’ ‘left’ and ‘right’. It’s way more convoluted than I expected, and when I finally got close to making a second Click-Drag, calling it ‘Click-Drag Simple’ there’s no direction dropdown. When I try to add a second direction type, I run out of memory buffer and everything crashes when trying to make that keymap entry. Really annoyed with it right now, probably going to try asking in the dev chat for help. I also can’t just hard-code the unwanted directions out (north, south, northeast, soutwest, etc) because something is actually using a couple of them somewhere. Doing that would also go against what I’m trying to do which is not disrupt any current functionality.

I will likely wind up just having a userpref option for ‘simple direction’ or similar and it would just be up to user to ignore all of the directions in the keymap dropdown besides ‘any’ ‘east’ and ‘west’. It doesn’t hurt anything to assign them, but that keymap direction won’t be detected if the simple direction userpref is enabled.

If I knew this was going to be this big of a deal I would have just done the auto xray design doc. But when I was thinking about how to do that I decided I was just going to put all of the selection behaviour in 1 design doc, with links to various diffs if there was any further interest. I don’t get the point of making a design doc when there’s a diff(s) where things could be discussed already, but it’s what was suggested.

1 Like

Also this new user avatar looks like a mushroom cloud, I know it’s supposed to be that monky head primitive, but it took a bit to figure that out

You can change your avatar back to the letter icon in the prefs. Everyone without a custom image got the same monkeyhead (haha everyone with monkeyhead is dumb lol, primitives… pff :wink:).

So then, what about this select through build? Will you update it so I can test drive it again in a state in which you meant it to be (i.e. not in the N-panel)? :pleading_face:

Yeah I had no idea about that npanel thing so its going to be done, or at least worked on, this weekend

1 Like

Hey so good news is this is just a python thing so no re-download needed.

edit:
Ok just saw something, because obviously viewport overlays isn’t in the npanel. Just edit space_view3d.py

path_to_custom_build\3.3\scripts\startup\bl_ui\space_view3d.py

There’s 4 panels to change:

class VIEW3D_PT_view3d_auto_xray(Panel):
class VIEW3D_PT_view3d_select_through(Panel):
class VIEW3D_PT_view3d_mesh_filter(Panel):
class VIEW3D_PT_view3d_backface(Panel):

If you want everything out of the npanel, you have to remove (or comment out with a #) the ‘category’ and change the region to ‘HEADER’. If you change the region without removing the category, all of the header button popovers/dropdowns will disappear.

Example:

class VIEW3D_PT_view3d_auto_xray(Panel):
    bl_space_type = 'VIEW_3D'
    bl_region_type = 'HEADER'
    bl_label = "Auto X-Ray Settings"
    bl_ui_units_x = 13

Otherwise, anything I put up in the header will go in the npanel, because the region was ‘UI’ insead of ‘HEADER’. I just set it up wrong by nature of copy-pasting the panel code above it. That’s why it shows up in the view tab of the npanel.

If you want it in the npanel but in a different area, remove or comment out the ‘category’ (with a #) it will throw it into a tab called “Misc” in the npanel. Or you can send it into its own tab by giving it a name.

Example of Auto X-Ray in its own tab:

class VIEW3D_PT_view3d_auto_xray(Panel):
    bl_space_type = 'VIEW_3D'
    bl_region_type = 'UI'
    bl_category = "Auto-X"
    bl_label = "Auto X-Ray Settings"
    bl_ui_units_x = 13

Example of Select Through in a Misc tab

class VIEW3D_PT_view3d_select_through(Panel):
    bl_space_type = 'VIEW_3D'
    bl_region_type = 'UI'
    #bl_category = "View"
    bl_label = "Select Through Settings"
    bl_ui_units_x = 13

Okay weird, I did remove the category and changed the region type, but now I the menu isn’t in the header :thinking:



Did it for all four of the panel classes.

Could you post the python script here, so I’ll just copy it over? :sweat_smile:

I like this build so far!
UI need to be more elegant imho, but not at the moment.

1 Like

Should fix it
space_view3d.py

Can also try copy paste these

class VIEW3D_PT_view3d_auto_xray(Panel):
    bl_space_type = 'VIEW_3D'
    bl_region_type = 'HEADER'
    bl_label = "Auto X-Ray Settings"
    bl_ui_units_x = 13

    def draw(self, context):
class VIEW3D_PT_view3d_select_through(Panel):
    bl_space_type = 'VIEW_3D'
    bl_region_type = 'HEADER'
    bl_label = "Select Through Settings"
    bl_ui_units_x = 13

    def draw(self, context):
class VIEW3D_PT_view3d_mesh_filter(Panel):
    bl_space_type = 'VIEW_3D'
    bl_region_type = 'HEADER'
    bl_label = "Mesh Selection Settings"
    bl_ui_units_x = 13

    def draw(self, context):
class VIEW3D_PT_view3d_backface(Panel):
    bl_space_type = 'VIEW_3D'
    bl_region_type = 'HEADER'
    bl_label = "Ignore Backface Settings"
    bl_ui_units_x = 13

    def draw(self, context):

@APEC
Thanks, I’ve been streamlining it a lot while making some diffs for Blender. Been an on and off kind of thing so not done yet, but shouldn’t be too long from now.

The backface and select through both need to be used together for the ability to do this:

For the backface test to work without going into xray you have to use select through as well. Near select just does what it does, it doesn’t actually care what it can “see” as far as when backface culling disappears something. It just cares what it hits first, and then stops without going further.

During testing found some issue with Circle Select:

  1. Ignore Backface and Select Trough - On:
    can’t select top and bottom faces of flipped cube
  2. Ignore Backface - On and Select Trough - Off:
    can’t select any faces
1 Like

Try lowering the threshold value from .30 to .15 or so. I just tried it out and it seems to work ok. Can also just tilt the camera to face it a little more to test out its tolerance limits.

The second part is just the way near select works, it’s kinda weird. The quote in the post above explains it a little.

These two posts go over the oddities of backface selection

just tried. did not help

Also one little issue Select Trough toggle:
for Box and Lasso it save toggle state
but for circle selection - not


Oh I see why, because synchronization off for Circle

1 Like

Yeah I’m seeing some weirdness with the top and bottom of the cube the more I mess with it. Even at threshold 0 it will not select it when it can bee seen. If you tilt the screen to be more in line with it, suddenly it decides it’s visible. Something needs to be adjusted for it still.

Something wrong with the synchronization for circle also. I do not like the way this synchronization feature works, and think I can mostly remove it by defining things differently.

but also it did not select sphere faces

It needs select through to work in solid shading, just the way near select works unfortunately.

1 Like

if so, no need to bother with threshold code for now

Weird, the new Python script still doesn’t change the UI for me :sweat_smile:

What if I suggest another solution for Ignore Backface:
hide backfaces when starting to select (mouse clicked) and restore when mouse released?

I use simple script for this in my collection:
but it didn’t work when you need to extend selection after turning viewport


Maybe this alternative would be more convenient…

Maybe you need to delete startup file? Save it before…

1 Like