[Maya] Get texture border with Maya api

coding
python
maya

#1

Hi all,

I’m trying to learn OpenMaya Python api, after using PyMel for a long time, and currently I’m running into an issue where I want to get the texture border of a mesh, so I can polysplit the edges after.

I have the following code in Pymel:

def getBorderEdges(edgeList):
    edgeBorderList = [edge for edge in edgeList if len(pm.ls(pm.polyListComponentConversion(edge, toUV=True), flatten=True)) > 2 or len(pm.ls(pm.polyListComponentConversion(edge, toFace=True), flatten=True)) == 1]
    return edgeBorderList

My question is, how would I do something like this / get the texture border in OpenMaya Python api?

Thanks!