Hi,
I have a road for exemple where vertex are not at same z values at the right and left side.
I select all the edges along the road (a ring )
I select all the vertices I want to stay in place
I run the script and all the edges become horizontal.
That is what I want.
But I can't manage to find how to write in maxscript :"pp[1] exist in selP" in the script below. If somebody could help.
Thanks :-)
a = $
selE = a.EditablePoly.getSelection #Edge as array
selP = a.EditablePoly.getSelection #Vertex as array
for ss in selE do
(
pp = polyop.getEdgeVerts a ss as array
if "pp[1] exist in selP" then
(
polyOp.setVert $ pp[2] [ a.verts[pp[2]].pos.x , a.verts[pp[2]].pos.y , a.verts[pp[1]].pos.y ]
)
else
(
polyOp.setVert $ pp[1] [ a.verts[pp[1]].pos.x , a.verts[pp[1]].pos.y , a.verts[pp[2]].pos.y ]
)
)