BlueberryWine
BlueberryWine

Reputation: 21

Python/MEL code equivalent of Display>Border Edges in Maya

I want to toggle in my script the border edges display but I can't seem to find it in the documentation nor in mel echo commands. How do you call this?

Upvotes: 0

Views: 356

Answers (1)

Vinman75
Vinman75

Reputation: 55

Are you referring to UVborders or Mesh edges?

You can use the following code to toggle mesh Display edges.

import maya.cmds as cmds 

poly_obj = cmds.ls(selection=True) #select a poly in Maya


bordersState = cmds.getAttr('{}.displayBorders'.format(poly_obj[0]))

if bordersState:
    cmds.setAttr('{}.displayBorders'.format(poly_obj[0]), 0)
else:
    cmds.setAttr('{}.displayBorders'.format(poly_obj[0]), 1) 

Upvotes: 0

Related Questions