[Closed] Get Vert Position by UV
Say you’re interrogating a unwrap UVW modifier. You can say something like this…
selection[1].modifiers[1].getVertexPosition 1 1
That will get you the U and V values of the first UV on your object.
But how can you get the World xyz position of the UV’s corresponding vertex? Or at the very least the Index of that vertex? Or are the vertex indexes and uv indexes identical?
- Neil
I am pretty sure that they are not identical, since one geometry Vertex can be split into multiple UV Vertices.
But I think the selected geometry Vertex in the Unwrap editor is updated, whenever you select a UV Vertex. So it should be possible to extract that info by selecting the specified UV Vertex and the getting the selected geometry Vertex…
selection[1].modifiers[1].selectVertices #{1}
SelectedVerts = selection[1].modifiers[1].getSelectedGeomVerts()
VertPos = SelectedVerts[1].pos
Just an idea…
Ya, that’s what I was thinking, but I doubted myself for a second since it seemed so odd to me that there wasn’t a direct way to access one from the other.
Ah cool, that makes sense, use selection to link the two bits of info together. Kinda roundabout, but it works. Thanks.
- Neil