I discovered a strong dependency between generating and accessing subprojects and two options related to rendering subprojects - details are described here:
https://forum.cockos.com/showthread....ght=subproject
I.e. the two options 42334 and 42333 need to be switched off in order for the handling of the subprojects to work properly. To round up this topic, following the piece of code I use in one of my scripts:
--------------------------------------------------------
--Switch off
-- - prompt for rendering
-- - no automated rendering
--Remember current status
--------------------------------------------------------
if reaper.GetToggleCommandState(42334) == 1 then
B_PromtForRend = true
reaper.Main_OnCommand(42334, 0)
reaper.RefreshToolbar2(0, 42334)
end
if reaper.GetToggleCommandState(42333) == 1 then
B_NoAutoRend = true
reaper.Main_OnCommand(42333, 0)
reaper.RefreshToolbar2(0, 42333)
end
The order at which the options are set is crucial due to the dependency that exists between the two. Please also note that, if those options are part of a toolbar, the refresh function needs to be called in order for the icon to indicate the status correctly.
At the end of the script, the settings are put back to their original state:
if B_NoAutoRend == true then
reaper.Main_OnCommand(42333, 0)
reaper.RefreshToolbar2(0, 42333)
end
if B_PromtForRend == true then
reaper.Main_OnCommand(42334, 0)
reaper.RefreshToolbar2(0, 42334)
end