I usually set the size of the array first and then fill it up so it's not constantly resizing it to add more elements.
On Thu, Sep 27, 2012 at 5:45 PM, Jesse Capper <[email protected]>wrote: > Great, thanks. > > > On Thursday, September 27, 2012 2:11:29 PM UTC-7, Chad Vernon wrote: > >> The fastest would probably be just to get the full point array and loop >> through and pick out the ones you want. There's no one function to call to >> get a subset of points. >> >> On Thu, Sep 27, 2012 at 1:42 PM, Jesse Capper <[email protected]>wrote: >> >>> I'm very new to maya's API so this may be an obvious question. >>> >>> Given an MObject of selected components, what is the most efficient way >>> of getting an MPointArray of their positions? For all points on an object >>> I'm using MFnMesh.getPoints(MPointArray)**, but I haven't been able to >>> find a function that fills an MPointArray from a component set. I was >>> hoping MFnSingledIndexedComponent would have something :/. Is iterating >>> over the components with MItMeshVertex the only way? >>> >>> -- >>> view archives: >>> http://groups.google.com/**group/python_inside_maya<http://groups.google.com/group/python_inside_maya> >>> change your subscription settings: http://groups.google.com/** >>> group/python_inside_maya/**subscribe<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 > -- view archives: http://groups.google.com/group/python_inside_maya change your subscription settings: http://groups.google.com/group/python_inside_maya/subscribe
