reaper-oss / sws

The SWS extension is a collection of features that seamlessly integrate into REAPER, the Digital Audio Workstation (DAW) software by Cockos, Inc
https://www.sws-extension.org/
MIT License
455 stars 85 forks source link

FR API: Item Group Name (Get/Set) #1144

Open X-Raym opened 5 years ago

X-Raym commented 5 years ago

Hi,

Would it be possible to get/set items group name with SWS (if SWS can access such values) ?

It is located on .rpp tree root.

<REAPER_PROJECT 0.1 "5.974/x64" 1556546048
  GROUP 1 TestGroupName

It's based on a certain group index.

Cheers !

nofishonfriday commented 5 years ago

Maybe post in Reaper FR forum also (if you haven't already)? I mean can never hurt to try. :P

X-Raym commented 5 years ago

@nofishonfriday mespotine is exploring this solution but this will be lua code only, not accessible for Python and other language :P Though the logic of its code may maybe be ported to C++ ?

Anyway, the hardest part is the SET function...

I wonder how far he can go with it anyway !

nofishonfriday commented 5 years ago

@X-Raym I've toyed around with mespotine's idea (reading from a temp render queue file), mainly because I'm interested in getting the <POOLEDENV chunk for SWS, which we currently can't get via API either.

Hm..it seems to work but it's rather slow (writing a rq file than reading from it), certainly not suitable for background scripts, maybe for spare calls. Not sure yet if it will make it in SWS eventually, but you can check it out if you're interested (if so, tell me how it goes, if you think it'd be useful. You should at least be able to parse the items group names from it., and other stuff from project chunk we can't access currently) Better of course if we would get dedicated API functions for it. A 'set items group names function' I'm not able to do anyway it seems, yeah that's the actual hard part. :P

sws_NF_GetRenderQueueStateChunk(Winx64).zip

success, chunk = reaper.NF_GetRenderQueueStateChunk("")

reaper.ClearConsole()
reaper.ShowConsoleMsg(chunk)
X-Raym commented 5 years ago

Thanks for having explored this ! :)

So yes maybe native API will be better ^^