Re: Determining if a well image is used without actually getting the image
Re: Determining if a well image is used without actually getting the image
- Subject: Re: Determining if a well image is used without actually getting the image
- From: Emile Tobenfeld <email@hidden>
- Date: Tue, 1 May 2007 21:18:40 -0400
Title: Re: Determining if a well image is used without
actually g
At 9:00 PM -0400 5/1/07, Paul Schneider wrote:
Hi, Emile,
are you calling this code from your
render method?
Hi Paul
Sometimes yes and sometimes no.I could restrict it to render.
(-parameterChanged seems a more logical place to update UI, but I
already have to defer changing the UI until render time when a
popup changes because of a bug I reported earlier.)
The results I am seeing are the same regardless of when I call
it.I even tried calling it directly from the top of render with
GetLayerUsed(self, 29);, where 29 is the
AEControlID for the well layer.The printf's at the bottom give the
same results however I call this.
double startTime = [timingApi
startTimeOfImageParm:fxPlugParamID
forEffect:filterID];
double dur = [timingApi
durationOfImageParm:fxPlugParamID
forEffect:filterID];
FxFieldOrder fp = [timingApi
fieldOrderForImageParm:fxPlugParamID
forEffect:filterID];
bool ret = (startTime != kFxDuration_Undefined);
printf("AE
= Used %d s %6.3f d %6.3f fp
%d\n",
aeControlID, ret, startTime, dur, fp);
The docs say:
Some API's are only available during
render
The FxTimingAPI and FxTemporalImageAPI
will only work correctly if called during one
of the following selectors:
* getOutputWidth: height:
* frameSetup
* renderOutput
* frameCleanup
In addition, sampling keyframed
parameters at arbitrary times will only work during
these selectors.
- Paul
On May 1, 2007, at 8:48 PM, Emile
Tobenfeld wrote:
Dave
I'm finding that, in FCP, startTimeOfImageParm:forEffect and ,
durationOfImageParm:forEffect return -1 regardless of whether
or not there is a layer, and
fieldOrderForImageParm:forEffect returns 0
regardless.
In Motion
startTimeOfImageParm returns 0, and the others return what they
do in FCP.
Does the id<FxBaseEffect> in the declaration of
these methods mean that I need to do something other than pass the id
of the filter instance.
The code snippet in question
is
bool
GetLayerUsed(void *instance, int aeControlID)
{
id filterID = (id)instance;
UInt32 fxPlugParamID =
GetFxPlugParamIDFromAEControlD(aeControlID);
BaseBCCFxPlugFilter*
theFxPlugFilter = filterID;
id timingApi = [theFxPlugFilter->_apiManager
apiForProtocol:@protocol(FxTimingAPI)];
double startTime = [timingApi
startTimeOfImageParm:fxPlugParamID
forEffect:filterID];
Thanks.
At 11:15 AM -0700 4/30/07, Dave Howell
wrote:
Hi Emile. Look at FxTimingAPI.h, and
search for kFxDuration_Undefined. It will be returned by a
couple of methods when an image parameter is not connected. Namely, by
the methods
startTimeOfImageParm:forEffect:,
durationOfImageParm:forEffect:, and
fieldOrderForImageParm:forEffect:.
Dave
On Apr 30, 2007, at 11:11 AM, Emile
Tobenfeld (a. k. a Dr. T) wrote:
It would be useful for us to be able to
determine whether a well image is used without actually getting the
bitmap. Is this possible. If not, consider it a feature request.
--
"Now, here,
you see, it takes all the running you can do, to keep in the same
place. If you want to get somewhere else, you must run at least twice
as fast as that!" -- The Red Queen
Emile Tobenfeld, Ph. D.
Video Producer
Image Processing Specialist
Video for your HEAD!
Boris FX
http://www.foryourhead.com
http://www.borisfx.com
_______________________________________________
Do not post admin requests to the list.
They will be ignored.
Pro-apps-dev mailing list (email@hidden)
Help/Unsubscribe/Update your
Subscription:
le.com
This email sent to email@hidden
--
"Now, here, you see, it takes all the
running you can do, to keep in the same place. If you want to get
somewhere else, you must run at least twice as fast as that!" --
The Red Queen
Emile Tobenfeld, Ph. D.
Video Producer
Image Processing Specialist
Video for your HEAD!
Boris FX
http://www.foryourhead.com
http://www.borisfx.com
_______________________________________________
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