Fizick
6th January 2008, 15:25
Recently I discover rarely used and not very documented keyword NULL as dummy clip substitution.
But how to detect and properly process NULL clip in plugin?
Example Script:
...
MVFlow(..., pelclip=null)
If I do not define pelclip:
MVFlow(...)
then I can use agrs[5].IsDefined() to detect if pelclip was given. Current code is:
(args[5].Defined() ? args[5].AsClip() : 0), // pelclip
But args[5].AsClip() == NULL (or 0) do not work for NULL clip.
And seems NULL clip is not 0.
But how to detect and properly process NULL clip in plugin?
Example Script:
...
MVFlow(..., pelclip=null)
If I do not define pelclip:
MVFlow(...)
then I can use agrs[5].IsDefined() to detect if pelclip was given. Current code is:
(args[5].Defined() ? args[5].AsClip() : 0), // pelclip
But args[5].AsClip() == NULL (or 0) do not work for NULL clip.
And seems NULL clip is not 0.