What about this ?
vertexList = [330, 136, 58]
postList = []
for eachVer in vertexList:
postList.append(cmds.pointPosition('pSphere1.vtx[%s]' % eachVer))
cmds.curve(n='curve1', d=1, p=postList)
On Tue, Mar 3, 2015 at 5:50 PM, <[email protected]> wrote:
> Yo,
>
> if you want to create a curve from a set of points that already exist. eg
> you want to create a curve from points on a mesh. Is this the cleanest way
> to do it?:
>
> Pnt1=cmds.pointPosition('geo.vtx[330]')
> Pnt2=cmds.pointPosition('geo.vtx[136]')
> Pnt3=cmds.pointPosition('geo.vtx[58]')
>
> cmds.curve(n='curve1', d=1, p=[Pnt1,Pnt2,Pnt3])
>
> or is it possible to just enter the 'geo.vtx[330]' items into the curve
> command somehow? - basically im trying to shrink my script because i have
> a hell load of curves in my scene now.
>
>
> thanks alot,
> 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/91ebea63-0f77-4879-a3ed-4101ed6f2fb1%40googlegroups.com
> .
> For more options, visit https://groups.google.com/d/optout.
>
--
--:: Kurian ::--
--
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/CANEMyhPHKqoctgiMSp2FKFG%3DiiP%2BN-50ydxgT4YG_1MZXrPTDA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.