×

Terminal Output

  • Welcome
  • Standards Discussion
  • Contact
  • Ofx small
  • Welcome
    • Why a Standard?
    • For Implementers
    • Association Business
  • API Documentation
    • API Reference
    • Programming Reference
    • Programming Guide
  • Standards Discussion
  • Contact
Back to standard change list


Dynamic Parameter Creation Proposed

Standard version: 2.0

Major Change

Being able to amend the parameter set on a plugin instance after creation would be a useful feature for many plugin developers. In response to user initiated action (eg: a button press), a plugin should be able to both define new parameters or destroy existing parameters on the given instance.

 

 

We need a new 1D int property on the host and plugin descriptors, kOfxPropHasDynamicParams. This takes two values zero (false) or 1 (true), which indicate...

  • for a host, that it supports dynamic parameter creation,
  • for a plugin, that it wants to perfrom dynamic parameter creation.

We need to ammend the parameter suite so that we have the following functions added....

  • OfxParameterSuiteV2::paramSetEditBegin - which indicates the plugin is about to start adding or removing params from its parameter set
  • OfxParameterSuiteV2::paramSetEditEnd - which indicates the plugin has finished adding or removing params from its parameter set
  • OfxParameterSuiteV2::paramDestroy - which destroys a given parameter in the param set.

For hosts that support dynamic parameter creation, you can edit the parameter set in the same actions as you could set a parameter's values. A plugin must first call OfxParameterSuiteV1::paramSetEditBegin, it can then call paramDefine as if it were in the describe action to create new parameters. It can also destroy parameters via OfxParameterSuiteV2::paramDestroy. Once done, a plugin should call OfxParameterSuiteV2::paramSetEditEnd.

During the param set editing process, a parameter's descriptor is being manipulated, just as in the describe action. Once OfxParameterSuiteV2::paramSetEditEnd is called, you would need to fetch the parameter instance out of the param set to access and modify its value.

All parameters, whether dynamically created or not, need a unique name.

Note: Parameters that are declared in the initial kOfxActionDescribe action cannot be destroyed

Back to standard change list


Discussion

Comments

(Pierre Jasmin):  In an application like Fusion for native plugins it already works like that. I am not sure it needs to wait for v2 to be supported. An alternative scheme would be like we were able to add dynamic parameters in Combustion (within AE plugin framework). Essentially static parameter were declared as usual and additional parameters could later be added. This would have for the static parameters no effect on the plugin.  A similar scheme could work here. Rather than making this ParameterSuiteV2, it could be DynamicParameterSuiteV1. This would make it simple to know when creating Parameters if DynamicParams are supported...

Pierre Jasmin | 3:41 pm, 6 Jun 2015
Back to standard change list
  • OFX @ Github
  • Association Information

Copyright ©2023 The Open Effects Association