PDA

View Full Version : Select vertices on IDs


TITANius
11-24-2010, 10:02 AM
Hi, how to select vertices on IDs on Python API ?

TITANius
11-24-2010, 11:21 PM
Hi, how to select vertices on IDs on Python API ?
import maya.OpenMaya as OpenMaya

SelectionList = OpenMaya.MSelectionList()
OpenMaya.MGlobal.getActiveSelectionList(SelectionList);
iter = OpenMaya.MItSelectionList(SelectionList, OpenMaya.MFn.kGeometric);
while not iter.isDone():
dagPath = OpenMaya.MDagPath()
iter.getDagPath(dagPath)
Object = OpenMaya.MObject()
iter.getDependNode(Object)
Mesh=OpenMaya.MFnMesh(dagPath)
Mesh.getUVSetNames(UVSetNames)
iterPolys = OpenMaya.MItMeshPolygon(Object)
while not iterPolys.isDone():
Vertices = OpenMaya.MIntArray()
iterPolys.getVertices(Vertices)

# How to select vtx on list[Vertices] ?

iterPolys.next()
iter.next()

CGTalk Moderation
11-24-2010, 11:21 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.