From 553fffa21e9231572f891d4e79b0947c9ae62692 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sybren=20A=2E=20St=C3=BCvel?= Date: Thu, 13 Jul 2023 12:00:29 +0200 Subject: [PATCH] OAPI: add option to make a job setting auto-evaluatable by the user Add a new job setting option `autoevalLockable`. Setting this to `true` in the job compiler's `JOB_TYPE` settings has the following effect: - By default, the setting will not be editable in Blender's job submission interface. Instead, a toggle button with a 'car' icon will be shown. - When the 'car' button is toggled off, the setting becomes editable again. In its default, uneditable state, the setting will be auto-evaluated before submission. This makes it possible to 'lock in' auto-evaluation. The main use case is for the frame range of the render job. By default this will be locked to the scene frame range, but it can still be overridden if a different range is wanted. This commit just contains the necessary OpenAPI change. --- pkg/api/flamenco-openapi.yaml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/pkg/api/flamenco-openapi.yaml b/pkg/api/flamenco-openapi.yaml index e796ed19..2f1ad75b 100644 --- a/pkg/api/flamenco-openapi.yaml +++ b/pkg/api/flamenco-openapi.yaml @@ -1683,6 +1683,20 @@ components: "eval": type: string description: Python expression to be evaluated in order to determine the default value for this setting. + "autoevalLockable": + # This setting uses camelCase, as 'autoeval_lockable' would translate + # to an 'AutoevalLockable' property in the Go code, which should be + # accessed as 'autoevalLockable' in the job compiler JavaScript file. + # To keep things consistent, the property is just named + # `autoevalLockable` here too. + type: boolean + default: false + description: > + Enables a toggle option in the submission interface to enable + auto-evaluation. When toggled on, the `eval` setting will always be + evaluated on job submission. 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. "visible": $ref: "#/components/schemas/AvailableJobSettingVisibility" "required":