From 6686ba36104ea7fbf7c68206416b4cd2408a36d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sybren=20A=2E=20St=C3=BCvel?= Date: Thu, 13 Jul 2023 14:59:22 +0200 Subject: [PATCH] OAPI: yet another refactor of 'eval-on-submit' behavior for job settings The data is still the same, but the names of the properties have changed a bit so that they're more generic, declarative, instead of specific to one bit of functionality. The goal is to have the `evalInfo.description` field usable for the 'evaluate now' button in the add-on as well. That way it should be clearer what that does. This commit just updates the OpenAPI definition. --- pkg/api/flamenco-openapi.yaml | 40 +++++++++++++++++++---------------- 1 file changed, 22 insertions(+), 18 deletions(-) diff --git a/pkg/api/flamenco-openapi.yaml b/pkg/api/flamenco-openapi.yaml index e2847bf1..6ee3ecd1 100644 --- a/pkg/api/flamenco-openapi.yaml +++ b/pkg/api/flamenco-openapi.yaml @@ -1683,28 +1683,32 @@ components: "eval": type: string description: Python expression to be evaluated in order to determine the default value for this setting. - "evalOnSubmit": + "evalInfo": type: object - description: > - Enables the 'eval on submit' toggle button behavior for this setting. - A toggle button will be shown in Blender's submission interface. - When toggled on, the `eval` expression will determine the setting's - value. Manually editing the setting is then no longer possible, and - instead of an input field, the 'placeholder' string is shown. - - An example use is the to-be-rendered frame range, which by default - automatically follows the scene range, but can be overridden - manually when desired. + description: Meta-data for the 'eval' expression. properties: - "showButton": + "showLinkButton": type: boolean - description: Enable or disable the 'eval on submit' toggle button. - "placeholder": - type: string + default: false description: > - Placeholder text to show when the manual input field is hidden - (because eval-on-submit has been toggled on by the user). - required: [showButton, placeholder] + Enables the 'eval on submit' toggle button behavior for this setting. + A toggle button will be shown in Blender's submission interface. + When toggled on, the `eval` expression will determine the setting's + value. Manually editing the setting is then no longer possible, and + instead of an input field, the 'description' string is shown. + + An example use is the to-be-rendered frame range, which by default + automatically follows the scene range, but can be overridden + manually when desired. + "description": + type: string + default: "" + description: > + Description of what the 'eval' expression is doing. + It is also used as placeholder text to show when the manual + input field is hidden (because eval-on-submit has been toggled + on by the user). + required: [showLinkButton, description] "visible": $ref: "#/components/schemas/AvailableJobSettingVisibility" "required":