Notifications
Clear all

[Closed] EditablePoly: extrude edges

Hey guys, i’m trying to figure out how to extrude some selected edges of an EditablePoly object like you can by shift+dragging them in the UI or alternatively like the extrude edge button in the UI with width/height set to 0 so i can just manually move the verts. cant find anything in the reference but between all the extensive polyop/editable poly sections i may have missed what i’m looking for. any ideas?

2 Replies

Hi Joel,
here is a solution. Mind that Command Panel needs to be in Modify Mode to make the buttonOp work.

(
    -- create an Editable Poly object
    local oPoly = convertToPoly(Sphere())

    -- select Editable Poly and enter Edge Sub Object level
    select oPoly
    subObjectLevel = 2

    -- set edge extrusion parameters
    -- unique for each Editable Poly
    oPoly.edgeExtrudeHeight = 10.0
    oPoly.edgeExtrudeWidth = 2.5

    -- set an edge selection
    polyOp.setEdgeSelection oPoly #{80}

    -- perform the edge extrusion
    oPoly.buttonOp #extrude
)
  • Enrico

i actually looked at buttonOp a few times but somehow i missed it, thanks Enrico!