Go Back   Cockos Incorporated Forums > REAPER Forums > REAPER Bug Reports

Reply
 
Thread Tools Display Modes
Old 03-25-2017, 01:36 PM   #1
amagalma
Human being with feelings
 
Join Date: Apr 2011
Posts: 1,589
Default reaper.GetProjectPath returns path + RECORD_PATH from project file

It should return the project path only without retrieving the recording path saved into the project. Or the API should be renamed to GetProjectRecordingPath

test project

test code:
Code:
path = reaper.GetProjectPath(0)
reaper.ShowConsoleMsg(path)

Last edited by amagalma; 03-25-2017 at 01:45 PM.
amagalma is offline   Reply With Quote
Old 03-25-2017, 01:48 PM   #2
Lokasenna
Human being with feelings
 
Lokasenna's Avatar
 
Join Date: Sep 2008
Location: Calgary, AB, Canada
Posts: 6,550
Default

+1

The expected behavior, given that there's no explanatory documentation, is that it should spit out a path to the .rpp.

Ideally it would include a parameter to choose the project path, recording path, or secondary recording path.
Lokasenna is offline   Reply With Quote
Old 03-25-2017, 02:25 PM   #3
amagalma
Human being with feelings
 
Join Date: Apr 2011
Posts: 1,589
Default

Quote:
Originally Posted by Lokasenna View Post
Ideally it would include a parameter to choose the project path, recording path, or secondary recording path.
Great idea!
amagalma is offline   Reply With Quote
Old 01-23-2018, 09:59 AM   #4
modraw
Human being with feelings
 
modraw's Avatar
 
Join Date: Oct 2017
Posts: 27
Default

+1 as well - Can we get the recording or media path somehow ? cheers !
modraw is offline   Reply With Quote
Old 01-23-2018, 11:33 AM   #5
nofish
Human being with feelings
 
nofish's Avatar
 
Join Date: Oct 2007
Location: home is where the heart is
Posts: 9,379
Default

Similar behaviour with the <Project Directory> shortcut in Media Explorer:

https://forum.cockos.com/showthread.php?t=189884

(which was classified as not a bug but I wouldn't fully agree)
nofish is offline   Reply With Quote
Old 01-25-2018, 08:32 AM   #6
mespotine
Human being with feelings
 
mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig, Germany
Posts: 1,898
Default

+1
It should return all three paths as three returnvalues.

Always annoyed me..
mespotine is online now   Reply With Quote
Old 01-22-2020, 01:40 PM   #7
TobyAM
Human being with feelings
 
Join Date: Feb 2017
Location: Hollywood, CA
Posts: 57
Default

If you are like me and want to hack around this but don't want to spend the minute it takes to google, add this to the end:

:gsub("(.*)\\.*$","%1") .. "\"

like

local pro_path = reaper.GetProjectPath(0 , '' ):gsub("(.*)\\.*$","%1") .. "\"

Last edited by TobyAM; 01-22-2020 at 02:03 PM.
TobyAM is offline   Reply With Quote
Old 01-22-2020, 01:55 PM   #8
schwa
Administrator
 
schwa's Avatar
 
Join Date: Mar 2007
Location: NY
Posts: 10,521
Default

The function does return the recording path, as you say. We'll update the API documentation to say this.

You can get the current project name, including path, this way:

Code:
str=""
proj, str=reaper.EnumProjects(-1, str)
reaper.ShowConsoleMsg(str)

Last edited by schwa; 01-22-2020 at 02:06 PM.
schwa is offline   Reply With Quote
Old 01-31-2020, 10:23 PM   #9
TobyAM
Human being with feelings
 
Join Date: Feb 2017
Location: Hollywood, CA
Posts: 57
Default

Awesome, thanks!
Quote:
Originally Posted by schwa View Post
The function does return the recording path, as you say. We'll update the API documentation to say this.

You can get the current project name, including path, this way:

Code:
str=""
proj, str=reaper.EnumProjects(-1, str)
reaper.ShowConsoleMsg(str)
TobyAM 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 10:51 AM.


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