Notifications
Clear all

[Closed] Edge selection from poly selection

I have a script that is selecting some polygons based on some stuff that’s not important. What is important is that I want to make a shape from the edges of the selected polygons. In editable poly, I would just hold control and select edge, but I can’t figure out the equivalent in maxscript. I added the selected polygons to an array:

face_array = polyOp.getFaceSelection obj

And now I’m trying to do something like this:

polyOp.setEdgeSelection obj (polyOp.getFaceEdges obj face_array)

But I can’t get it to work. I’ve tried doing one value from the array at a time (face_array[1]), but that doesn’t work. I think I just don’t have the right vocabulary to tell it to do what I want. Does anyone have a suggestion? Thanks in advance.

2 Replies
fn CreateShapeFromSelectedFaces node =
 (
 	faces = polyOp.getFaceSelection node
 	edges = polyop.getEdgesUsingFace node faces
 	polyop.createShape node edges
 )
 
 CreateShapeFromSelectedFaces $

Hey, that worked great! Thanks a lot.