• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: addCustomParameterWithName doesn't work in a FxPlug filter?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: addCustomParameterWithName doesn't work in a FxPlug filter?


  • Subject: Re: addCustomParameterWithName doesn't work in a FxPlug filter?
  • From: Steve Christensen <email@hidden>
  • Date: Tue, 10 Aug 2010 18:07:31 -0700

If the parameter value is a NSString, int or double, you could use one of the built-in parameter types, otherwise you'll need to create an empty NSView in -createViewForParm:, as Paul described below. In any case, you should include the "hidden" flag in the bitmap of flags you specify at parameter creation so that it won't be visible to the user.


On Aug 9, 2010, at 8:29 AM, Robert Monaghan wrote:

Ahh...

Gotcha.. Do I have to created the UI view, even though I don't want to expose the parameter to the user?
(I am using the parameter as a variable for my plugin. It will be static through out all of the operations.)

bob..

On Aug 9, 2010, at 8:23 AM, Paul Schneider wrote:

Hi Bob,

In order for custom parameters to appear in Final Cut's parameter view, your plugin must create their UI. Final Cut doesn't know what's inside the parameter, so we can't create the UI like we can for standard parameter types.

To supply the parameter UI, first declare that your plugin formally supports the FxCustomParameterViewHost protocol:

@interface MyPlugin : NSObject <FxFilter, FxCustomParameterViewHost> {}

Next, set the CustomUI flag on your parameter:

[parmsApi addCustomParameterWithName: @"MyValue"
  parmId: kParamID_MyValue
    defaultValue: [NSNumber numberWithInt:130]
       parmFlags: kFxParameterFlag_CUSTOM_UI];

Finally, implement the method that creates a UI view for your custom parameter:

@implementation MyPlugin

- (NSView *)createViewForParm:(UInt32)parmId {
if (parmId == kParamID_MyValue)
return [[MyCustomView alloc] init];

return nil;
}

@end

In order for custom parameters to appear in XML, the parameter value must conform to the NSCoding protocol. In your example, you are using NSNumbers, so that should work. If you implement your own parameter class, you must make sure that the class implements the NSCoding protocol.

You might want to check out the SimpleMatte example in the FxPlug SDK. That plugin demonstrates the use of a custom parameter.

- Paul




On Aug 9, 2010, at 7:44 AM, Robert Monaghan wrote:

Hi Everyone..

Is there a secret trick to get:

[parmsApi addCustomParameterWithName: @"MyValue"
  parmId: kParamID_MyValue
    defaultValue: [NSNumber numberWithInt:130]
       parmFlags: kFxParameterFlag_DEFAULT];

to work in FxPlug?
Every other type of parameter works just fine. I haven't been able to get this one to show up at all.
When I export some XML from Final Cut Pro all of the other controls/paramenters show up, except the ones
created with ... (I've tried all sorts of flags, but nothing changes..)

Any suggestions??

bob.

 _______________________________________________
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

References: 
 >addCustomParameterWithName doesn't work in a FxPlug filter? (From: Robert Monaghan <email@hidden>)
 >Re: addCustomParameterWithName doesn't work in a FxPlug filter? (From: Paul Schneider <email@hidden>)
 >Re: addCustomParameterWithName doesn't work in a FxPlug filter? (From: Robert Monaghan <email@hidden>)

  • Prev by Date: Re: Gamma issue?
  • Next by Date: Re: addCustomParameterWithName doesn't work in a FxPlug filter?
  • Previous by thread: Re: addCustomParameterWithName doesn't work in a FxPlug filter?
  • Next by thread: Re: addCustomParameterWithName doesn't work in a FxPlug filter?
  • Index(es):
    • Date
    • Thread