Last active
May 11, 2016 19:41
-
-
Save paulwinex/a9305986e179e343a519 to your computer and use it in GitHub Desktop.
Return array of smoothed/harded edges by index
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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