View Single Post
Old 19th September 2009, 09:47   #14  |  Link
Gavino
Avisynth language lover
 
Join Date: Dec 2007
Location: Spain
Posts: 3,431
Thanks, tin3tin. A good example of how GScript makes this sort of thing easier to write.

Of course, it can also be done in standard Avisynth by using recursive procedures, but most people would find it more natural to write an iterative construction like this directly as a loop.

Note that the GScript call need not be confined to the 'non-standard' parts of the script. For example, each function (or even both together) could be put inside GScript. This way, the GScript parser is invoked only once, rather than on each call to the function.

For example,
Code:
GScript("""
function Gradient( ... ) {
  ...
}

function GradientNoSpline( ... ) {
  ...
}
""")
Gavino is offline   Reply With Quote