View Full Version : retrieving UV coords from selected verts in UVW editor

07-17-2010, 09:02 AM
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

07-17-2010, 09:57 AM
from the maxscript reference:
<void><Unwrap_UVW>.SetVertexPosition <time>time <integer>index <point3>pos
<point3><Unwrap_UVW>.getVertexPosition <time>time <integer>index

07-17-2010, 10:02 AM
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.

07-17-2010, 04:23 PM
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

07-20-2010, 08:35 AM
We have to see the code.

CGTalk Moderation
07-20-2010, 08:35 AM
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.