Re: using FxParameterSettingAPI
Re: using FxParameterSettingAPI
- Subject: Re: using FxParameterSettingAPI
- From: Dave Howell <email@hidden>
- Date: Mon, 14 May 2007 08:51:31 -0700
On May 14, 2007, at 8:15 AM, Paul Schneider wrote:
When I use '[FxCustomParameterActionAPI startAction:self]' I receive an error that FxCustomParameterActionAPI was not declared. Should I not be starting the Setting API? Tried that as well and receive the same error. Ideas?
Sorry, I was using shorthand pseudocode. You want to retrieve the FxCustomParameterActionAPI object and call -startAction on that. See this code snippet from the SimpleMatte example:
id actionAPI = [_apiManager apiForProtocol:@protocol(FxCustomParameterActionAPI)]; if ( actionAPI == NULL ) return NULL; [actionAPI startAction:self];
id getAPI = [_apiManager apiForProtocol:@protocol(FxParameterRetrievalAPI)]; if ( getAPI != NULL ) { // Get Point array PointArray *pointArray = NULL; [getAPI getCustomParameterValue:&pointArray fromParm:kPaintParamID]; points = [pointArray points]; } [actionAPI endAction:self];
It doesn't appear that SimplePaint does this, so this might not be required.
Just FYI, the reason SimpleMatte needs to use startAction/endAction, but SimplePaint doesn't, is that SimpleMatte's NSView event handler methods can get called by the OS at any time, so the host app (well, Motion, specifically) needs to set up some state information. It does this in startAction. But SimplePaint's on-screen control event methods are called by the host app, not the OS, so the app will already have set up that state.
Dave
|
_______________________________________________
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