[Closed] Unwrap: how to select shared vertices ?
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
Hi ZBuffer,
I’m having difficulty understanding your question…the UV unwrap editor automatically selects shared TV’s
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.
You’re gonna have to use these funcs:
meshop.getVert
[size=1]meshop.getMapVert
[size=1]meshop.getVertsUsingFace
[size=1]meshop.getMapVertsUsingMapFace
[/size][/size][/size]
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.
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.
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
)