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
456 stars 85 forks source link

API: Refresh SWS Notes Window #1885

Closed X-Raym closed 3 months ago

X-Raym commented 3 months ago

Hi,

We have reaper.NF_UpdateSWSMarkerRegionSubWindow() to refresh the SWS notes window, but these doesnt work in other cases (item notes for eg).

Would be nice to have a generic Refresh SWS Notes window function.

Not too high priority.

Best,

cfillion commented 3 months ago

In which case does the SWS Notes window not correctly refresh by itself? That sounds like the root cause that should be fixed instead of adding a manual refresh function...

X-Raym commented 3 months ago

Basically, when the source of what it displays change by scripting. Region Subs, Markers Subs have their refresh function. But Items Notes doesnt seems to have it. I had to click on anothet item and get back to original one to refresh an item altered woth GetSetMediaItemInfo_Strong P_NOTES.

X-Raym commented 3 months ago

Here is a demo:

img

item = reaper.GetSelectedMediaItem(0,0)

str = ""A""

reaper.GetSetMediaItemInfo_String( item, "P_NOTES", str, true )

reaper.UpdateArrange()

reaper.UpdateTimeline()

As you can see, SWS Notes window also dont refresh automatically when modifying the source properties, even with native editing.

Note: I dont know how and why but it seems to work with your interactive reascript console:

img

I wonder what function is used in your script to allow such refreshing from script side

X-Raym commented 3 months ago

Oh, I checked your script and it seems the trick is this:

reaper.TrackList_AdjustWindows(false)
reaper.UpdateArrange()

This update notes window when using reascript.

Well, I guess we can close this then, unless we found a case where this doesnt work (havent tried with projectnotes and extra project notes)