[Closed] retrieving UV coords from selected verts in UVW editor
Hey guys im trying to figure out how to retrieve the UV cords of selected verts in the UVW editor. What im trying to achive is a way of aligning selected verts based on the first and last vert in the bitarray. This would allow aligning of any vertex along an edge line at any angle.
i got this simple code sofar which returns each vert’s bitarray ID
for vert in ($.modifiers[#unwrap_uvw].unwrap.getSelectedVertices()) do
(
print vert
)
but i cant figure out for the life of me how to get two simple numbers from each ID. there isnt any “$.modifiers[#unwrap_uvw].unwrap.returnUVcords() <bitarray>” command
>.<
once im able to get these UV cords it will be a breeze for me
Hi,
from the maxscript reference:
<void><Unwrap_UVW>.[b]SetVertexPosition[/b] <time>time <integer>index <point3>pos
and
<point3><Unwrap_UVW>.[b]getVertexPosition[/b] <time>time <integer>index
oooo thanks alot – you know i kept looking at the reference file and i never see what i really need
me thinks they need to improve the layout.
ok i got it to work – it aligns along the imaginary line! but i have 3 bugs that im tring to now figure out
1: every so often on a line 1 vertex will get pushed away from the line but the next time i try it aligns correctly
2: a line of vertecies which flow upwards with indexes counting up will align perfectly most of the time BUT with a line of vertecies flowing up but with their respective indexes counting down will spew all the vertecies off the line.
3: undo for some bizarre reason doesnt work.
anyone hazard a guess to how i could solve this – my code is quite long and probably confusing to you but if you would like i can post the code of the script