Re: parameter getting/setting problems with FxPlug on FCP
Re: parameter getting/setting problems with FxPlug on FCP
- Subject: Re: parameter getting/setting problems with FxPlug on FCP
- From: Dave Howell <email@hidden>
- Date: Thu, 4 Oct 2007 08:51:15 -0700
Hi Benjamin.
On Oct 4, 2007, at 8:31 AM, Benjamin Kent wrote:
Hi,
I'm having some problems getting and setting parameters on FCP.
Basically, I'm trying to get and set keyframes on some parameters
in a callback function in response to a custom widget pushbutton
I've created.
The first problem is that it seems like I can only get the correct
value for a parameter if I ask for its value at the current frame.
Is this the expected behaviour outside of the renderOutput function?
This should work. What's happening? (Do you get an incorrect value?
Do the retrieval methods return NO? Are you unable to get the
retrieval API object?)
The second problem is more general I think. It appears that setting
keyframes only works if the user has already clicked the keyframe
button for the parameter in the ui, otherwise it just changes the
value of the parameter over the entire time range. This is
especially a problem when trying to set keyframes on hidden
parameters, as the user can't even click the keyframe button. Is
there a way to do this automatically? This behaviour seems to
manifest itself by adding the following code to the beginning of
renderOutput in the ScrollingRichText example:
id settingAPI = [_apiManager apiForProtocol:@protocol
(FxParameterSettingAPI)];
[settingAPI setIntValue: renderInfo.frame
toParm: kParamID_Size
atTime: renderInfo.frame];
return YES;
I don't believe there's any way for you to create or remove keyframes
programmatically. So you're right, you can't create keyframes for a
hidden parameter. However, you can simulate this just by making your
own animation data structure that stores its own keyframes.
Another slight problem is as follows, though I'd imagine this is an
FCP specific bug. If you add this code to the plugin, click the
keyframe button on the size parameter in the ui, then go to frame
20 it will set a keyframe as expected. Then jump to frame 50 on the
timeline - again it will set a keyframe as expected. But now if you
go to frames in between, it seems sporadic as to whether it
actually sets the keyframe.
Yeah, I'm not sure what the FCP UI rules are there. I would expect it
behave the same way as when you are editing the values manually, as a
user, but I don't know offhand what that behavior is.
Cheers
Ben
_______________________________________________
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