Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

You can also set the Label text for this select, which can describe what the operator should select in this field, e.g. product type, etc.

Just like with the input field, you can specify the Target key under which the chosen option can be accessed in Context in the Code module.

Items field can be used to specify the options available for the operator. You just need to write them into the field separated by semicolon ( ; ).

Target Key is the key in Context which will contain the value which was entered in this field at the time the image was processed. You can then work with this value in Code where you access it.

This would be the code to acces the value if the target key is set to ‘input2’:

Code Block
context['operatorInput']['input2']
Note

If you want to have multiple inputs/selects/sliders in the operator view, you have to set different target key for each of them, so e.g. set one to ‘input1’ and the other to ‘input2’.

Slider

The slider element allows the operator to select a number from a given range set with min and max. Either by using the slider itself or the text field next to it (if enabled by Show text field).

...

Target Key is the key in Context which will contain the value which was selected entered in this field at the time the image was processed. You can then work with this value in Code where you access it with (.

This would be the code to acces the value if the target key is set to ‘input2’)‘input3’:

Code Block
context['operatorInput']['input2input3']
Note

If you want to have multiple inputs/selects/sliders in the operator view, you have to set different target key for each of them, so e.g. set one to ‘input1’ and the other to ‘input2’.

...