Old 06-12-2017, 12:09 PM   #1
juliansader
Human being with feelings
 
Join Date: Jul 2009
Posts: 1,087
Default PreventUIRefresh while deferred script is running

I would like to prevent UI refreshing (in the arrange window) while a deferred script is running in the MIDI editor. (In the hope of improving the speed of the script.)

I have tried setting reaper.PreventUIRefresh(1) when the deferred script starts, and then reaper.PreventUIRefresh(-1) when the scripts eventually exits, but this doesn't seem to work. (Nor if I use any other integer.)

According to a post in another thread:
Quote:
Originally Posted by X-Raym View Post
These scripts doesn't work because a post 5.0 REAPER updates put a prevention system for "orphelin" prevent UI refresh not resolve in a scripts (for eg, if you script broke before the PreventUIRefresh(-1) call, the interface will be buggy, untill you call PreventUIRefresh(-1) yourself. The fix aims to prevent that.
This prevention system also seems to override PreventUIRefresh in deferred scripts.

So... is there any way to prevent UI refresh while a deferred script is running?
juliansader is online now   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 01:46 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2017, vBulletin Solutions Inc.