OAPI: refactor how 'eval-on-submit' settings are configured
Refactor the job settings. The `autoevalLockable` boolean is now replaced with an `evalOnSubmit` nested object: ``` evalOnSubmit: { showButton: true, placeholder: "Scene frame range", }, ``` This makes it possible to add a placeholder text, and later maybe some other parameters. The `showButton: true` part always has to be there, as the entire feature is disabled with `showButton: false`, in which case it's better to just remove the entire `evalOnSubmit` sub-object altogether. Still, I think it's preferred to have that `showButton: true` in there, as it makes it more explicit what this section of the settings is for. This commit just contains the OpenAPI definition.
This commit is contained in:
parent
8f9fddd512
commit
886f21e958
@ -1683,20 +1683,28 @@ components:
|
|||||||
"eval":
|
"eval":
|
||||||
type: string
|
type: string
|
||||||
description: Python expression to be evaluated in order to determine the default value for this setting.
|
description: Python expression to be evaluated in order to determine the default value for this setting.
|
||||||
"autoevalLockable":
|
"evalOnSubmit":
|
||||||
# This setting uses camelCase, as 'autoeval_lockable' would translate
|
type: object
|
||||||
# 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: >
|
description: >
|
||||||
Enables a toggle option in the submission interface to enable
|
Enables the 'eval on submit' toggle button behavior for this setting.
|
||||||
auto-evaluation. When toggled on, the `eval` setting will always be
|
A toggle button will be shown in Blender's submission interface.
|
||||||
evaluated on job submission. An example use is the to-be-rendered
|
When toggled on, the `eval` expression will determine the setting's
|
||||||
frame range, which by default automatically follows the scene range,
|
value. Manually editing the setting is then no longer possible, and
|
||||||
but can be overridden manually when desired.
|
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.
|
||||||
|
properties:
|
||||||
|
"showButton":
|
||||||
|
type: boolean
|
||||||
|
description: Enable or disable the 'eval on submit' toggle button.
|
||||||
|
"placeholder":
|
||||||
|
type: string
|
||||||
|
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]
|
||||||
"visible":
|
"visible":
|
||||||
$ref: "#/components/schemas/AvailableJobSettingVisibility"
|
$ref: "#/components/schemas/AvailableJobSettingVisibility"
|
||||||
"required":
|
"required":
|
||||||
|
Loading…
x
Reference in New Issue
Block a user