How can I toggle hide edges/wireframe of selected object (globally)?

How can I toggle hide edges/wireframe of selected object (globally)?

Anonymous
Not applicable
12,833 Views
8 Replies
Message 1 of 9

How can I toggle hide edges/wireframe of selected object (globally)?

Anonymous
Not applicable

I cannot for the life of me how to hide the wireframe of a selected object. I know I can go into viewport/show/selection highlighting, but I would prefer the wireframe be hidden globally and not just within that one viewport. On that note however I have also found I cannot find a way to hotkey that viewport function.

 

In the past I have assigned *something* to a hotkey that would do this  but what that was has escaped me. All I remember was that it was a hassle to find.

 

Any tips? I would love to be able to hide the wireframe/edges during UV mapping.

 

Thanks!

0 Likes
Accepted solutions (1)
12,834 Views
8 Replies
Replies (8)
Message 2 of 9

hamsterHamster
Advisor
Advisor

Preferences>Display>View>Wireframe on Shaded>None?


,,,_°(O__O)°_,,,
Maya2019.1 @ Windows10 & GeForce GTX1080Ti

If the post was helpful, click the
 ACCEPT SOLUTION  button, so others might find it much more easily.

0 Likes
Message 3 of 9

Anonymous
Not applicable

Hey, thanks for the reply. Sure, if I can toggle it via a hotkey.

 

There is this in the hotkey editor, but it doesn't affect wireframe vis when the object is selected.

 

sirpolygoon_0-1612987869372.png

 

0 Likes
Message 4 of 9

hamsterHamster
Advisor
Advisor

Bind to a custom script to a key

displayPref -wsa "none";

However, I suspect, you will want to have it as a toggle. If you figure out how, post the script, otherwise I might look into this tomorrow.


,,,_°(O__O)°_,,,
Maya2019.1 @ Windows10 & GeForce GTX1080Ti

If the post was helpful, click the
 ACCEPT SOLUTION  button, so others might find it much more easily.

0 Likes
Message 5 of 9

Anonymous
Not applicable

EDIT: Figured out how to get them back on, 

displayPref -wsa "full";

Ah ha! That worked. Yes however, I'm hoping for a toggle. I couldn't script my way out of a burning building so I am not sure how to go about making it so. Speaking of, how do I get the wires back? 🙂

 

Thanks again.

Message 6 of 9

hamsterHamster
Advisor
Advisor
Accepted solution

What I ended up with was a Py version, which needs to be saved as Runtime Command script (in Hotkey Ed), name it something ToggleWireframeOnActive.

# import maya.cmds as cmds
state = cmds.displayPref(q=True, wsa=True)
if (state == "none"): state="full"
else: state="none"
cmds.displayPref(wsa=state)

Then assing to a key.

Not sure if first line is necessary, worked for me even after restarting Maya. However if you get an error message, then just remove the # and resave.


,,,_°(O__O)°_,,,
Maya2019.1 @ Windows10 & GeForce GTX1080Ti

If the post was helpful, click the
 ACCEPT SOLUTION  button, so others might find it much more easily.

Message 7 of 9

Anonymous
Not applicable

That worked perfectly, thank you very much.

 

I swear there was a non-script solution at one point. Something along the lines of "hideEdge" that was buried somewhere.

 

Nonetheless, this does the trick nicely, and I really appreciate you taking the time.

0 Likes
Message 8 of 9

karol.stephan
Participant
Participant
For any future guest of this thread: the non-scripting solution is "Selection Highlighting" at the very end of "Show" tab of the viewport.

Though there is no ordinary way to make a toggling hotkey from it, so thousand thanks for the script for hamsterHamster!
Message 9 of 9

Ninurta13
Explorer
Explorer

Why does Autodesk do this?
Why can't THEY give us just one button?
Why should we waste hours of our time to find such solutions?
These are obvious things.
We just pay them a lot of money.
Can't they do such a simple thing for us?

How to make shortcut to Wireframe toggle, how to make shortcut for Outline toggle, how to make shortcut for wireframe on shaded toggle? And 1000 other obvious shortcuts! Why Autodesk do not this for us??