It might already be possible, as a function can already return an array, with this amended syntax (and renaming macroTrim to If
)
Code:
If(condition(source),filter(source),source)
But there is one big problem: the whole array would need to be evaluated before frameserving can start and it might take a while...
Maybe better:
Code:
If("condition",source,filter(source))
In a way similar to Animate, the If filter would evaluate the condition for each frame. The
condition function would return a single bool, and take as argument the source clip (second argument of If) and the frame number. The syntax could be extended to allow for
condition functions with more parameters.