Go Back   Cockos Incorporated Forums > REAPER Forums > REAPER Feature Requests

Reply
 
Thread Tools Display Modes
Old 05-25-2022, 07:23 AM   #1
Buy One
Human being with feelings
 
Buy One's Avatar
 
Join Date: Sep 2019
Posts: 1,134
Default Storing track heights after applying vertical zoom

Track heights are stored when changed manually. But after applying View: Zoom vertically (MIDI CC relative/mousewheel) the stored values are cleared and tracks get squeezed down when windows in the bottom dock are opened.

Scripting it isn't viable because with API track height can't be set other than via chunk which might get too taxing on the resources.

__________________
https://github.com/Buy-One/REAPER-scripts (175)
REAPER is a DAW whose user guide file is larger than its installation file

Last edited by Buy One; 05-25-2022 at 08:02 AM.
Buy One is offline   Reply With Quote
Old 05-25-2022, 01:04 PM   #2
Edgemeal
Human being with feelings
 
Edgemeal's Avatar
 
Join Date: Apr 2016
Location: ASU`ogacihC
Posts: 3,913
Default

One day I found out that if you call 'Increase & Decrease selected track heights a little bit', and then show bottom docker the tracks don't resize, so made a script to toggle the bottom docker (and preserve track heights).

Code:
function RunCustomAction(id)
  reaper.Main_OnCommand(reaper.NamedCommandLookup(id), 0)
end

if reaper.GetToggleCommandState(40279) == 1 then -- bottom docker open
   reaper.Main_OnCommand(40279, 0) -- View: Show docker / (close it)
else
  reaper.PreventUIRefresh(1)
  RunCustomAction('_SWS_SAVESEL') ----------- SWS: Save current track selection
  reaper.Main_OnCommand(40296, 0) -- Track: Select all tracks
  reaper.Main_OnCommand(41327, 0) -- View: Increase selected track heights a little bit
  reaper.Main_OnCommand(41328, 0) -- View: Decrease selected track heights a little bit
  -- reaper.Main_OnCommand(40297, 0) -- Track: Unselect all tracks -- (Not Needed ?) 
  RunCustomAction('_SWS_RESTORESEL') -------- SWS: Restore saved track selection
  reaper.Main_OnCommand(40279, 0) -- View: Show docker
  reaper.PreventUIRefresh(-1)
end

reaper.defer(function () end)
Edgemeal is offline   Reply With Quote
Old 05-26-2022, 01:31 AM   #3
Buy One
Human being with feelings
 
Buy One's Avatar
 
Join Date: Sep 2019
Posts: 1,134
Default

Wow, great method, thanks a lot for sharing
__________________
https://github.com/Buy-One/REAPER-scripts (175)
REAPER is a DAW whose user guide file is larger than its installation file
Buy One 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 08:00 AM.


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