I've been looking for how to do this for awhile and never found out so have done this manually but I am hoping there is a way. When capping a hole, in the back of an object for example.. is there a set way to make all of the loops connect? So rather than having a huge N-Gon you instead have a bunch of polys connected to the stuff round the side.
Replies
--ASSUMED: in editable poly mode, with one or more borders selected. Edit_Poly modifiers not supported. allEdjs = polyop.getEdgeSelection $ as array curSubOBJlvl = subobjectLevel subobjectLevel = 2 --Find out how many borders their are among the edge selection, and store them each separately. allBorders = #() allBordersFlat = #() curLoop = 1 for i in allEdjs do ( if ((finditem allBordersFlat i) == 0) do ( $.EditablePoly.SetSelection #Edge ((polyop.getBorderFromEdge $ i) as bitArray) allBorders[curLoop] = $.EditablePoly.GetSelection #Edge as array join allBordersFlat allBorders[curLoop] curLoop += 1 ) ) curLoop = 1 while (allBorders.count >= curLoop) do ( --Crawl from the first edge to two adjacent ones, then afterwords do the rest in a loop. curVrts = polyop.getVertsUsingEdge $ allBorders[curLoop][1] as array curEdjs = polyop.getEdgesUsingVert $ curVrts[1] as array buff = polyop.getEdgesUsingVert $ curVrts[2] as array join curEdjs buff keptEdjs = #() for i in curEdjs do (if ((finditem allBorders[curLoop] i) != 0 and allBorders[curLoop][1] != i) do (append keptEdjs i)) $.EditablePoly.SetSelection #Edge (keptEdjs as bitArray) --quick and dirty way to remove duplicates keptEdjs = $.EditablePoly.GetSelection #Edge as array --Start loops-- finalEdjs = #(keptEdjs[1], keptEdjs[2]) latestEdjs = #(keptEdjs[1], keptEdjs[2]) loopKill = 0 for i in allBorders[curLoop] do ( temp = #() for k in latestEdjs do ( curVrts = polyop.getVertsUsingEdge $ k as array curEdjs = polyop.getEdgesUsingVert $ curVrts[1] as array buff = polyop.getEdgesUsingVert $ curVrts[2] as array join curEdjs buff buff = #() for i in curEdjs do (if ((finditem allBorders[curLoop] i) != 0 and (finditem latestEdjs i) == 0 and allBorders[curLoop][1] != i) do (append buff i)) buff = join buff finalEdjs $.EditablePoly.SetSelection #Edge (buff as bitArray) --quick and dirty way to remove duplicates buff = $.EditablePoly.GetSelection #Edge as array finalEdjs = (buff as bitArray) temp = (buff as bitArray) if ((finalEdjs as array).count == (allBorders[curLoop].count - 2)) do (loopKill = 1 ; exit;) ) latestEdjs = temp if loopKill == 1 do (print "killed" ; exit) ) $.EditablePoly.SetSelection #Edge (finalEdjs as bitArray) $.EditablePoly.Bridge () curLoop += 1 ) subobjectLevel = curSubOBJlvl[ame="
[ame="
Holy crap exactly like that. I'm surprised it isn't a standard feature. Thanks to both of you for the help
So no one notices that triangle at the mid/bottom left side?
oppsy was i not supposed to mention it.
oppsy, just saying