Re: How to distinguish between Viewer and Inspector renders in Motion?
Re: How to distinguish between Viewer and Inspector renders in Motion?
- Subject: Re: How to distinguish between Viewer and Inspector renders in Motion?
- From: Darrin Cardani <email@hidden>
- Date: Tue, 7 Apr 2009 11:57:27 -0700
On Apr 7, 2009, at 11:51 AM, Pauli Ojala wrote:
In Motion, an FxPlug's render method gets called twice: first for
the "real" render, then for the small preview at the top of the
Inspector window. My plugin now performs analysis on the input
texture, and I don't want the analysis results to get updated when
the tiny preview is rendered, so I need a way to distinguish between
the two types of renders.
Is there a flag passed somewhere that would directly indicate which
type of frame is being rendered? (I may be missing something
completely obvious here...)
We don't supply any way to do this. However, could you do something
like cache the results of the last analysis and reuse them if it's the
same frame value? Or, it's not ideal, but you could cache a struct
holding the frame size and frame number. When asked to render, if the
frame number exists in the cache, only do the analysis if the frame
size is larger than what's stored in the cache. (Of course, you'll
have to figure out if that works for very small frames, as it may be
possible for the actual layer to be smaller than its preview, I think,
in extremely rare cases.)
Darrin
--
Darrin Cardani
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