When Paul said you have to call [FxCustomParameterActionAPI startAction:self], that was sort of short-hand. To be more explicit, you need to retrieve the API object for the FxCustomParameterActionAPI protocol, and then send the -startAction: message to that object.
Like so (pulled from the FxCustomParameterUI.h header:
id <FxCustomParameterActionAPI> actionAPI = [apiManager apiForProtocol:FxCustomParameterActionAPI]; id <FxParameterSettingAPI> settingAPI = [apiManager apiForProtocol:FxParameterSettingAPI]; double time = [actionAPI currentTime];
[actionAPI startAction:self];
// Here, between the -startAction: and -endAction: calls, is where you can access parameters. [settingAPI setCustomParameterValue:myObject toParm:myParameterID];
[actionAPI endAction:self];
Hope this helps, Dave
On May 14, 2007, at 8:10 AM, David Farmer wrote: Hello,
I was correctly declaring the api in the property list. I am also using custom parameters which are declared as well. Using startAction I am not aware of. 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?
Regards, David Farmer coreaudiovisual.com
On May 14, 2007, at 9:35 AM, Paul Schneider wrote:
Hi, David,
I retrieve the current setting api in the render function but cannot retrieve it within the parameter changed method nor other miscellaneous methods. I noticed it works in the SImplePaint FxPlug example. Cannot understand why it works there but not in my project.
One common pitfall is that you must specify the API's you will use in your plist. This might be the difference between your plugin and SimplePaint. Make sure your plist has something like this:
<key>ProPlugProtocolList</key> <array> <dict> <key>protocolName</key> <string>FxParameterCreationAPI</string> <key>versions</key> <array> <integer>1</integer> </array> </dict> <dict> <key>protocolName</key> <string>FxParameterRetrievalAPI</string> <key>versions</key> <array> <integer>1</integer> </array> </dict> <dict> <key>protocolName</key> <string>FxParameterSettingAPI</string> <key>versions</key> <array> <integer>1</integer> </array> </dict> </array>
For what it's worth, this requirement has been relaxed in FCS 6.0.
If that's not it, you might have to call [FxCustomParameterActionAPI startAction:self] before requesting the parameter setting API.
- Paul
On May 13, 2007, at 2:50 PM, David Farmer wrote: Host: Motion 2.1.2
Can you elaborate on 'wonky in Motion'? Is it possible? I retrieve the current setting api in the render function but cannot retrieve it within the parameter changed method nor other miscellaneous methods. I noticed it works in the SImplePaint FxPlug example. Cannot understand why it works there but not in my project. Seems strange ( but so did beer when I was 5, 9-) ).
Thanks!
David Farmer coreaudiovisual.com
On May 11, 2007, at 9:58 AM, Paul Miller wrote:
David Farmer wrote: When I try to use FxParameterSettingAPI it always returns NULL. I am attempting to use it in the parameterChanged method to update parameters for a preset system.
You didn't mention your host, but this works properly in FCP6, but didn't work at all in previous versions.
Also, it's a bit wonky in Motion.
|