a little progress, but still stuck getting the islands.  Plus, I don't think 
connectedVertices() is giving me what I want, so I'm starting to have to get 
test for the component type. it's still in progress.

============================

import pymel.core as pm
from itertools import chain


def getComponentIslands( components ):
    #placeholder, till I figure this out
    componentIslands = components
    return componentIslands


def getComponentIslandVerts( islands ):    
    for component in islands:
        print "========================================"
        print "Component Island ID/'s are {0}".format(component)
        node = component.node()        
        if type(component) == pm.MeshFace:
            verts = [ island.connectedVertices() for island in component ]
        
        elif type(component) == pm.MeshEdge:
            verts = [ island.connectedVertices() for island in component ]
        
        elif type(component) == pm.MeshVertex:
            verts = [ island.connectedVertices() for island in component ]
    

        for item in set( chain(*verts) ):
            print item


getComponentIslandVerts( getComponentIslands( pm.selected() ) )


==========================

Thanks
Kev

-- 
You received this message because you are subscribed to the Google Groups 
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/549ba3d1-e584-4b26-bf61-496e25ab1a71%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to