GetSubProjectFromSource seems to be returning nil, at least with Lua ReaScript, so it's either buggy or it needs to be used in some non-obvious way.
Functions taking in a ReaProject are not going to work if the ReaProject is nil or the functions end up using the currently active project tab.
GetMediaSourceFileName(src, "") does return the file name of the .rpp file, though. (Not sure if that's useful for you.)
__________________
I am no longer part of the REAPER community. Please don't contact me with any REAPER-related issues.
|