AcademySoftwareFoundation / openfx

OpenFX effects API
Other
393 stars 119 forks source link

Support/Plugins/ChoiceParams has a couple of errors #146

Closed barretpj closed 3 months ago

barretpj commented 3 months ago

I'm using this plugin to test my implementation of choice params, and noted a couple of issues in this code:

  1. the grouping is different from all the other plugins in Support/Plugins, which means it appears in a different place from those other plugins. The others are all in "OFX Example (Support)" (via kPluginGrouping) but this one is in "OFX" (via setPluginGrouping()).

  2. it doesn't define a default value for any of its params. That leads (at least in my host) to the StrChoice param showing an empty value on creation, since the default value is NULL.

Guido-assim commented 3 months ago

For OfxParamTypeStrChoice if there is no default value I currently use the first option as the default (instead of ""), just like you would do with OfxParamTypeChoice (where the default would be 0). If we want that behavior then maybe it should be explained in the documentation with OfxParamPropDefault.

garyo commented 3 months ago

Thanks -- I made a PR to fix these, including doc updates: #147 . Please review.

garyo commented 3 months ago

Ping -- does my fix in #147 work for both of you?

garyo commented 3 months ago

I believe this is fixed now in #147.