Hi Neil, I always have problems with <Edit_Poly>.setSelection. I found the <Edit_Poly>.select is a little more predictable. The only issue is you got to set selection in two steps: first deselect current selection, then set the new one. Follows the code of the function I use to set selection both in Editable Poly objects, and Edit Poly Modifiers.
function setEdgeSelection theNode theEditObj baEdges =
(
if ((classOf theEditObj) == Editable_Poly) then
(
polyOp.setEdgeSelection theEditObj baEdges
)
else if ((classOf theEditObj) == Edit_Poly) then
(
if (modPanel.getCurrentObject() != theEditObj) do
modPanel.setCurrentObject theEditObj
local nLevel = theEditObj.getEPolySelLevel()
if (nLevel != #Edge) do
theEditObj.setEPolySelLevel #Edge
theEditObj.select #Edge (theEditObj.getSelection #Edge) select:false node:theNode
theEditObj.select #Edge baEdges select:true node:theNode
if (nLevel != #Edge) do
theEditObj.setEPolySelLevel nLevel
)
)
@ Gravey: that is nice. I’ll run some tests too, and eventually update my functions.