|
|
|
03-25-2017, 01:36 PM
|
#1
|
Human being with feelings
Join Date: Apr 2011
Posts: 3,451
|
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.
|
|
|
03-25-2017, 01:48 PM
|
#2
|
Human being with feelings
Join Date: Sep 2008
Location: Calgary, AB, Canada
Posts: 6,551
|
+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.
|
|
|
03-25-2017, 02:25 PM
|
#3
|
Human being with feelings
Join Date: Apr 2011
Posts: 3,451
|
Quote:
Originally Posted by Lokasenna
Ideally it would include a parameter to choose the project path, recording path, or secondary recording path.
|
Great idea!
|
|
|
01-23-2018, 09:59 AM
|
#4
|
Human being with feelings
Join Date: Oct 2017
Posts: 27
|
+1 as well - Can we get the recording or media path somehow ? cheers !
|
|
|
01-23-2018, 11:33 AM
|
#5
|
Human being with feelings
Join Date: Oct 2007
Location: home is where the heart is
Posts: 12,096
|
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)
|
|
|
01-25-2018, 08:32 AM
|
#6
|
Human being with feelings
Join Date: May 2017
Location: Leipzig
Posts: 6,622
|
+1
It should return all three paths as three returnvalues.
Always annoyed me..
|
|
|
01-22-2020, 01:40 PM
|
#7
|
Human being with feelings
Join Date: Feb 2017
Location: Hollywood, CA
Posts: 125
|
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.
|
|
|
01-22-2020, 01:55 PM
|
#8
|
Administrator
Join Date: Mar 2007
Location: NY
Posts: 15,751
|
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.
|
|
|
01-31-2020, 10:23 PM
|
#9
|
Human being with feelings
Join Date: Feb 2017
Location: Hollywood, CA
Posts: 125
|
Awesome, thanks!
Quote:
Originally Posted by schwa
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)
|
|
|
|
12-13-2020, 11:44 AM
|
#10
|
Human being with feelings
Join Date: Sep 2019
Posts: 1,134
|
Quote:
Originally Posted by TobyAM
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:
Code:
:gsub("(.*)\\.*$","%1") .. "\"
like
Code:
local pro_path = reaper.GetProjectPath(0 , '' ):gsub("(.*)\\.*$","%1") .. "\"
|
thank you, 2 corrections:
_, pro_path = reaper.GetProjectPath Ex(0 , '') or pro_path = reaper.GetProjectPath('')
backslash needs escape, was probably eaten up by the forum code another method
proj_dir = select(2,reaper.EnumProjects(-1, '')):match("^(.+[\\/])")
Last edited by Buy One; 12-13-2020 at 11:49 AM.
|
|
|
Thread Tools |
|
Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -7. The time now is 08:53 AM.
|