stickboy
1st September 2003, 04:54
I wrote a simplistic article on avisynth.org about writing wrapper functions (http://www.avisynth.org/oldwiki/index.php?page=Wrapper) to specify your own default values or presets to filters.
Yes, it's nothing new, but I don't think it's conceptually obvious to everyone, especially to novice users.
I know there's already the filter.def (http://forum.doom9.org/showthread.php?s=&threadid=32532) system in use for user-specified default values, but I think that wrapper functions are:
more general (I'm not aware of any filters other than Donald's that use defaults files)
less work for filter authors, since authors don't need to write parsing code
almost as easy for users, especially if users are given cookie-cutter templatesAnyhow, comments and feedback are appreciated. I'm not terribly happy with how complicated the preset examples look.[1]
On a side note, I wish there were a version of Select that operated on strings[2]:
SelectByString(string s, string keyA, itemA [, string keyB, itemB [, ...]])Edit:
[1] After several revisions, I'm happier now. :)
[2] See below.
Yes, it's nothing new, but I don't think it's conceptually obvious to everyone, especially to novice users.
I know there's already the filter.def (http://forum.doom9.org/showthread.php?s=&threadid=32532) system in use for user-specified default values, but I think that wrapper functions are:
more general (I'm not aware of any filters other than Donald's that use defaults files)
less work for filter authors, since authors don't need to write parsing code
almost as easy for users, especially if users are given cookie-cutter templatesAnyhow, comments and feedback are appreciated. I'm not terribly happy with how complicated the preset examples look.[1]
On a side note, I wish there were a version of Select that operated on strings[2]:
SelectByString(string s, string keyA, itemA [, string keyB, itemB [, ...]])Edit:
[1] After several revisions, I'm happier now. :)
[2] See below.