selectBy = 2
total = len(cmds.getAttr("pSphere1.vtx[:]"))
for i in xrange(0, total, selectBy):
cmds.select('pSphere1.vtx[%d]' % i, add=True)
Hope that helps!
--
view archives: http://groups.google.com/group/python_inside_maya
change your subscription settings: http://groups.google.com/group/python_inside_maya/subscribe
--
view archives: http://groups.google.com/group/python_inside_maya
change your subscription settings: http://groups.google.com/group/python_inside_maya/subscribe
<my selection.jpg>
import maya.api.OpenMaya as api
sgMObjs, sgFaceIDs = meshFn.getConnectedShaders(0) # Note: To support mesh instancing you'll have to supply the correct instance here
for sgNum, sgMObj in enumerate(sgMObjs):
if sgMObj == theSGMObjThatIWant:
faceIDs = [i for i, sgID in enumerate(sgFaceIDs) if sgID == sgNum]
colors = [api.MColor(1,0,0,1)]*len(vList)
meshFn.setFaceColors(colors, faceIds)sel = api.MGlobal.getActiveSelectionList()
dagPath = sel.getDagPath(0)
if dagPath.hasFn(api.MFn.kMesh):
meshFn = api.MFnMesh(dagPath)