Skip to content

Instantly share code, notes, and snippets.

@paulwinex
Last active May 11, 2016 19:41
Show Gist options
  • Save paulwinex/a9305986e179e343a519 to your computer and use it in GitHub Desktop.
Save paulwinex/a9305986e179e343a519 to your computer and use it in GitHub Desktop.
Return array of smoothed/harded edges by index
import maya.OpenMaya as om
import maya.cmds as cmds
def edgesIsSmooth(name, edgeArray):
selList = om.MSelectionList()
selList.add(name)
selListIter = om.MItSelectionList(selList, om.MFn.kMesh)
pathToShape = om.MDagPath()
selListIter.getDagPath(pathToShape)
shapeFn = om.MFnMesh(pathToShape)
return [shapeFn.isEdgeSmooth(x) for x in edgeArray]
#return [x for x in edgeArray if shapeFn.isEdgeSmooth(x)]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment