When setting a P_EXT for envelopes with reaper.GetSetEnvelopeInfo_String(Envelope, "P_EXT:example", "Some value", true)
and after use reaper.BR_EnvSetProperties , those P_EXT disappear. but if repeated they stay:
Check the gif: https://imgur.com/pJVn4AZ
Using this lua :
--====================================================================
function msg(param)
reaper.ShowConsoleMsg("\n"..tostring(param));
end
Envelope = reaper.GetSelectedEnvelope(0)
--====================================================================
if Envelope == nil then msg ("Select an envelope") return false end
--====================================================================
reaper.GetSetEnvelopeInfo_String(Envelope, "P_EXT:example", "Some value", true)
retval, value = reaper.GetSetEnvelopeInfo_String(Envelope, "P_EXT:example", "", false)
msg ("P_EXT:example holds value:"..value)
local br_env = reaper.BR_EnvAlloc(Envelope, false )
reaper.BR_EnvSetProperties(
br_env,
true,
true,
true,
true,
10,
0,
true
)
--====================================================================
reaper.BR_EnvFree( br_env, true )
-- after using reaper.BR_EnvAlloc the value disappears but only on the first run on that envelope
retval, value = reaper.GetSetEnvelopeInfo_String(Envelope, "P_EXT:example", "", false)
msg ("P_EXT:example holds value:"..value)
When setting a P_EXT for envelopes with reaper.GetSetEnvelopeInfo_String(Envelope, "P_EXT:example", "Some value", true)
and after use reaper.BR_EnvSetProperties , those P_EXT disappear. but if repeated they stay:
Check the gif: https://imgur.com/pJVn4AZ
Using this lua :
--====================================================================
function msg(param)
reaper.ShowConsoleMsg("\n"..tostring(param));
end
Envelope = reaper.GetSelectedEnvelope(0)
--====================================================================
if Envelope == nil then msg ("Select an envelope") return false end
--====================================================================
reaper.GetSetEnvelopeInfo_String(Envelope, "P_EXT:example", "Some value", true)
retval, value = reaper.GetSetEnvelopeInfo_String(Envelope, "P_EXT:example", "", false)
msg ("P_EXT:example holds value:"..value)
local br_env = reaper.BR_EnvAlloc(Envelope, false )
reaper.BR_EnvSetProperties(
br_env,
true,
true,
true,
true,
10,
0,
true
)
--====================================================================
reaper.BR_EnvFree( br_env, true )
-- after using reaper.BR_EnvAlloc the value disappears but only on the first run on that envelope
retval, value = reaper.GetSetEnvelopeInfo_String(Envelope, "P_EXT:example", "", false)
msg ("P_EXT:example holds value:"..value)