-
Notifications
You must be signed in to change notification settings - Fork 123
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add kOfxParamPropChoiceOrder #133
Conversation
I implemented this for the next release of Assimilate SCRATCH. |
I realized that once this is implemented in a host, if there is a plugin with a value list, the host will load the wrong choice since the value will now map to a different option. This breaks compatibility. If the value list is interpreted as UI only then this isn't an issue. Which way did you end up implementing it? |
Why would the host load the wrong choice? The mapping of choice labels to values is up to the plugin. |
Signed-off-by: Gary Oberbrunner <[email protected]>
Agreed, @Guido-assim. Here's what I plan to do this weekend (directly from the meeting minutes):
We will use |
Update the doc to describe the operation of the new property. Signed-off-by: Gary Oberbrunner <[email protected]>
Signed-off-by: Gary Oberbrunner <[email protected]>
This code was contributed by BlackMagic. Signed-off-by: Gary Oberbrunner <[email protected]>
Signed-off-by: Gary Oberbrunner <[email protected]>
Signed-off-by: Gary Oberbrunner <[email protected]>
Signed-off-by: Gary Oberbrunner <[email protected]>
- Add INSTALLDIR CMake cache var - Use bash getopts to parse args in `scripts/build-cmake.sh` Signed-off-by: Gary Oberbrunner <[email protected]>
This way the plugin artifact can be unzipped directly into the OFX plugins folder, because the plugins have the proper bundle structure. I removed the "*.ofx" files from the include/lib artifact because they're not really useful as is, without the proper bundle structure. Signed-off-by: Gary Oberbrunner <[email protected]>
Signed-off-by: Gary Oberbrunner <[email protected]>
The CI build issue was an "unsafe" git dir. actions/checkout@v4 is supposed to fix that; see comments in actions/runner#2033. Signed-off-by: Gary Oberbrunner <[email protected]>
Signed-off-by: Gary Oberbrunner <[email protected]>
Signed-off-by: Gary Oberbrunner <[email protected]>
Signed-off-by: Gary Oberbrunner <[email protected]>
Signed-off-by: Gary Oberbrunner <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For kOfxParamPropChoiceOrder option items with a negative order value are excluded from the option list in our code. That is not reflected in this commit, see the example where -100 is used for the order value (ofParameter.rst line 218). We need to make sure what the behavior should be.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Green Choice Param seems not to behave as expected.
The "Green: lots" option has index 1 (and order 2) which results in a scale of g = 0.5;
The "Green: some" option has index 2 (and order 1) which results in a scale of g = 1.0;
It's entirely possible my code is messed up. I didn't have a host that supports Order to test with. Feel free to post a patch & I'll apply it. |
Signed-off-by: Gary Oberbrunner <[email protected]>
What do you do in your host when you load a project with a ChoiceParam option where the saved index is hidden? What do you show in the UI? Do you expose the hidden value or what? What should the spec require or suggest in this case? |
Signed-off-by: Gary Oberbrunner <[email protected]>
If the saved index is hidden then we use the default value, the UI would show the current (default) value. The behavior is the same as when a saved option is not present anymore with OfxParamTypeStrChoice. |
I see -- I was expecting you'd load the hidden value and it would be up to the plugin to modify it, but that would present UI challenges, so I see why you're basically resetting the param to default. Let's discuss at the meeting. |
After discussion about the hide/unhide during the TSC meeting I had a look at our code and hide/unhide would be difficult to implement |
Did you close this PR deliberately? I think we should still move forward with it. I added some language per the discussion in the meeting: +If an Order value is negative, the host _should_ hide the
+corresponding option in the UI. This can be useful for a plugin to
+deprecate certain options. When a host loads a project which includes
+a hidden option, the host _should_ show that option in that effect
+instance. If a host cannot dynamically hide or show options, it may
+instead show hidden options (with negative Order values) as grayed out
+or inactive. A plugin should not set the choice param's default value
+to a hidden option. |
I'll reopen this for further discussion. |
Also add Order support for StrChoice Still needs work: add to support lib Signed-off-by: Gary Oberbrunner <[email protected]>
The closing was by accident. |
Update StrChoice support example to use this, and also check for StrChoice support before creating/using the param. Signed-off-by: Gary Oberbrunner <[email protected]>
OK, probably best to discuss on Slack then. I'll start. |
This turned out to be complicated for some hosts, so we will not mandate it in the spec. The spec now recommends plugins only use non-negative values for Order, thus preserving the option for hosts to hide negative values if they can. Signed-off-by: Gary Oberbrunner <[email protected]>
Adjusted doc per Slack discussion to remove requirement for hosts to hide negative orders, and removed negative orders in example plugins. This should be ready to merge now; please review. |
Signed-off-by: Gary Oberbrunner <[email protected]>
Signed-off-by: Gary Oberbrunner <[email protected]>
Signed-off-by: Gary Oberbrunner <[email protected]>
See issue #146 |
* Set defaults for StrChoice params in examples * Update doc to say that Choice and StrChoice params should use first defined option if the plugin doesn't specify a default * Fix plugin grouping for Support/Plugins/ChoiceParams See also PR #133. Signed-off-by: Gary Oberbrunner <[email protected]>
Draft, including documentation. @fxtech @gregcotten @Guido-assim @revisionfx : please try this
prop-choice-value
branch and submit any comments or changes to this PR.Closes #129.