ScriptSpot

Forum topic · ScriptSpot How To

Run script on screenRedraw

By deathevor · 2012-09-05

Description

Hi,

Need a bit of help -
Currently my script is updating (looping) on timer, but I'm trying to run the script on screen Redraw.
Managed to set-up Callback system, but not sure how it should call the script.
Is anybody could show a sample of layout that works on callback system?

Thanks

Comments (1)

registerRedrawViewsCallback

Nevil · 2013-05-30

Hi there
you can register an viewport callback whit registerRedrawViewsCallback

for exampel:

fn redrawviews_p = print "Viewports Redrawn"
registerRedrawViewsCallback redrawviews_p

And unregister that whit unRegisterRedrawViewsCallback