I'm trying to access the world position coordinates of the control vertices in a NURBSCVSurface sub object.
The position is always returned as a value relative to the centre of the sub object rather than relative to the world coordinates.
I don't know how to access the pivot point coordinates of the NURBSCVSurface sub object.
If I did, I would just add these to the relative coordinates to get my answer.
I've included a v. simple script below to see what I mean.
To test it, create a simple CV Surf (Create-->Geometry-->NURBS Surfaces-->CV Surf) that isn't centered around the origin (I couldn't attach files for some reason).
objNode = $Surface001 objNode.pos classof(objNode) getset = getNURBSSet objNode #relational -- Get the first NURBSCVSurface sub-object: obj = getObject getset 1 -- Output name of the sub object to listener: obj.name -- Output position of the first control vertex to listener position = (in coordsys local getCV getSet[1] 1 1).pos -- Apply transform to convert to world coordinates (doesn't work): trnsform = obj.transform worldPosition = (position*trnsform)
Solved! Go to Solution.
Solved by Swordslayer. Go to Solution.
Files attached as zip file. 🙂
Well, I didn't actually open the file and only guess, but what about
getPointPos objNode 1