RPR GetSetObjectState
From CockosWiki
This function is superceded and hidden from ReaScript at the moment --Mike 16:50, 11 November 2009 (PST)
Main Page > REAPER Documentation > ReaScript > ReaScript API, Functions > RPR GetSetObjectState
Main Page > REAPER Documentation > REAPER API > REAPER API Functions > RPR GetSetObjectState
Contents |
GetSetObjectState()
char* GetSetObjectState(void* obj, char* str)
This function gets or sets the state of an object (of types track, item or envelope) as an xml/rpp chunk, str="" to get the string from the .rpp defining the current value (in which case you must call FreeHeapPtr when done)
str = "new value" to set the state, setting the object state returns ""
Parameters
void* obj, A valid pointer, to a valid object of a supported type char* str, Either "" or the new value for that object state
Returns
char*
Examples
Perl
# # Adds an envelope point at time=1 second, value=1.0: # use strict; use warnings; use constant CURR_PROJ => 0; my ($env, $chunk); $env = RPR_GetSelectedTrackEnvelope(CURR_PROJ); ($chunk) = RPR_GetSetObjectState($env, ""); RPR_ShowConsoleMsg("input rppxml:\n" . $chunk . "\n"); $chunk =~ s/>/PT 1.0 1.0 0 0 1\n>/; RPR_ShowConsoleMsg("output rppxml:\n" . $chunk . "\n"); RPR_GetSetObjectState($env, $chunk);
Python
env = RPR_GetSelectedTrackEnvelope(0) chunk = RPR_GetSetObjectState(env, 0)[0] RPR_ShowConsoleMsg("input rppxml:\n"+chunk+"\n") chunk = re.sub(">", "PT 1.0 1.0 0 0 1\n>", chunk) RPR_ShowConsoleMsg("output rppxml:\n"+chunk+"\n") RPR_GetSetObjectState(env, chunk)
See Also
Stuff
Main Page > REAPER Documentation > ReaScript > ReaScript API, Functions > RPR GetSetObjectState
Main Page > REAPER Documentation > REAPER API > REAPER API Functions > RPR GetSetObjectState