PDA

View Full Version : Unwrap: how to select shared vertices ?


Zbuffer
10-21-2005, 11:20 PM
Hi all,

I am writing a script to automate certain tasks in the Unwrap modifiers.
i would like to select all the shared TV vertices associated to a specified vertex with a function.

something like this :

fn getsharedvertices v =
(
??? how to write this ?

return sharedVerts
)

then use this in a loop
uv=modpanel.getcurrentobject() -- the Unwrap modifier
sel=uv.getselectedvertices()

for i in sel do
(
s=getsharedvertices i
...

)


have been struggling with no luck ....
Could any kind scripter please help me out ?
Thanks in advance

stuh505
10-22-2005, 07:20 AM
Hi ZBuffer,

I'm having difficulty understanding your question...the UV unwrap editor automatically selects shared TV's

Zbuffer
10-23-2005, 04:32 AM
Hi stuh505,


The Unwrap editor shows them, but does not select them ...
This is would I would like to do !

I would like to build an array of shared vertices.

I understand this seams kind of odd, but the editor shows the shared vertices, but i can't see anywhere a maxscript function to select them.

stuh505
10-23-2005, 06:05 AM
You're gonna have to use these funcs:

meshop.getVert
meshop.getMapVert
meshop.getVertsUsingFace
meshop.getMapVertsUsingMapFace

prettyPixel
10-23-2005, 11:23 AM
To select shared vertices, You should :

1- select TV vertices(=1) associated to the specified vertex.
2- select the vertices(=2) associed of these TV vertices(1).
3- select TV vertices associated to the specified vertices(2).

Then you will have the TV vertices, including the shared TV vertices.

prettyPixel
10-24-2005, 02:35 AM
I am rewriting my routines to access to the unwrap_uvw modifier...
I am going to take advantage of it to include a function which selects shared vertices.

There is not a great difference to program it but I hesitate on the most practical way:
Does the function have to return the shared map vertices alone ? Or with all map vertices, including the shared map vertices ?

Could you explain the utility of the selection of shared map vertices?
That will give me an idea of the best way of returning the result.

Zbuffer
11-03-2005, 07:58 AM
Thanks for your input guys,
I just found a solution, kind of a hack:

i use
expandGeomVertexSelection()
and
contractGeomVertexSelection()
This does the trick !

so a fonction that would select the shared vertices for a single vertex :
uv=uv=modpanel.getcurrentobject()
...
fn getsharedvertices i =
(
uv.selectVertices (#{i})
uv.expandGeomVertexSelection()
uv.contractGeomVertexSelection()
s=uv.getselectedvertices()
return s
)

CGTalk Moderation
11-03-2005, 07:58 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.