View Single Post
Old 04-17-2016, 01:50 AM   #50
mattgoody
Human being with feelings
 
Join Date: Jan 2011
Posts: 7
Default

First of all thank you X-Raym for your work on the script, and MrJones for bringing this issue to light.

That being said I have found a workaround to the $track render variable not working with this script.

I set a noname region for the length of my project and have the script rename that region to whichever track is currently being solo'd. I just moved the reaper.GetSetMediaTrackInfo_String line above the line that adds it to the render queue and then added a line to rename the region (id=1) each time a new track is solo'd.

And then i use the $region wildcard in my render output name.

Example below: (the track i was rendering was 267 seconds long)

Code:
reaper.SetOnlyTrackSelected(track)
reaper.Main_OnCommand(40340, 0) -- Unsolo all tracks
reaper.Main_OnCommand(40728, 0) -- Solo track
		
local retval, track_name = reaper.GetSetMediaTrackInfo_String(track, "P_NAME", "new track name", false) -- Get track info
reaper.SetProjectMarker(1, true, 0, 267, track_name) -- Set region to name of track
		
reaper.Main_OnCommand(41823, 0) -- Add to render queue
I've tested it a few times and it seems to work.

Hope this helps someone
mattgoody is offline   Reply With Quote