X-Ray Selection Tools

1.4.3 Alpha

Steps to Reproduce:

  1. Move your viewport inside of a mesh
  2. Attempt to Box Select X-Ray a vertex from inside the mesh

Observed Result:

Error: Traceback (most recent call last):
  File "C:\Portable\blender-2.82a-windows64\2.82\scripts\addons\space_view3d_select_box_xray_1_4\__init__.py", line 187, in modal
    self.finish(context, event)
  File "C:\Portable\blender-2.82a-windows64\2.82\scripts\addons\space_view3d_select_box_xray_1_4\__init__.py", line 201, in finish
    self.select_elems_in_rectangle(context, mode=self.mode, only_inner_edges=self.only_inner_edges, only_face_centers=self.only_face_centers, xmin=xmin, xmax=xmax, ymin=ymin, ymax=ymax)
  File "C:\Portable\blender-2.82a-windows64\2.82\scripts\addons\space_view3d_select_box_xray_1_4\__init__.py", line 299, in select_elems_in_rectangle
    if co_inside_rectangle(region, rv3d, co):
  File "C:\Portable\blender-2.82a-windows64\2.82\scripts\addons\space_view3d_select_box_xray_1_4\__init__.py", line 221, in co_inside_rectangle
    return xmin <= co.x <= xmax and ymin <= co.y <= ymax
AttributeError: 'NoneType' object has no attribute 'x'

location: <unknown location>:-1

P123X2C23g

Also happens when you’re “inside” a concave part of a mesh:

3 Likes

Sorry to bother, but I have a question.
I saw from early on in the thread that you started posting two separate versions of the addon, a 1.4.x and a 1.3.x version, but I never saw an explanation or the reason as to why two versions?
Could you enlighten me please? What version should I download? Thanks!!!

Here’s the explanation by him :slight_smile:

2 Likes

tl;dr - use gumroad version

I added those versions upon request. They have options to select all edges and faces in the selection box, not just face centers and edges that are completely inside. But I didn’t have time to test them. Therefore, if you don’t need those features, use the version on the gumroad. Eventually, I add these features to gumroad version too, I just want to eliminate all bugs first and improve performance.

There are two versions, because they use different methods, I tried to find out which one works better and have fewer bugs.

1 Like

Thanks a lot!

Thank you for the bugreports! I think I fixed it all
Select Box X-Ray 2.0 beta.zip (41.9 KB)

5 Likes

Select Box X-Ray 2.0.1 beta.zip (41.8 KB)
Fix for face selection not flushed properly in edge mode (e.g selecting/deselecting edges didn’t change face selection)

1 Like

Thanks for all of your hard work. The 2 bug reports I put in for 1.4.3 that were causing python errors look fixed!

But when I uncheck Show X-Ray in the toolbar or the keymap it seems to be ignoring my choice; it shows X-Ray anyway.

This is on a clean install (portable unzip) of blender-2.83-d2c3544c5cb0-windows64 and your addon is the only one installed.

However, if I enable “Select All Edges” and/or “Select All Faces” then the X-Ray setting starts to work and correctly does not show while I’m box selecting in Edge/Face mode respectively. Vertex mode still shows X-Ray.

Also it looks like the Solidify modifier doesn’t get hidden during selection (but Mirror does).

Also there’s no checkbox to disable the X-Ray toggle when box selecting in Object Mode?

1 Like

Select Box X-Ray 2.0.2 beta.zip (42.8 KB)

  • Fixed disabling x-ray shading in 2.82 and 2.83 blender versions
  • Selection now toggle x-ray shading in wireframe mode too (if x-ray shading enabled in the tool settings)
  • Added a property to object mode tool to enable or disable toggling of x-ray shading

Currently it hides Solidify only if x-ray shading is enabled. The main reason I implemented toggling it is that Solidify can create extra wires with the x-ray shading and it becomes hard to distinguish between a real geometry and geometry created by the modifier.

Would it be useful to hide Solidify if x-ray shading isn’t used?

Also I uploaded it on Github if you want to track changes https://github.com/MarshmallowCirno/Select_Box_XRay

4 Likes

The fixes look good! I see no issues yet. :smiley:

