Filter database

vdcrim edited this page Mar 9, 2013 · 9 revisions

##Importing function definitions##

To import definitions from this database just open the AviSynth function definition dialog (Options menu) and select Import -> Import from wiki. The list of available functions will appear, with already customized by the user function definitions in red. You can use the contextual menu to select all/none.

##Contributing to the database##

To simplify writing a new function definition put the plugin or avsi file on the autoload directory and make sure that the include autoloaded functions from plugins/avsi options are checked (Options menu -> Program Settings -> Autocomplete). That way in many cases you'll only have to add or revise the default values on its entry on the AviSynth function definition dialog. This is the syntax:

FunctionName(
clip,
int a,
bool b=true,
int "c"=10 (0 to 30),
[string "d"],
)

This definition will produce FunctionName(?, true, c=10) on autocomplete, while the calltip will show all five possible arguments.

  • In the case of plugin functions the function name must be preceded by the plugin, e.g. TDecimate from TIVTC.dll -> TIVTC_TDecimate.
  • Each parameter must be on its own line, ending with a comma, in the form type var_name=default (slider info). Everything but type is optional but it's encouraged to make it as complete as possible.
  • Optional parameters must have its name surrounded by double quotes.
  • To make an optional parameter don't appear on the autogenerated autocomplete string, enclose the whole line except the final comma in square brackets. This can have multiple uses:
    • Parameters without a default value.
    • Parameters whose default value depends on another, e.g. a preset.
    • Parameters unique to a mod.
    • Parameters rarely used for filters with a huge number of them.
  • For adding the slider info use the define sliders option. Guessed max/min limits are better than not slider info at all. In the case of filename strings you can insert the accepted extensions in 'value list', e.g. "*.txt", "*.log".
  • Color parameters (int) should have their default value start with $ and not slider info.
  • If a function accepts an undefined number of arguments of the same type, this can be signaled by adding a [, ...], e.g. clip [, ...],
Clone this wiki locally
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.