Hello,
i had a similar problem i posted before where i needed to get all the points of a particular mesh and 'set' the position for another mesh.
in that problem i used getPoints, like this:
\\\\\\\\\\\\\\\\\\\\\\\\\\\\
def getPoints(geo):
sel = om.MSelectionList()
dag = om.MDagPath()
sel.add(geo)
sel.getDagPath(0,dag)
mesh = om.MFnMesh(dag)
vts=om.MPointArray()
mesh.getPoints(vts, om.MSpace.kObject)
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
In my current problem i have two identical spheres 'pSphere1' and 'pSphere2', the first sphere has been deformed all over. What i want to do is select a group of verts on that surface and copy them onto the second sphere, not all of them, just the selection.
Im assuming i first need to do something like below, which is not written correctly, and then use the vert locations somehow to set them onto the sphere 2:
\\\\
import maya.OpenMaya as om
vertList = om.MFloatPointArray()
for v in (
cmds.ls(sl=True)):
p1 = om.MFloatPoint(v)
vertList.append(p1)
\set locations from vertList onto 'pSphere2'
\\\\\
is this is simple thing to setup, does anyone know?, using maya api 1 by the way
thanks,
Sam