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
--
You received this message because you are subscribed to the Google Groups
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/python_inside_maya/5db3e8af-6e26-47f5-a115-6e19dd492d3a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.