Old 05-18-2021, 12:03 PM   #1
benmrx
Human being with feelings
 
benmrx's Avatar
 
Join Date: Aug 2010
Posts: 396
Default Set Item Track?

Is there a function in the API for setting an items track? I'd like to experiment with moving items to different tracks by script. I know how to move items along the timeline, but can't find a way to move items to different tracks.

The only thing I can think of doing is a cut/paste (which is currently working) but I was hoping there was a function for this somewhere.

Last edited by benmrx; 05-18-2021 at 12:33 PM.
benmrx is offline   Reply With Quote
Old 05-18-2021, 12:52 PM   #2
Edgemeal
Human being with feelings
 
Edgemeal's Avatar
 
Join Date: Apr 2016
Location: ASU`ogacihC
Posts: 3,913
Default

Try, reaper.MoveMediaItemToTrack(item, dest_track)
Edgemeal is offline   Reply With Quote
Old 05-18-2021, 01:08 PM   #3
benmrx
Human being with feelings
 
benmrx's Avatar
 
Join Date: Aug 2010
Posts: 396
Default

Quote:
Originally Posted by Edgemeal View Post
Try, reaper.MoveMediaItemToTrack(item, dest_track)
Thanks! I'll look into this more. At first glance, this function does not seem to respect the setting for 'trim content behind media items', whereas cut/paste DOES seem to respect that setting. I could certainly get a reference to the 'trim content behind media items' setting and then remove any items that are at the destination track if that setting is checked.

Either way, thank you so much!!
benmrx 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 01:39 PM.


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