View Single Post
Old 26th September 2008, 14:00   #15  |  Link
MOmonster
Registered User
 
Join Date: May 2005
Location: Germany
Posts: 495
Quote:
Originally Posted by Gavino View Post
Perhaps you started out thinking (long ago) that each ScriptClip runs in a separate variable scope.

They don't - that's why you can get unexpected interference between different ScriptClip instances, and why GRunT provides the local=true option.
Yes, this and the need to initialise the variables are the reasons.
This script indeed works well:
Code:
ScriptClip (last, """ cfr=current_frame
now = cfr<2 ? 0 : next
next = AverageLuma(last)
last.subtitle(string(now)).subtitle(string(next),y=16)""")
I will test GRunT soon. Maybe next srestore release won´t use global variables anymore.

@Didee
Yes I remember, first Cdeint releases use practical the same variables as restore24.
MOmonster is offline   Reply With Quote