Hello,
I would like to convert one vertex to edges in unwrap uvw
but it doesn't work with one uv vertex selected ... it do work with 2
vertices or more.
Do anyone know how can i achieve that ? So
basiclally we select one Uv vertex we execute the script and boum, we do
obtain all the adjacent edges.
Thanks.
Massimo
Replies
vrt = $.modifiers[#unwrap_uvw].getSelectedGeomVertsByNode $
modPanel.setCurrentObject $.baseObject
tmp = polyop.getEdgesUsingVert $ vrt
modPanel.setCurrentObject $.modifiers[#Unwrap_UVW]
subobjectLevel = 2
$.modifiers[#unwrap_uvw].selectEdgesByNode tmp $
Edit: Just checked and it seems like Max reorders the Edge numbers in the UVW modifier (ugh...), so you'll want to select them by position instead of number.
It's unoptimized and slow though. If someone can help to speed it up - I will appreciate.
Here is the code (slow, but should work for instanced modifier):
For example in Editable Poly you can grow or convert selections without ruining your selections, while in Unwrap UVW its more like pressing buttons using maxscript code (so stupid). Autodesk was so fucking lazy then was making maxscript commands and functions for Unwrap modifier...
</code><code>(<br> mod = $.modifiers[1]<br> gVerts = mod.getSelectedGeomVerts() --gets the selected vertices in the unwrap modifier<br> edges = polyop.getEdgesUsingVert $ gVerts --gets the edges where the vertices exists<br> corEdge = #() <br> for edge in edges do (<br> polyop.setEdgeSelection $ edge --set current selection to single edge<br> seVerts = polyop.getVertsUsingEdge $ #{edge} --gets the vertices from the single edge<br> mod.selectVertices seVerts --selects the vertices we got from the single edge<br> mod.vertToEdgeSelect() --selects the edge that those vertices makes up<br> newEdges = mod.getSelectedEdges() as array --gets the edge index from the unwrap<br> append corEdge newEdges[1]<br> )<br> mod.selectEdges (corEdge as bitarray) --selects the correct edges<br> mod.selectVertices gVerts --selects the verts the user selected<br> mod.setTVSubObjectMode 2<br>)