Im trying to make a button of my toolbar that i can use to toggle on/off the mesh wires. I was hoping I could through a macro since I dont know how to code.
I was going to flippantly say yes, but a) it seems not actually? and b) the problem is that you would need to know the current view mode to modify its settings, which is I think too elaborate for a macro.
There is no way to access individual display modes via macro… One way is to duplicate the display mode and change the mesh wires setting, then use a macro to change the display mode.
I usually just use the Display panel in Properties to toggle these kinds of things on and off.
Hi @Tommy804, i’m using below script which works in the current display mode of the current viewport:
DisplayModeToggleMeshWires.py (806 Bytes)
To run it, i use a keyboard shortcut or alias with this macro:
_NoEcho _-RunPythonScript “C:\MyPath\DisplayModeToggleMeshWires.py”
Note that you’ll need to adjust the path to the script so it matches where you saved to.
_
c.
Thank you.