I am using python to write a Maya script and I would like to be able to get a single coordinate value from a Maya object or object component.
In this case, I would like to retrieve only the y-coordinate value from a control vertex called "curve1.cv[1]"
I know how to get the full group of coordinates with:
cmds.pointPosition("curve1.cv[1]")
or
cmds.getAttr("curve1.cv[1]")
but both of these return a group of float values for x,y, and z. I would like to be able to return just a single float value for the y coordinate.
How can I do this?
-ps. this is my first post here and I am a beginner programmer. I apologize if this is the wrong place to ask questions about MEL/Python scripting.