Go Back   Cockos Incorporated Forums > REAPER Forums > REAPER Q&A, Tips, Tricks and Howto

Reply
 
Thread Tools Display Modes
Old 06-23-2022, 08:55 AM   #1
Petite God
Human being with feelings
 
Join Date: Oct 2018
Posts: 26
Default Script to toggle between all states of compact folder view

There's a script I have that toggles between the most compact view of all of the slave tracks of a folder and the largest, fully expanded view. This, however, leaves out the very useful medium zoom-out view. Could anyone edit the script so it includes the medium zoom option?



function main() // local (i, j, item, take, track)
(
Undo_BeginBlock(); // Begining of the undo block. Leave it at the top of your main function.

// LOOP TRHOUGH SELECTED TRACKS
i = 0; // INITIALIZE loop through selected tracks
loop(CountSelectedTracks(0), (track = GetSelectedTrack(0, i)) ? (
// ACTIONS
GetMediaTrackInfo_Value(track, "I_FOLDERCOMPACT") == 0 ? (
SetMediaTrackInfo_Value(track, "I_FOLDERCOMPACT", 2);
)
SetMediaTrackInfo_Value(track, "I_FOLDERCOMPACT", 0);
);
); // ENDIF TRACK
i += 1; // INCREMENT loop through selected tracks
); // ENDLOOP through selected tracks
Undo_EndBlock("My action", -1); // End of the undo block. Leave it at the bottom of your main function.
);



Thanks
Petite God is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 04:08 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.