Re: variesOverTime method of an FxPlug
Re: variesOverTime method of an FxPlug
- Subject: Re: variesOverTime method of an FxPlug
- From: Paul Schneider <email@hidden>
- Date: Wed, 30 Jan 2008 16:27:36 -0500
Hi, Brian,
-variesOverTime means that the plugins output changes over time, even
if all of the parameters *and the input frames* remain constant.
For example, if you add a still image to the timeline in FCP, the
image will be repeated for several seconds by default. If you add a
filter like "Brightness" to this image, and don't set any keyframes,
the output will be the same for the entire still. So this filter
isn't considered to vary over time.
However, if you add a filter like "Earthquake", the output will be
different from frame to frame, because the filter adds some jitter
which is different for each frame. So this filter does "vary over
time", even if all of its inputs do not.
A good rule of thumb is that if you use the current render time
(renderInfo.frame) in your calculations, then your plugin should
return YES from -variesOverTime.
- Paul
On Jan 30, 2008, at 4:12 PM, Brian wrote:
I am a little confused about the "variesOverTime" method.
The default FxPlug template for a "filter" type FxPlug
(which implements "brightness" by default),
has the following code for "variesOverTime":
- (BOOL)variesOverTime
{
return NO;
}
But doesn't the explanation comment above the code
seems to indicate that this code is wrong?
Since the two different frames will typically
yield different results, even with the
same parameter settings? (eg "brightness" stays = 1.0)
So, frame 1 results can't be cached and reused for frame 2's results.
The comment (and also API help doc) states:
//---------------------------------------------------------
// variesOverTime
//
// This method should return YES if the plug-in's output can
// vary over time even when all of its parameter values remain
// constant. Returning NO means that a rendered frame can be
// cached and reused for other frames with the same parameter
// values.
//---------------------------------------------------------
Could anyone clarify this for me?
Is this a mistake in the documentation,
or a mistake in the default code,
or am I misunderstanding the docs?
Thanks.
-- Brian
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Pro-apps-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Pro-apps-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden