1] Group a track
2] Collapse your group
3] Run snippet and watch a strange thing happen. From the snippet you would expect to end up back at the top picture, but Group 3 has become like a normal sequencer track in appearance. Clicking the triangle on group 3 does fix things again though.
--song local song = renoise.song() --loop backwards through tracks for track = #song.tracks,1,-1 do song:track(track).collapsed = false end