Old 06-04-2019, 08:32 AM   #1
nofish
Human being with feelings
 
nofish's Avatar
 
Join Date: Oct 2007
Location: home is where the heart is
Posts: 12,108
Default API: load project template (DONE)

DONE (REAPER v5.983)

(from here)

We can load a project template via Main_openProject() (as a project template is 'just' an .rpp) but it's different to doing it via 'File -> Open project template', because this way Reaper remains in a 'clean' state (as in no 'normal' / non-template project opened), e.g. the default 'Save as..." path is not changed.

Last edited by nofish; 08-29-2019 at 04:37 PM.
nofish is offline   Reply With Quote
Old 06-04-2019, 09:07 AM   #2
lexaproductions
Human being with feelings
 
Join Date: Jan 2013
Posts: 1,128
Default

+1
I also think that this is needed.
lexaproductions is offline   Reply With Quote
Old 06-04-2019, 09:34 AM   #3
Gerry P
Human being with feelings
 
Gerry P's Avatar
 
Join Date: Jan 2009
Location: Ontario, Canada
Posts: 1,459
Default

+1 - this has been needed for quite a while
__________________
The future ain't what it used to be. Yogi Berra
Gerry P is offline   Reply With Quote
Old 06-04-2019, 09:46 AM   #4
solger
Human being with feelings
 
solger's Avatar
 
Join Date: Mar 2013
Posts: 5,852
Default

+1 for this from me, as well
__________________
ReaLauncher
solger is offline   Reply With Quote
Old 07-05-2019, 10:54 AM   #5
Klangfarben
Human being with feelings
 
Join Date: Jul 2016
Location: Los Angeles, CA
Posts: 1,701
Default

+1. Although workarounds have been attempted for this, no suitable solution exists yet. Sorely needed.
Klangfarben is offline   Reply With Quote
Old 08-23-2019, 01:44 PM   #6
Justin
Administrator
 
Justin's Avatar
 
Join Date: Jan 2005
Location: NYC
Posts: 15,737
Default

Edit: making Main_openProject() support noprompt: and template: prefixes

Last edited by Justin; 08-23-2019 at 09:26 PM.
Justin is offline   Reply With Quote
Old 08-23-2019, 01:52 PM   #7
lexaproductions
Human being with feelings
 
Join Date: Jan 2013
Posts: 1,128
Default

Woohoo!!!
lexaproductions is offline   Reply With Quote
Old 08-24-2019, 02:58 AM   #8
solger
Human being with feelings
 
solger's Avatar
 
Join Date: Mar 2013
Posts: 5,852
Default

Cool. Thanks Justin.
__________________
ReaLauncher
solger is offline   Reply With Quote
Old 06-13-2020, 06:37 AM   #9
rasmusmarshagen
Human being with feelings
 
Join Date: May 2020
Posts: 53
Default Please explain how.

Hi, I wanna achieve exactly this.

Can someone please explain how is this written in code, for the noobs?

So create a NEW Reascript in .lua-code?

Like this:

Main_openProject(HARDDRIVE-PATH-TO-MY-TEMPLATEFILE? Or just .RPP file?)

No idea at all how to write the following in code:

support noprompt: and template: prefixes


Thank you
rasmusmarshagen is offline   Reply With Quote
Old 06-13-2020, 06:52 AM   #10
solger
Human being with feelings
 
solger's Avatar
 
Join Date: Mar 2013
Posts: 5,852
Default

Quote:
Originally Posted by rasmusmarshagen View Post
Can someone please explain how is this written in code, for the noobs?
...
For usage in a .lua code file:
Code:
reaper.Main_openProject(name)
reaper.Main_openProject("template:" .. name)
reaper.Main_openProject("noprompt:" .. name)
The name variable is the string containing the folder path and name of the file ("HARDDRIVE-PATH-TO-MY-PROJECTTEMPLATEFILE/file-name.RPP" or "HARDDRIVE-PATH-TO-MY-TRACKTEMPLATEFILE/file-name.RTrackTemplate).
__________________
ReaLauncher

Last edited by solger; 06-13-2020 at 07:00 AM.
solger is offline   Reply With Quote
Old 06-13-2020, 07:05 AM   #11
rasmusmarshagen
Human being with feelings
 
Join Date: May 2020
Posts: 53
Default Thanks!!

Amazing!! Thank you so much
rasmusmarshagen 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 06:08 AM.


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