Reputation: 21
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
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