Standard version: 2.0
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...
We need to ammend the parameter suite so that we have the following functions added....
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
(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...