Log in

View Full Version : Default values for filter's parameters


dum
17th March 2008, 06:42
Guys, help me please. I'm developing a filter with a lot of parameters. I think user will get crazy defining all of them, but they are needed for the experienced people. How can I introduce default values for filter's parameters?

stickboy
17th March 2008, 10:58
Most filters are open-source, so you can look to othe filters for examples.

From BenRG's filter documentation (http://neuron2.net/www.math.berkeley.edu/benrg/avisynth-extensions.html):
You can have named arguments, by specifying the name in [brackets] before the type. Named arguments are also optional arguments; if the user omits them, they will be of the undefined type instead of the type you specify. For convenience, AVSValue offers a set of As...() functions which take default values. See avisynth.h.

dum
18th March 2008, 06:36
Oh, there is a AVSValue::Defined() function! Thank you!