View Full Version : [ MEL ] Get cv coordinates

10 October 2011, 11:11 AM
Hello guys !
i'm trying to snap "curve1" to a specific cv of "curve2" (the first cv of "curve2")...the problem is that i don't know how to get the world coordinates of a cv. Can anybody please help ?


did some digging and eventually figured it out :

//getting the x value of the first cv of a curve :
$xPos=getAttr (exampleCurveShape.controlPoints[0].xValue);

10 October 2011, 02:20 PM
the cv attribute only holds the LOCAL coordinate. If you want to get the world (or local) position of ANY point type in Maya (vertex, cv, locator, handle, point, particle, etc...) use the pointPosition command (believe it or not! ;) )


10 October 2011, 08:42 PM
thanks Nathan :D had no ideea that command existed

CGTalk Moderation
10 October 2011, 08:42 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.