all tracks to same track height
Hi,
There's a few similar posts, but nothing quite like what I'm looking for.
I'm looking to resize all tracks in the session to the same height with a single command. Thanks
- OOwen Granich-Young @Owen_Granich_Young
I published a Track Heights package for you, I found code on the fourm and adapted to 2 templates, One that only changes the size of your selected tracks if pressed normally, or ALL tracks if you hold the option key when pressing your desired track height. And one that is all to specified track height at the click of a button. I believe the orignal Track Height Script I iterated from can be found on the forum (PT) Change height of selected tracks to "micro" (or other...) #post-10 Chris shaw wrote a great one that he kindly replied to me to help make it an ALL TRACK move. His toggles through a few instead of having specifc buttons for each size, that may be more to your liking. Both need a track to already be selected. It seems like it would be easy for somebody with actual coding skill to tell it to grab 'any old track' before performing the ALL TRACKS verison, maybe someone can put that itteration into the code below and I'll update the package.
DO to all tracks (still requires a track to be selected currently)
const trackSize = event.props.trackSize; sf.keyboard.modifiers({ isOption: true, }); var size = trackSize; var f = sf.ui.proTools.selectedTrack.frame; var popupMenu = sf.ui.proTools.selectedTrack.popupMenuOpenFromElement({ relativePosition: { x: f.w - 10, y: 5 }, isOption: true, }).popupMenu; popupMenu.menuClickPopupMenu({ menuPath: [size] });
Bests,
Owen- B@briannaas
Hi Owen,
Thanks so much! You'll have to forgive me, I don't understand much of javascript. I'm not sure where I'm supposed to add the track size variable and I'm getting an error no matter what.
21.09.2021 15:41:31.96 [Backend]: >> Command: all_small [user:ck7w3gmwh00010410d42ukav4:cktunik1k0001wa1007pzinu0]
JavaScript error with InnerException: null
!! Command Error: all_small [user:ck7w3gmwh00010410d42ukav4:cktunik1k0001wa1007pzinu0]:
TypeError: Cannot read property 'trackSize' of null
(all_small line 1)- OOwen Granich-Young @Owen_Granich_Young
All good buddy, I don't either!
Did you download the Package from the store? This is the template, it won't work on it's own. The package (under my name in the store) has all the presets ready to go as buttons.
I hope that helps (and I hope it works!)
Bests,
Owen
- BIn reply tobriannaas⬆:@briannaas
oh my lord you're a genius. Yes! Sorry, I didn't realize you had a package. This is perfect, thanks!