Old 05-30-2019, 08:29 AM   #1
nofish
Human being with feelings
 
nofish's Avatar
 
Join Date: Oct 2007
Location: home is where the heart is
Posts: 9,044
Default Load project template via API?

Is there a way to "properly" load a project template via API?

By not "properly" I mean I know we can load a project template via Main_openProject(), as a project template is just an .rpp after all.

But that's different compared to loading a project template 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; 05-30-2019 at 08:50 AM.
nofish is offline   Reply With Quote
Old 05-30-2019, 09:00 AM   #2
Breeder
Human being with feelings
 
Breeder's Avatar
 
Join Date: Nov 2010
Location: Croatia
Posts: 2,136
Default

Hacky way would be to change preferences so REAPER opens a template when you do a new project. So you change preferences, start new project with the appropriate action and turn preferences back to the way they were.

I believe you must change the path to the default project template and one setting so default project template gets loaded on starting a new project. All of this is, at least in theory, supported by API. Needs to be done to test it.
Breeder is offline   Reply With Quote
Old 05-30-2019, 10:50 AM   #3
nofish
Human being with feelings
 
nofish's Avatar
 
Join Date: Oct 2007
Location: home is where the heart is
Posts: 9,044
Default

That could work, thanks.
However, before going that route (as it is kinda hacky) I think I'll try with a feature request for a proper API to do that first.
nofish is offline   Reply With Quote
Old 05-30-2019, 07:44 PM   #4
hopi
Human being with feelings
 
hopi's Avatar
 
Join Date: Oct 2008
Location: Right Hear
Posts: 15,078
Default

this probably is not a help, but awhile back Lokasenna gave me some very simple scripts that are easy to tweak so they open any directory from a toolbar... so for templates it open a normal window and I just drag and drop onto the arrange area
__________________
...should be fixed for the next build... http://tinyurl.com/cr7o7yl
https://soundcloud.com/hopikiva/angel-rain
hopi is offline   Reply With Quote
Old 05-31-2019, 05:35 AM   #5
nofish
Human being with feelings
 
nofish's Avatar
 
Join Date: Oct 2007
Location: home is where the heart is
Posts: 9,044
Default

Thanks hopi.
But doesn't help here unfortunately as I need a way to cleanly load project templates without user interaction (looking into improving this).
nofish is offline   Reply With Quote
Old 06-04-2019, 06:57 AM   #6
lexaproductions
Human being with feelings
 
Join Date: Jan 2013
Posts: 427
Default

I'm with you nofish
Have you found a way to do it?
__________________
MP 12 Core 3.46GHZ 48GB OSX10.11.6, MBP 15" 2012 OSX10.12, RME Fireface UFX, MCU,
Reaper 5, SD2, Omnisphere, Wave Altiverb, PSP, VB3, Izotope, Scuffham, Soundtoys 5, Slate All Plugins.
lexaproductions is offline   Reply With Quote
Old 06-04-2019, 08:34 AM   #7
nofish
Human being with feelings
 
nofish's Avatar
 
Join Date: Oct 2007
Location: home is where the heart is
Posts: 9,044
Default

Quote:
Originally Posted by lexaproductions View Post
Have you found a way to do it?
Other than Breeder's workaround no, but I remembered that I wanted to open a FR about it.
https://forum.cockos.com/showthread.php?t=221668

So add your support there if you like.
nofish 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 02:10 AM.


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