Notifications
Clear all
[Closed] Clicking "OK" in the Group dialog box using maxscript
Feb 23, 2021 6:02 pm
Hi, I am pretty new at max-scripting. I have a whole bunch of objects that are arranged in layers and wanting to create a loop that generates Groups for all these different layers. My issue currently is that when I am looping through this process I have to manually hit enter when the Group dialog box appears. Is there an easy way of hitting the “ok” button though maxscript? Thanks
2 Replies
Feb 23, 2021 6:02 pm
(
for i = 0 to layerManager.count - 1 do
(
layer = layerManager.getLayer i
layerName = layer.name
layerNodesArr = #()
layer.nodes &layerNodesArr
grp = group layerNodesArr name:layerName
if isValidNode grp do layer.addNode grp
)
)