X-Ray Selection Tools

Place select_box_xray_tool.py (1.7 KB)
in AppData\Roaming\Blender Foundation\Blender\blender_version\scripts\startup

You mean setting that shortcuts by default on addon activation?
I can do it in the next version

1 Like

ive managed to make it work using macro of pme
thank you i will try this

PS: Just got back to my desk and checked, as far as L is concern for selection it is not assigned, see the hubris here ? Absolutely ridiculous…

I will wait for your update…using Blender without your Add-on now is almost unthinkable now.
Box select finally select everything just like e-v-e-r-y o-t-h-e-r p-a-c-k-a-g-e.

And once you have install the B [Box Select], C [Circle Select] and L [Lasso Select].
That’s it, Blender’s most basic of all basic [the selection tool] is finally sane again !

Can’t wait for your update.
Please make your add-on wipe out anything that is blocking B, C, L, I don’t care for the useless defaults anymore.

Hey, great addon i like idea of turning on xray in that way.

Have You considered adding different action left-to-right from right-to-left and visual diference for different modes?
eg. like that:
bbselect
left2right add select black outline, right2left substract select red outline

I think that it could confuse some users. BTW, depending on how the model is displayed on the viewport (close-up, zoomed out, with a specific angle view…), the user sometimes needs to select vertices from all directions.

Shift + LMB is a simple way to subtract vertices from a selection…

TBH, I don’t like this idea that much. Or please, make it as an optional option.

If your ideas are implemented, that means you can only truly select from right to left ?
Because everything we ever need to select can best be selected from the left to right side…Oh I get it April fools ! You are so funny !

I mean not particularity that. That was easiest to implement and show.

It could be left- normal, right- xray to not have to constantly switch tools.

anyway, visual aid would be helpful anyways

Something similar to this exists in Zbrush and it’s frankly pretty frustrating at times to use. The masking tools will react differently depending on if you drag from the left vs the right. I think I’d much prefer to just hold down Ctrl if I need to deselect.

2 Likes

What you are proposing is a nightmare.

Whatever the add-on is doing right now is PERFECT.
The only thing left for it to do is override the defaults so that:
B = Box Select
C = Circle Select
L = Lasso Select
and KILL.the.useless.default.

Can you believe the current Blender default is B for Box Select, C for Circle and Control+Right Mouse button for Lasso and YET L itself is assigned to…nothing ? The absolute hubris of this nonsensical inconsistent crap is beyond…

It’s almost as ridiculous as pressing E for extrude but if you right click so that it “visually” looks like the extrude is canceled, it is actually not canceled but just in the same place as the original plane causing two planes to be in the exact same place…people try to makes excuses by saying this allows you to execute inset…but that is what press “I” is for…inset…

You already can set them that way

As for the visual difference, I can add a keymap parameter for shader color if you want it

1 Like

is this a bug ?
i change the hotkey like 3ds max ( ctrl = add ) ( alt = subtract )
and save preference

it was working perfectly until restart blender
it will restore or revert the default hotkeys

for science to reproduce this , i tried removing this and save preference

and when i restart blender , even i deleted and save it , all the default settings got restored

Yes, it’s a bug that was fixed in 2.83

https://developer.blender.org/rBe8dd96516c60c4c43c8eb217f2c2cc61761cd0a0
https://developer.blender.org/rB3b59c111821b8002020ee76edf25258d7c38b381

https://developer.blender.org/T66655
https://developer.blender.org/T60766

If you use earlier version please change them in tools.py for example

to


    bl_keymap = (
        ("mesh.select_box_xray", {"type": 'EVT_TWEAK_L', "value": 'ANY', "alt": True}, {"properties": [("mode", 'SUB')]}),
        ("mesh.select_box_xray", {"type": 'EVT_TWEAK_L', "value": 'ANY', "ctrl": True}, {"properties": [("mode", 'ADD')]}),
        ("mesh.select_box_xray", {"type": 'EVT_TWEAK_L', "value": 'ANY'}, {})
    )
1 Like

yes i am using 2.82 official build
thank you for fast reply its working now

Hello, I’m having a problem with the addon and armatures (I’m on version 2.82).
When I have the addon installed and active, If I add an armature bone to the scene and change from object mode to pose pr edit mode, I receive an error (sometimes it only happens after I activate the addon, save preferences, close blender and reopen blender, add armature, change to pose/edit)

Edit: I discovered the problem only happens when I have the file “select_box_xray_tool.py” on “C:\Usersmyuser\AppData\Roaming\Blender Foundation\Blender\2.82\scripts\startup”
Which is what was suggested to have the select x-ray active by default in blender instead of the standard select options.

Traceback (most recent call last):
  File "C:\Program Files\Blender Foundation\Blender 2.82\2.82\scripts\startup\bl_operators\wm.py", line 1681, in execute
    if fn(context, space_type, self.name, as_fallback=self.as_fallback):
  File "C:\Program Files\Blender Foundation\Blender 2.82\2.82\scripts\startup\bl_ui\space_toolsystem_common.py", line 948, in activate_by_id
    _activate_by_item(context, space_type, item, index, as_fallback=as_fallback)
  File "C:\Program Files\Blender Foundation\Blender 2.82\2.82\scripts\startup\bl_ui\space_toolsystem_common.py", line 910, in _activate_by_item
    item_fallback, _index = cls._tool_get_active_by_index(context, select_index)
  File "C:\Program Files\Blender Foundation\Blender 2.82\2.82\scripts\startup\bl_ui\space_toolsystem_common.py", line 350, in _tool_get_active_by_index
    item = item[index]
IndexError: tuple index out of range

location: C:\Program Files\Blender Foundation\Blender 2.82\2.82\scripts\modules\bpy\ops.py:201

When I deactivate the addon, the error stops happening.

1 Like

@Cirno When using this py file on the startup folder, besides the error that I mentioned in the post above when using armatures, I noticed the the addon starts as default in Object mode, but not when we switch the mesh to Edit Mode…

Literally made an account just to thank you. I’ve just started using Blender after coming over from Maya after like 8 years and not having this feature was driving me crazy. T h a n k Y o u

2 Likes

Maybe I’m confused, but I thought this addon solved the issue where u could now select faces with Xray, without having to select the middle of the faces? Or is that not the case?

I can’t seem to select faces at the edge of a box, unless I select the center. In v2.82.7
Using version 2.0.6 Beta of the Addon.

Custom selection modes?
A very interesting approach)

How did you made disabled “Show Xray” checkbox mode?
Is it temporal preferences setup, or hardcode?

Select Box X-Ray 2.0.7 beta.zip (109.0 KB)

  • Tools are now assigned to B, C, L buttons by default. Shortcuts can be disabled or changed in the addon preferences. Selection behavior matches default blender operators (i.e selecting with Key extend selection, selecting with Key+Shift substract selection)
  • Fixed the error upon entering Armature Edit, Metaball, Lattice, Pose modes with an active addon tool

Done

Should be fixed now

Try this file autoselect_box_xray_tool.py (2.1 KB)

Yes, it should select all faces in the box with “Select all faces” checked. Dunno why it doesn’t work for you. It worked for others. Maybe your shortcut was overwritten

For the most parts (lasso and circle tools, verts box selection) It temporary toggle shading preferences. For box selecting all faces (not just face centers) and all edges it doesn’t use default box select operator and selection is performed with custom intersection tests. I try to avoid them and use default operator with c code as much as possible, because intersection tests in python are slow

4 Likes

I have updated the thread to let everyone knows you solved the issue !!!