'Collapse To' works on a specific modifier, by nature it can't really work on multiple objects. If you're trying to collapse multiple objects to a specific class of modifier you will have to change your logic as modPanel.getCurrentObject() returns a specific modifier, thus it cannot also exist on another object. Instead…
Hello people! Quick question, why won't the bellow "Collapse To" script works on a selection of objects?fn collapseTo =( for obj in selection do ( for i in obj.modifiers.count to 1 by -1 where obj.modifiers[i] == modPanel.getCurrentObject() do ( maxops.CollapseNodeTo obj i off exit ) ))collapseTo() .. from what I…
modpanel.getCurrentObject() depends on what is displayed in the modifier panel. If you select multiple objects modpanel.getCurrentObject() will return undefined. If your modifier is instanced to all the objects selected, then modpanel.getCurrentObject() will return a modifier on the first loop iteration and then subsequent…