Thank you for your response.

*'First of all, you might be misunderstanding what `mDagPath.length()` 
returns.'*Sorry it's a mistake I wanted to write sel.length().

In fact what I want to do is a little fonction to know if to edges are 
connected:

def isEdgesConnected(e1Index, e2Index, objShape=None):
    if not objShape:
        # Get the object from selection        
        sel = om.MSelectionList()
        om.MGlobal.getActiveSelectionList(sel)

    else:
        sel = om.MSelectionList()
        sel.add(objShape)

    component = om.MObject()
    meshDagPath = om.MDagPath()
    sel.getDagPath(0, meshDagPath, component)
    
    eIter = om.MItMeshEdge(meshDagPath, component)
    while not eIter.isDone():
        print eIter.index()
        eIter.next()

As you can see right now if I select some edges and do:
isEdgesConnected(10, 10)

I'm only looping through the selected edges. Which is good

Now if I dont select anything and do 
isEdgesConnected(10, 10, 'pSphereShape1')

I'm looping through all the edges of pSphereShape1, which is not good, I 
want to be able to tell my function to just just loop through the edges 
given in argument.
How can I do that ?

-- 
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/1ee3bade-2249-4dd2-9767-3bfbf5f44a7e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to