Versions Compared

Key

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

...

E.g. if you enter this simple code in Code module, it will show the text ‘True’ in the label if an image is evaluated as OK and ‘False’ if an image is evaluated as NGNOK:

Code Block
languagepy
def main(context):
    context['label_key'] = str(context['result'])

...

The Label can be used to describe what kind of value is set by the slider. Apart from the position, you can also adjust the slider width and set visibility by key.

...

Disabling the text field can be used e.g. when trying to make an “on/off switch” between 0 and 1, otherwise, the text field is needed for showing the set value.

...

When you finish configuring your operator view in Editor, you can click on Save and go back to Camera tab and select Operator View > Open operator View, then a window like this will open (with elements as you defined them in Editor) and the operator can start interacting with it:

...