Ah I see, yes this is working as described.

Hmm, does anyone else have any opinions on this? I don’t actually have an opinion one way or the other. I suppose it could be useful sometimes.

Woohoo!

1 Like

Hmm, does anyone else have any opinions on this? I don’t actually have an opinion one way or the other. I suppose it could be useful sometimes.

I haven’t tested this yet, but if I had to say, obviously I’d choose to be given the option to choose whichever option the user preferred. A checkbox somewhere allowing for the toggling on/off of this feature. Specially if this occurs when XRay shading is enabled, I could see myself wanting to sync things up when not in XRay too.

If the choice is between having this at all or not though without any choice/checkbox, I’d personally lean more towards leaving it out :slight_smile:

Great add-on! :+1:

Seems like the last version of 2.83 Alpha broke sth. :grimacing:
Using Select Box X-Ray 2.0.2 beta
It worked with the version from 2020-03-10 19:12, but now with current version 2020-03-28 01:08, I get two errors and can’t activate it unfortunately:

1st time trying to activate the add-on:

Traceback (most recent call last):
  File "C:\Program Files\Blender Foundation\Blender 2.83 - daily build\2.83\scripts\modules\addon_utils.py", line 382, in enable
    mod.register()
  File "C:\Users\MCP\AppData\Roaming\Blender Foundation\Blender\2.83\scripts\addons\space_view3d_select_box_xray\__init__.py", line 56, in register
    tools.register()
  File "C:\Users\MCP\AppData\Roaming\Blender Foundation\Blender\2.83\scripts\addons\space_view3d_select_box_xray\tools.py", line 71, in register
    register_tool_fixed(ToolSelectBoxXrayMesh, after={"builtin.select_box"}, separator=False, group=False)
  File "C:\Users\MCP\AppData\Roaming\Blender Foundation\Blender\2.83\scripts\addons\space_view3d_select_box_xray\utils.py", line 75, in register_tool_fixed
    tool_converted = tool_from_class(tool_cls)
  File "C:\Users\MCP\AppData\Roaming\Blender Foundation\Blender\2.83\scripts\addons\space_view3d_select_box_xray\utils.py", line 72, in tool_from_class
    cls._km_action_simple(kc, context_descr, tool_def.label, keymap_data)
TypeError: _km_action_simple() missing 1 required positional argument: 'keymap_fn'

2nd time trying to activate the add-on:

Traceback (most recent call last):
  File "C:\Program Files\Blender Foundation\Blender 2.83 - daily build\2.83\scripts\modules\addon_utils.py", line 382, in enable
    mod.register()
  File "C:\Users\MCP\AppData\Roaming\Blender Foundation\Blender\2.83\scripts\addons\space_view3d_select_box_xray\__init__.py", line 54, in register
    operators.register()
  File "C:\Users\MCP\AppData\Roaming\Blender Foundation\Blender\2.83\scripts\addons\space_view3d_select_box_xray\operators.py", line 241, in register
    register_class(cls)
ValueError: register_class(...): already registered as a subclass 'OBJECT_OT_select_box_xray'

Thanks!

1 Like

The same troubles…

That’s probably because of one or both of these commits which change the way Blender handles addon keymaps:
https://developer.blender.org/rBe8dd96516c60c4c43c8eb217f2c2cc61761cd0a0
https://developer.blender.org/rB3b59c111821b8002020ee76edf25258d7c38b381

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

1 Like

I just checked at GitHub:
It has been fixed 3 hours ago and yes, it’s working now!

Thanks so much! :pray:

1 Like

Select Box X-Ray 2.0.3 beta.zip (43.9 KB)

  • Fixes for 2.83 alpha. This addon version can be used on 2.81 and 2.82 too
5 Likes

Yes, it’s because of them

I fixed one more bug before uploading here, you might want to redownload it

3 Likes

I know, the add-on is called “Select Box (X-Ray)”, but as mentioned before, a “Select Lasso (X-Ray)” option would be very helpful, too. Thanks! :wink:

1 Like

Nice addon, thanks

Select Box X-Ray 2.0.4 beta.zip (79.8 KB)

  • Added circle select and lasso select tools
8 Likes