I'm working on an Add-On that should turn on x-ray while the Select Lasso tool is active.

The way I'm trying to achieve this is by using a Macro:

  1. Turn on X-Ray
  2. Launch lasso select
  3. Turn off X-Ray

Problem: Once I run it through the F3 search menu, it works as expected, but when I try to map it to a shortcut it just runs through the macro and completely skips the lasso tool. Giving me this output in info window:

bpy.ops.view3d.wtm_xray_macro(VIEW3D_OT_wtm_xray_on={}, VIEW3D_OT_select_lasso={"path":[], "mode":'SET'}, VIEW3D_OT_wtm_xray_off={})

So how do I get the same behavior as the F3 search menu, but in keybinds.

Note that it also skips the lasso tool if I run the macro through a python script(using an operator).


Your Answer

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

Browse other questions tagged or ask your own question.