The subject says it all... import maya.OpenMaya as om sel = om.MSelectionList() sel.append('persp') sel.add('persp') dag = om.MDagPath() comp = om.MObject() sel.getDagPath(0, dag, comp) dagArray = om.MDagPathArray() dagArray.append(dag) dagArray.append(dag)
numElements = 0 for dag in dagArray: numElements += 1 if numElements > 10: print "Oh noes!" break --~--~---------~--~----~------------~-------~--~----~ http://groups.google.com/group/python_inside_maya -~----------~----~----~----~------~----~------~--~---