Can't find the right command in maya.cmds to convert selection into UV Shell border and Contained Edges.
Basically, I was trying to make a Python script for maya 2022. Which will split object according the UV shells. For example an object has 6 uv shells, The object is going to be separated into 6 different pieces.
The functions of script are going to be: It will select all uvs points of the selected object in uvs mode, convert that selection into UV Shell border, and then convert that selection to Contained Edges. Then with that selection on, it is going to run the detach component action. after that a separate action. which will separate the object.
Here is a basic example of one way to accomplish this; The following will get you the faces of each UV shell. From there you can handle it how you like, but for the sake of simplicity, I just duplicated the mesh for each shell, and deleted the unwanted faces.