Old 07-11-2015, 10:14 AM   #1
loopa
Human being with feelings
 
Join Date: Jul 2014
Posts: 207
Default Cannot find persistent Ext State data in RPP-file?

Hi! I stored some persistent ext state data and cannot find it. API call like this:

RPR_SetExtState("my_section", "a_var_name", "base_64_encoded_binary data", True)

Isn't it supposed to be in the RPP-file?



EDIT: I see now that it's stored in "reaper-extstate.ini" in "...\AppData\Roaming\REAPER".

Any one know a way to store information directly into the RPP-file? The info is related to the project so need it be stored there

Cheers,
Loopa

Last edited by loopa; 07-11-2015 at 10:51 AM.
loopa is offline   Reply With Quote
Old 07-11-2015, 01:11 PM   #2
Xenakios
Human being with feelings
 
Xenakios's Avatar
 
Join Date: Feb 2007
Location: Oulu, Finland
Posts: 8,062
Default

Reaper 5 and the new API functions in that.
__________________
I am no longer part of the REAPER community. Please don't contact me with any REAPER-related issues.
Xenakios is offline   Reply With Quote
Old 07-12-2015, 05:44 AM   #3
Xenakios
Human being with feelings
 
Xenakios's Avatar
 
Join Date: Feb 2007
Location: Oulu, Finland
Posts: 8,062
Default

Example code in Lua but should be similar for C(++), EEL and Python :

To store :

Code:
local curpos=reaper.GetCursorPosition()
reaper.SetProjExtState(0, "scriptteststate", "curpos", curpos)
To load :

Code:
local rv, curpos=reaper.GetProjExtState(0,"scriptteststate","curpos","",0)
if rv==1 then
  reaper.SetEditCurPos(curpos,false,false)
end
__________________
I am no longer part of the REAPER community. Please don't contact me with any REAPER-related issues.
Xenakios is offline   Reply With Quote
Old 07-14-2015, 05:26 AM   #4
loopa
Human being with feelings
 
Join Date: Jul 2014
Posts: 207
Default

Thanks, Xenakios! I will make my own state file for now until Reaper 5 is released!
loopa 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 05:11 PM.


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